-----------------
In Windows 2000, the Microsoft® Enhanced RSA Provider supports direct
encryption with RSA public keys and decryption with RSA private keys.
The encryption uses PKCS #1 Type 2 padding. On decryption, this padding
is verified. The length of plaintext data that can be encrypted with a
call to CryptEncrypt with an RSA key is the length of the key modulus
minus eleven bytes. The eleven bytes is the chosen minimum for PKCS #1
padding.
...The length of ciphertext data to be decrypted must be the same
length as the modulus of the RSA key used to decrypt the data. If the
ciphertext has zeros in the most significant bytes, these bytes must be
included in the input data buffer and in the input buffer length...
-----------------
Any suggestions about how I should size my decryption (encryption)
buffer, assuming that it _is_ indeed a padding problem?
Thanks!
Andrew