« Return to Thread: Fix to RandomPool

Fix to RandomPool

by Ron Teitelbaum :: Rate this Message:

Reply to Author | View in Thread

I made the following change

RandomPool >> stir
        | cipher block |
        Transcript cr; show: 'stir'.
        cipher _ (TripleDES key: key) cbc.
        cipher initialVector: (pool copyFrom: pool size - TripleDES
blockSize + 1 to: pool size).
        1 to: pool size - TripleDES blockSize + 1 by: TripleDES blockSize
do: [ :startIndex |
                block _ pool copyFrom: startIndex to: startIndex + TripleDES
blockSize - 1.
                cipher encryptBlock: block.
                pool replaceFrom: startIndex to: startIndex + TripleDES
blockSize - 1 with: block]


I had to add the + 1 for setting the initalVector, I was getting 9 bytes.

Ron Teitelbaum

_______________________________________________
Cryptography mailing list
Cryptography@...
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/cryptography

 « Return to Thread: Fix to RandomPool

LightInTheBox - Buy quality products at wholesale price