raviteja07 / owasp-esapi-java

Automatically exported from code.google.com/p/owasp-esapi-java
0 stars 0 forks source link

Code review request for CryptoHelper.computeDerivedKeys() #81

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The method of computing derived keys for encryption and
authenticity (via an HMac) is critical to the use of ESAPI.
Once the algorithm is released as part of the formal 2.0 ESAPI
release it will be extremely difficult to for use to change it
without causing it to fail to decrypt previously encrypted data.
Hence this is one method that we had better get right.

Please review the computeDerivedKeys() method ASAP both for
correctness and for those of you with a deep understanding of
cryptography, for a secure implementation. Note that cryptographer
David Wagner suggested the general approach of using an HMacSHA1
the way it is being used here. I simply extended it to repeat the
calculation until I had a key that was sufficiently long. (I did not
want to assume that the JDK had a HMacSHA256 or HMacSHA512 available.)
The code is in
org.owasp.esapi.util.CryptoHelper. Lines 72-172 in the last revision I saw.

NOTE: There is *nothing* there in the Branch Path. This is on the SVN
trunk. However, this interface insists that 'Branch Path' must be beneath
'/branches'. You will really find the code at
'/trunk/src/main/java/org/owasp/esapi/util/CryptoHelper.java'.

Original issue reported on code.google.com by kevin.w.wall@gmail.com on 17 Dec 2009 at 4:29

GoogleCodeExporter commented 9 years ago
I think this all seem ok. I am by no means a cryptographer, but the code itself 
seems
safe and correct.

Original comment by chrisisbeef on 17 Dec 2009 at 7:34

GoogleCodeExporter commented 9 years ago
The method, computeDerivedKey(), is now from lines 78-188 as of 2010-02-13
(ESAPI-2.0-rc5).

Original comment by kevin.w.wall@gmail.com on 13 Feb 2010 at 5:06

GoogleCodeExporter commented 9 years ago
NSA has volunteered their services to review at least the ESAPI crypto code. 
Thanks!

Original comment by kevin.w.wall@gmail.com on 31 Jul 2010 at 2:21

GoogleCodeExporter commented 9 years ago
Waiting on the NSA

Original comment by manico.james@gmail.com on 1 Nov 2010 at 12:49

GoogleCodeExporter commented 9 years ago

Original comment by chrisisbeef on 20 Nov 2010 at 9:55

GoogleCodeExporter commented 9 years ago
Addressed via feedback from NSA (Jessica Fitzgerald-McKay and Andy Sampson) and 
Jeffrey Walton.

Recommended changes implemented in SVN revisions 1682, 1683, 1699, 1700, 1705, 
1706,
1707, 1711, and 1712. See SVN commit comments for details.

Note that this was fixed in TRUNK, not in branches.

Original comment by kevin.w.wall@gmail.com on 4 Feb 2011 at 7:12