>>GetModulus() returns a Crypto++ Integer. Integer has a class method 
BitCount().

Yes, but as I noted above, this will sometimes return the wrong value...

When using the high level decryptor

RSAES_OAEP_SHA_Decryptor decryptor( privateKey );

size_t dpl = decryptor.MaxPlaintextLength( ciphertext.size() ); returns 0 
if ciphertext.size() does not equal decryptor.FixedCiphertextLength(), 
which means that any other size is invalid.  The computation is from line 
158 in here:

http://www.cryptopp.com/docs/ref/pubkey_8h_source.html

size_t FixedCiphertextLength() const {return 
this->GetTrapdoorFunctionBounds().MaxImage().ByteCount();}


So, the official correct value must be returned by 
GetTrapdoorFunctionBounds().MaxImage().ByteCount();


-- 
-- 
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.
--- 
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to