[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[iaik-jce] Padding problem



Hello,

	I keep getting a BadPaddingException everytime I try to decrypt
with an asymettric key. Here's the case...

	I use MSCryptoAPI to generate a session key. Then I encrypt that
session key with the receivers publickey. All's well... I guess a
140byte blob of the encrypted session key (12 bytes for the header
and 128 bytes for the encrypted session key). I used an RSA engine
with RSA keys to do this.

	I bring this blob over to JAVA IAIK provider. Initialise the
cipher object in with RSA / DECRYPT_MODE / the receivers private key.
And that's where it gives me 'BadPaddingException: The encrypted data
is not k OCTETS long'. What does this mean and how do I get around it?

NIRAV KAKU
- Thought anonymous -
I have forgot how beautiful the stars look. I must look up again.
--
Mailinglist-archive at
http://jcewww.iaik.at/mailarchive/iaik-jce/jcethreads.html

To unsubscribe send an email to listserv@iaik.at with the folowing content:
UNSUBSCRIBE iaik-jce