You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Brain dump from reading through the Haskell code for this.
In the end this all boils down to extracting the numbers from the modular exponentiation equation underpinning RSA:
The modulus n
Public exponent e
Private exponent d
Explanation of PEM in relation to other file types here
Data.X509.Memory - read PEM (private key) key file from memory. Depends on 2 pemParseBS, 3 decodeASN1’
Data.PEM.Parser - Parses lines of PEM file into a PEM data structure, with name, header and content
Data.ASN1.Encoding - ASN1 is Abstract Syntax Notation One, interface for defining data structures to be (de-)serialised across platforms. Seems to be used after the PEM has been parsed, to extract the actual primitive number theory values, for keys.
Crypto.Store.X509 - reads public key from memory, also depends on 2 pemParseBS and 3 decodeASN1’ , then does some other stuff to go to public key shape
Web.JWT - JWT library, containing claims, parsing, signing and verifying. Parsing is done in readRsaPublicKey and readRsaSecret . Depends on 2 readKeyFileFromMemory , 4 readPubKeyFileFromMemory .
The text was updated successfully, but these errors were encountered:
Brain dump from reading through the Haskell code for this.
In the end this all boils down to extracting the numbers from the modular exponentiation equation underpinning RSA:
n
e
d
Explanation of PEM in relation to other file types here
pemParseBS
, 3decodeASN1’
pemParseBS
and 3decodeASN1’
, then does some other stuff to go to public key shapereadRsaPublicKey
andreadRsaSecret
. Depends on 2readKeyFileFromMemory
, 4readPubKeyFileFromMemory
.The text was updated successfully, but these errors were encountered: