[Cryptography Team] 2 failing tests using CBC

Robert Withers reefedjib at yahoo.com
Sat Mar 31 03:22:09 UTC 2007


Never mind, I found it.  There is new code in  
BlockCipherMode>>#vector: which destroys the vector getting  
replaced.  I was using the same ByteArray to initialize both the  
encryptor and decryptor, and it was getting destroyed before the  
decryptor could use it.

All tests, 90 of em, pass.  All is green.

Rob

On Mar 30, 2007, at 8:09 PM, Robert Withers wrote:

> I was running the unit tests and I noticed that 2 of my own tests  
> are now failing.  This wasn't the case 6 months ago.  One test is  
> for DES-CBC and the other is for TripleDES-CBC.  Did some code  
> change in this area recently?
>
> Here is a little detail for the test #testDESCBC
>
> startBuffer = a ByteArray(1 35 69 103 137 171 205 231)
> 1st encrypt = a ByteArray(157 97 0 32 114 216 222 93)
> 1st decrypt = a ByteArray(1 50 103 84 205 254 171 144)
> 2nd encrypt = a ByteArray(14 235 75 121 46 119 224 35)
> 2nd decrypt = a ByteArray(1 50 103 84 205 254 171 144)
>
> What is strange is that while the 1st decrypt is different than the  
> startBuffer, the 2nd decrypt equals the first decrypt.  This is  
> true even though the corresponding encrypts are different.  Anyway,  
> the 1st decrypt is sufficient to show a problem.
>
> Could someone look into this who has DES knowledge?
>
> I am away for the next week, so I won't be able to respond.
>
> thanks,
> Robert
> _______________________________________________
> Cryptography mailing list
> Cryptography at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/ 
> cryptography



More information about the Cryptography mailing list