[erlang-questions] public_key:pem_decode/1 and public_key:verify/4

Ingela Andin ingela@REDACTED
Thu Jan 20 10:37:15 CET 2011


Hi again,

The PKCS-1 asn-1 spec is part of public key. PEM-files are mainly
base64-encoded  asn1 DER data.
Pem files looks something like this:

	<text>
	-----BEGIN SOMETHING-----<CR><LF>
	<Base64 encoding line><CR><LF>
	<Base64 encoding line><CR><LF>
	...
	-----END SOMETHING-----<CR><LF>
	<text>

Adding support for the something = RSA PUBLIC KEY should be fairly
simple as the ASN1- spec is alredy in place.

2011/1/19 Joakim G. <jocke@REDACTED>:
> Thanks, I see.
>
> I'm using keys as defined in:
> https://gitweb.torproject.org/tor.git?a=blob_plain;hb=HEAD;f=doc/spec/tor-spec.txt
>
> That is:
>
> "For a public-key cipher, we use RSA with 1024-bit keys and a fixed
> exponent of 65537.  We use OAEP-MGF1 padding, with SHA-1 as its digest
> function.  We leave the optional "Label" parameter unset. (For OAEP
> padding, see ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-1/pkcs-1v2-1.pdf)"
>
> I only have the public keys to work with. Not a surprise. :-)

No not really, but you never know, with time I learnt not to take
anything for granted  ;)

>
> I will see if I can find more info on this.

[...]

I will put it on the wish-list, but we have got a lot of other things
on our table so a contribution
will proably speed things up.

Regards Ingela Erlang/OTP team - Ericsson AB


More information about the erlang-questions mailing list