Fix to RandomPool

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Fix to RandomPool

Ron Teitelbaum
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
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/cryptography
Reply | Threaded
Open this post in threaded view
|

Re: Fix to RandomPool

Rob Withers
Ron,

Would it be possible to remove the Transcript show statement?  It  
gets annoying under heavy use and doesn't help debugability, I don't  
believe.

thanks,
Robert


On Dec 18, 2006, at 7:21 AM, Ron Teitelbaum wrote:

> 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
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/ 
> cryptography

_______________________________________________
Cryptography mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/cryptography
Reply | Threaded
Open this post in threaded view
|

RE: Fix to RandomPool

Ron Teitelbaum
I removed it.

Ron

> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of
> Robert Withers
> Sent: Monday, December 18, 2006 11:15 AM
> To: [hidden email]; Cryptography Team Development List
> Subject: Re: [Cryptography Team] Fix to RandomPool
>
> Ron,
>
> Would it be possible to remove the Transcript show statement?  It
> gets annoying under heavy use and doesn't help debugability, I don't
> believe.
>
> thanks,
> Robert
>
>
> On Dec 18, 2006, at 7:21 AM, Ron Teitelbaum wrote:
>
> > 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
> > [hidden email]
> > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/
> > cryptography
>
> _______________________________________________
> Cryptography mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/cryptography


_______________________________________________
Cryptography mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/cryptography