Printing PEM encoded public key

5 views
Skip to first unread message

Andrew Cagney

unread,
Jun 27, 2022, 4:04:41 PMJun 27
to mozilla's crypto code discussion list
Hi,

I've code for dumping the very raw rsa _public_ key in base-64 per:
https://www.rfc-editor.org/rfc/rfc4025.html#section-2.6
https://www.rfc-editor.org/rfc/rfc3110#section-2
but would like to also dump it in a format that is more friendly to
crypto tools, notably something from the PEM family such as:
- RSA PUBLIC KEY being ASN.1: SEQUENCE ( M E )
- PUBLIC KEY above + ASN.1 to indicate it is rsa
are there any routines for helping with this?

I see cmds/btoa has code for dumping binary as PEM but that isn't public.

Andrew

Andrew Cagney

unread,
Jul 6, 2022, 8:47:43 AMJul 6
to mozilla's crypto code discussion list
To answer my own question, best place to start is keyhi.h
Reply all
Reply to author
Forward
0 new messages