Your code is pretty much the same as GenerateRSAKey() in test.cpp which was used to generate rsa1024.dat and rsa2048.dat.
rsa400pv.dat actually has a different format from the rest. The other RSA private key files are encoded as PKCS#8 privateKeyInfo, whereas rsa400pv.dat is only the privateKey part of privateKeyInfo. If you look at the code in validat2.cpp that loads rsa400pv.dat, you'll notice that it's different from loading the other keys. Jeffrey Walton wrote:
Hi All, Can anyone verify this creates files in the same format as those provided by Wei in rsa400pb.dat, rsa400pv.dat, rsa1024.dat, and rsa2048.dat? On the test which I have run, eack string k begins with 0x30 (SEQUENCE_TAG ), as does the various rsa*.dat files. I looked at rsa400pv.dat from Crypto++ 4.2 - it is the same file. I attempted to look at PK_FinalTemplate for AccessKey(), AccessPublicKey, and AccessPrivateKey() - Crypto++ stresses the limit of Intellisense in VS 6.0 and VS 7.0. BTW, you can't simply call RSAES_OAEP_SHA_Decryptor::BEREncode() - it is ambiguous due to MI. Jeff //////////////////////////////////////////////////////////////// AutoSeededRandomPool rng; // Specify modulus, accept e = 17 RSAES_OAEP_SHA_Decryptor Decryptor( rng, 128 /*, e */ ); // BER Encode Key string k; HexEncoder encoder( new StringSink( k ) ); Decryptor.AccessKey().Save( encoder ); cout << k << endk;
--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Crypto++ Users" group. To post to this group, send email to [EMAIL PROTECTED] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cryptopp-users?hl=en -~----------~----~----~----~------~----~------~--~---
