On Thursday, 5 December 2013 07:50:10 UTC, Jeffrey Walton wrote:
>
>
> I believe most of your questions can be answered with 
> http://www.cryptopp.com/wiki/Keys_and_Formats.
>
> Crypto++ does not read or write PEM encoded keys (i.e., --- BEGIN RSA 
> PRIVATE KEY --- and friends). It only reads and writes ASN.1's DER/BER.
>

The Crypto++ help files/WIki are, by most people's standards, incomplete 
and often confusing - I fully understand the reasons for this, however the 
reference you give above (which I read some time ago) does not anser or 
even clarify the issue I asked about...

I'm well aware of the RFC 142x headers in PEM files - I have written 
(modified) a pipeline filter derived form Unflushable<Filter> such that I 
can simply load and base64-decode a PEM file with:

ByteQueue data; 

 

FileSource PEMfile( filename.c_str(), true, new PEMStripper( new 
Base64Decoder() ) );

 

PEMfile.TransferTo( data );

data.MessageEnd(); 


If you read my question, its not about PEM file formats per se, its about 
the assymetry in having to use DEREncodePrivateKey/BERDecodePrivateKey 
(note the BER/DER difference) for the private key and the further 
inconsistency between how a private key is saved/restored and in 
reading/writing public keys.

The usage of a PEM file and base64 are an inconsequential side-effect and 
not relevant to the issue - its how & why regarding the underlying key data 
is encoded that I'm puzzled by...

Nick

-- 
-- 
You received this message because you are subscribed to the "Crypto++ Users" 
Google Group.
To unsubscribe, send an email to cryptopp-users-unsubscr...@googlegroups.com.
More information about Crypto++ and this group is available at 
http://www.cryptopp.com.
--- 
You received this message because you are subscribed to the Google Groups 
"Crypto++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cryptopp-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to