[prev in list] [next in list] [prev in thread] [next in thread] 

List:       bouncycastle-crypto-dev
Subject:    Re: [dev-crypto] Differences in PKCS5 Formatting Versions
From:       "Scott Weigand " <forensics_lab () hotmail ! com>
Date:       2010-05-27 0:00:42
Message-ID: BAY122-DS1284F0FA94A204160B22B85EA0 () phx ! gbl
[Download RAW message or body]

Many thanks David,

Will take a look at again
-----Original Message-----
From: David Hook <dgh@lockboxlabs.com>
Date: Wed, 26 May 2010 22:00:43 
To: <dev-crypto@bouncycastle.org>
Subject: Re: [dev-crypto] Differences in PKCS5 Formatting Versions

No, there are no differences, at least in the padding (although strictly
speaking it's PKCS#7 padding in this case). It's more likely the hash is
getting truncated as some bytes are missing from one end or the other
(possibly because padding is not actually being used).

Regards,

David

On Tue, 2010-05-25 at 13:54 +0000, Scott Weigand wrote:
> Hello List,
> 
> I was wondering if there was a difference between version 1.5 and 2.0 of the PKCS5 \
> Formatting Standard. I ask this because of some behavior I noticed between my \
> BlackBerry app and J2SE app.   
> I create AES/CBC/PKCS5 ciphertext on my BlackBerry app. I append a SHA1 Digest to \
> my plaintext prior to encryption so that I can verify that decryption was \
> successful. When I try to decrypt the ciphertext on J2SE, my plaintext is okay, but \
> the hash is not, thus I cannot verify proper decryption. 
> I noticed that the BlackBerry PKCS5 formatter is a version 2 implementation while \
> the J2SE is a version 1.5. Could this be the reason why? 
> 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic