Re: Question about memcpy in operation mode for NSS

2009-12-03 Thread Wan-Teh Chang
On Thu, Dec 3, 2009 at 8:54 AM, Gregory BELLIER wrote: > > But, I still don't understand why we need to do a memcpy after the last > round to save the last ciphered block as the new IV into the context. In my > opinion, it's useless, this context won't be used anymore. > http://bonsai.mozilla.org/

Building ECC-enabled NSS RHEL5 src-rpm

2009-12-03 Thread Kai Chan
I downloaded "nss-3.12.3.99.3-1.el5_3.2.src.rpm" from redhat.com and am trying to build an ECC-enabled RHEL5 rpm with a modified spec file. I uncomment in "/usr/src/redhat/SPEC/nss.spec: NSS_ENABLE_ECC=1 export NSS_ENABLE_ECC just before "# first, build freebl and softokn shared libraries"

Re: Question about memcpy in operation mode for NSS

2009-12-03 Thread Gregory BELLIER
Robert Relyea a écrit : But, I still don't understand why we need to do a memcpy after the last round to save the last ciphered block as the new IV into the context. In my opinion, it's useless, this context won't be used anymore. http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/security/nss

Re: Question about memcpy in operation mode for NSS

2009-12-03 Thread Robert Relyea
> > But, I still don't understand why we need to do a memcpy after the > last round to save the last ciphered block as the new IV into the > context. In my opinion, it's useless, this context won't be used anymore. > http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/security/nss/lib/freebl/camel

Re: Question about memcpy in operation mode for NSS

2009-12-03 Thread Gregory BELLIER
Robert Relyea a écrit : This code is a direct result of the definition of CBC. The IV is a random value used to initiate the CBC. Different IVs will generate completely different output stream Indeed. The same IV is needed for encryption and decryption. If I refer to the sample2 example : http