I've created a public/private key pair as follows:

        CryptoPP::RandomPool randPool;
        randPool.IncorporateEntropy((byte*)seed, strlen(seed));

        CryptoPP::RSAES_OAEP_SHA_Decryptor priv(randPool, 1024);
        CryptoPP::HexEncoder privKeyEnc(new
CryptoPP::StringSink(privateKeyString));
        priv.DEREncode(privKeyEnc);
        privKeyEnc.MessageEnd();

        CryptoPP::RSAES_OAEP_SHA_Encryptor pub(priv);
        CryptoPP::HexEncoder pubKeyEnc(new
CryptoPP::StringSink(publicKeyString));
        pub.DEREncode(pubKeyEnc);
        pubKeyEnc.MessageEnd();

When encrypting with the public key I get cipher text that is 256
characters long. If I call the "FixedCiphertextLength" method on the
private key, it gives me 128. I expected this to be 256 - the length
of the cipher text.

Is my understanding of FixedCiphertextLength incorrect or is this
something to do with my character encoding?

Thanks

-- 
You received this message because you are subscribed to the "Crypto++ Users" 
Google Group.
To unsubscribe, send an email to [email protected].
More information about Crypto++ and this group is available at 
http://www.cryptopp.com.

To unsubscribe from this group, send email to 
cryptopp-users+unsubscribegooglegroups.com or reply to this email with the 
words "REMOVE ME" as the subject.

Reply via email to