Closed rekado closed 12 years ago
I had to change the type signature of parse_RSA so that I don't have to run a parser in KeyRSA.hs. Is this better?
Would you like me to change anything in the pull request? I actually find the latest changes to be a bit uglier than the initial commits, so I can understand if you don't want to merge it.
Thanks, i've merged it and move parse_RSA into the KeyRSA function. It's not uglier than before, i really think there's no asn1 parsing code that can looks good anyway.
woo, thanks.
Hi,
I added a function to decode public keys from files that only contain public keys. Such public key files can be generated from a private key file with
openssl rsa -in rsa.pem -out rsapub.pem -pubout
.The format is SEQUENCE SEQUENCE OBJECT NULL BITSTRING, where yet another SEQUENCE INTEGER INTEGER is contained in the ASN1 stream inside the BITSTRING. That's why the pattern matching is done in two steps.