google / keyczar

Easy-to-use crypto toolkit
Apache License 2.0
1.1k stars 141 forks source link

Sometimes dsa key json "size" property is only approximately 1024 #130

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This key was generated with java, if you look at the public key portion it says 
"size": 1020

https://jtuley-keyczar-testdata.googlecode.com/git/special-case/java-bad-dsa/2

The size parameter in java is set with `yVal.bitLength()` I suspect that this 
is were the issue is.

While I think most implementations don't check the size property, it is 
possible, and conceivable that they would.

I'm not sure the correct fix for this, possibly more refactoring to the key 
generation so that the size used to generate the key is populated to the 
property.

Original issue reported on code.google.com by jtu...@gmail.com on 9 Mar 2013 at 2:16

GoogleCodeExporter commented 9 years ago
Should have notice when i cut and paste the line issue that it was using Y 
instead of P.

https://code.google.com/r/jtuley-keyczar-dev/source/detail?r=fa0fa6488fe61b9f752
7b9c9c8337708b521277f&name=java/keygen_refactor

Also i've verified this bug causes failures when the keysets are used from C++ 
and GO.

Original comment by jtu...@gmail.com on 15 Mar 2013 at 6:19

GoogleCodeExporter commented 9 years ago

Original comment by jtu...@gmail.com on 4 Jul 2013 at 4:26

GoogleCodeExporter commented 9 years ago
This issue was closed by revision ae37ab27202e.

Original comment by dlundb...@google.com on 16 Jul 2013 at 4:15