* toad <toad at amphibian.dyndns.org> [2006-09-25 12:53:31]: > On Sun, Sep 24, 2006 at 01:03:18AM +0000, nextgens at freenetproject.org > wrote: > > Author: nextgens > > Date: 2006-09-24 01:02:49 +0000 (Sun, 24 Sep 2006) > > New Revision: 10505 > > > > Modified: > > trunk/freenet/src/freenet/crypt/DSA.java > > trunk/freenet/src/freenet/crypt/DSAGroup.java > > Log: > > Fix some crypto code: > > 1) we were generating the "h" parameter of the group with only a few > > bytes > > Eh? h is the number of bits of another parameter; it's supposed to be short!
According to wikipedia : "Choose h, where 1 < h < p - 1 such that g = h^2 mod p > 1." > Hmmm, having said that, our Q length needs to be the same as our hash > length, i.e. 256. Which code did we actually use for group generation? > I'm reasonably sure I generated a group with 2048/256... FIPS-186-1 says : 512 < L < 1024 and L is divisible by 64 FIPS-168-2 says : L should only assume the value 1024 FIPS-186-3 will say : use SHA-224/256/384/512 as a hash function, q of size 224, 256, 384, and 512 bits, with L equal to 2048, 3072, 7680, and 15360, respectively Our DSAGroup.testGroup() method ensure it matches FIPS-186-1 requirements only. > Having to change group would be rather destructive, please could you > give a detailed justification? New FIPS seems to evolve always in the same direction ... maybe it's time for us to update our code ? > > 2) we weren't verifying DSA signatures as we ought to > > > > TODO: what about following FIPS-186-3 insteed of the first version ? > > I don't think it was available at the time of implementation. Sure it wasn't : it's still a draft :) See http://en.wikipedia.org/wiki/Digital_Signature_Algorithm and http://csrc.nist.gov/publications/drafts.html : http://csrc.nist.gov/publications/drafts/fips_186-3/Draft-FIPS-186-3%20_March2006.pdf -- NextGen$. ---> In a world without fences nor walls - who needs windows and gates ? On peut ob??r aux lois en souhaitant qu'elles changent, comme on sert ? la guerre en souhaitant la paix. Merleau Ponty "L'?loge de la philosophie" -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: Digital signature URL: <https://emu.freenetproject.org/pipermail/devl/attachments/20060925/49e02130/attachment.pgp>