Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Issue 10351008: Implement md5 hash in crypto library. (Closed)

Created:
8 years, 7 months ago by Mads Ager (google)
Modified:
8 years, 7 months ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Implement md5 hash in crypto library. It might be nicer to leave it out because we do not want to encourage its use. On the other hand, there are multiple places where md5 hashing is used so making it available seems like the right thing to do. R=sgjesse@google.com,benl@google.com BUG= TEST= Committed: https://code.google.com/p/dart/source/detail?r=7406

Patch Set 1 #

Patch Set 2 : Reuploading #

Total comments: 4

Patch Set 3 : Add warning to MD5 #

Patch Set 4 : Indentation fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+227 lines, -157 lines) Patch
M lib/crypto/crypto.dart View 1 2 2 chunks +12 lines, -1 line 0 comments Download
A + lib/crypto/hash_utils.dart View 1 2 3 5 chunks +38 lines, -15 lines 0 comments Download
A lib/crypto/md5.dart View 1 chunk +80 lines, -0 lines 0 comments Download
M lib/crypto/sha1.dart View 2 chunks +2 lines, -9 lines 0 comments Download
M lib/crypto/sha256.dart View 1 chunk +2 lines, -2 lines 0 comments Download
D lib/crypto/sha_utils.dart View 1 chunk +0 lines, -130 lines 0 comments Download
A tests/lib/crypto/hmac_md5_test.dart View 1 2 1 chunk +93 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
Mads Ager (google)
8 years, 7 months ago (2012-05-03 10:19:26 UTC) #1
Ben Laurie (Google)
How about having a crypto.deprecated library and putting it in there?
8 years, 7 months ago (2012-05-03 10:22:01 UTC) #2
Mads Ager (google)
On 2012/05/03 10:22:01, Ben Laurie (Google) wrote: > How about having a crypto.deprecated library and ...
8 years, 7 months ago (2012-05-03 11:27:32 UTC) #3
Søren Gjesse
lgtm I don't think we need to discourage the use if MD5. It must be ...
8 years, 7 months ago (2012-05-03 13:31:12 UTC) #4
Mads Ager (google)
8 years, 7 months ago (2012-05-08 08:32:37 UTC) #5
I have added a warning in the doc comment that MD5 has known collisions and
should only be used when needed for backwards compatibility.

I'm going to land this as is. We can consider splitting MD5 into a separate
library for "non-secure crypto stuff". I'm not convinced at this point that it
will have an effect that the comment in itself will not have.

https://chromiumcodereview.appspot.com/10351008/diff/3003/lib/crypto/crypto.dart
File lib/crypto/crypto.dart (right):

https://chromiumcodereview.appspot.com/10351008/diff/3003/lib/crypto/crypto.d...
lib/crypto/crypto.dart:50: * MD5 hash function implementation.
On 2012/05/03 13:31:12, Søren Gjesse wrote:
> We could mention the issues with MD5 here.

Done.

https://chromiumcodereview.appspot.com/10351008/diff/3003/lib/crypto/hash_uti...
File lib/crypto/hash_utils.dart (right):

https://chromiumcodereview.appspot.com/10351008/diff/3003/lib/crypto/hash_uti...
lib/crypto/hash_utils.dart:23: _HashBase(int this._chunkSizeInWords,
On 2012/05/03 13:31:12, Søren Gjesse wrote:
> Indentation.

Done.

Powered by Google App Engine
This is Rietveld 408576698