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

Issue 1558018: Implements support for PBKDF2-based key derivation, random key generation, an... (Closed)

Created:
10 years, 8 months ago by rsleevi-old
Modified:
9 years, 7 months ago
Reviewers:
albertb, wtc
CC:
chromium-reviews, Paweł Hajdan Jr., brettw-cc_chromium.org
Visibility:
Public.

Description

[Replaced by http://codereview.chromium.org/1528021 ] Implements support for PBKDF2-based key derivation, random key generation, and AES-CBC encryption/decryption using CryptoAPI. Contributed by ryan.sleevi@gmail.com TEST=SymmetricKeytest.* TEST=EncryptorTest.*

Patch Set 1 #

Total comments: 22

Patch Set 2 : Style fixup #

Unified diffs Side-by-side diffs Delta from patch set Stats (+733 lines, -71 lines) Patch
M base/crypto/encryptor.h View 1 2 chunks +9 lines, -0 lines 0 comments Download
M base/crypto/encryptor_unittest.cc View 1 1 chunk +1 line, -7 lines 0 comments Download
M base/crypto/encryptor_win.cc View 1 2 chunks +75 lines, -4 lines 0 comments Download
M base/crypto/rsa_private_key.h View 1 2 chunks +6 lines, -2 lines 0 comments Download
M base/crypto/rsa_private_key_win.cc View 1 3 chunks +5 lines, -13 lines 0 comments Download
A base/crypto/scoped_capi_types.h View 1 1 chunk +126 lines, -0 lines 0 comments Download
M base/crypto/signature_creator.h View 1 2 chunks +5 lines, -1 line 0 comments Download
M base/crypto/signature_creator_win.cc View 1 2 chunks +1 line, -7 lines 0 comments Download
M base/crypto/signature_verifier.h View 1 2 chunks +7 lines, -6 lines 0 comments Download
M base/crypto/signature_verifier_win.cc View 1 4 chunks +6 lines, -19 lines 0 comments Download
M base/crypto/symmetric_key.h View 1 4 chunks +25 lines, -1 line 0 comments Download
M base/crypto/symmetric_key_unittest.cc View 1 2 chunks +2 lines, -8 lines 0 comments Download
M base/crypto/symmetric_key_win.cc View 1 2 chunks +465 lines, -3 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
rsleevi-old
Wan-Teh, Attached is the implementation of PKBDF2 and the corresponding updates to encrypt/decrypt. The unit ...
10 years, 8 months ago (2010-04-01 20:36:45 UTC) #1
wtc
Ryan, Thanks for writing this patch quickly! I reviewed everything except scoped_capi_types.h and symmetric_key_win.cc. I ...
10 years, 8 months ago (2010-04-02 00:59:07 UTC) #2
wtc
http://codereview.chromium.org/1558018/diff/1/13 File base/crypto/encryptor_unittest.cc (right): http://codereview.chromium.org/1558018/diff/1/13#newcode14 base/crypto/encryptor_unittest.cc:14: TEST(EncryptorTest, EncryptDecrypt) { albertb: we need some known-answer tests ...
10 years, 8 months ago (2010-04-02 01:00:29 UTC) #3
rsleevi-old
I'm not tied to the templates. I was just going after the scoped_nss_types. In "base" ...
10 years, 8 months ago (2010-04-02 01:48:18 UTC) #4
wtc
Ryan, Here is a belated reply to your comment from last week. http://codereview.chromium.org/1558018/diff/1/5 File base/crypto/encryptor_win.cc ...
10 years, 8 months ago (2010-04-09 00:45:16 UTC) #5
rsleevi-old
10 years, 8 months ago (2010-04-09 03:23:14 UTC) #6
http://codereview.chromium.org/1558018/diff/1/5
File base/crypto/encryptor_win.cc (right):

http://codereview.chromium.org/1558018/diff/1/5#newcode37
base/crypto/encryptor_win.cc:37: BOOL ok = CryptDuplicateKey(key->key(), NULL,
0, working_key_.receive());
http://msdn.microsoft.com/en-us/library/aa379924(VS.85).aspx

The Remarks section explains it better than I can, especially from my phone.
Check the second note about chaining and KP_IV. Same reason as to thread safety
issue when using the same key handle.

Powered by Google App Engine
This is Rietveld 408576698