aspose file tools*
The moose likes Java in General and the fly likes AES CFB/NoPadding with BouncyCastle LightWeight API Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "AES CFB/NoPadding with BouncyCastle LightWeight API" Watch "AES CFB/NoPadding with BouncyCastle LightWeight API" New topic
Author

AES CFB/NoPadding with BouncyCastle LightWeight API

VarunKumar Mallisetty
Ranch Hand

Joined: Jun 18, 2006
Posts: 31
I'm trying to achieve AES/CFB/NoPadding using BouncyCastle in J2ME.
I need that only because several other components in my system already are using that algorithm and J2ME optional package(JSR 177) supports AES but not CFB flavor.Iam getting a NoSuchAlogrithmException
So iam using bouncycastle and
I got an instance of cipher in the following way.

The above code works fine but if i give "abcdefghijklmo" as the input a DataLengthException is being thrown. But i need the capability to encrypt a 15 letter string also.
The crypto.Cipher in j2Se works fine with 15 letter strings also.
And more over if i have a 20 letter string.The encryptBlock function in CFBBlockCipher is giving only encrypted first 16 letters.
I'm sorry if my question is naive but i tried a lot and bouncycastle is poorly documented. I can't help.

Thanks in advance.
VarunKumar Mallisetty.


SCJP 6.0
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: AES CFB/NoPadding with BouncyCastle LightWeight API
 
Similar Threads
SSHTools, SFTP, Bouncy Castle, JCE, AES128 CBC and other acronyms. Help me put them together.
Problem encrypting with openssl, decrypting with bouncy castle
encoding in java and decoding in perl
will Rijndael run in Electronic Code Book mode ?
Bouncycastle AES - output isn't the same as input!