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 7056026: Implement AES-CTR for NSS. (Closed)

Created:
9 years, 7 months ago by Alpha Left Google
Modified:
9 years, 2 months ago
CC:
chromium-reviews, pam+watch_chromium.org, Paweł Hajdan Jr.
Visibility:
Public.

Description

Implement AES-CTR for NSS. Implement AES-128-CTR. BUG=87152 TEST=None Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=90425

Patch Set 1 #

Total comments: 7

Patch Set 2 : done #

Total comments: 10

Patch Set 3 : revised #

Total comments: 22

Patch Set 4 : fixed comments #

Total comments: 18

Patch Set 5 : done #

Total comments: 14

Patch Set 6 : done again #

Total comments: 19

Patch Set 7 : fixed #

Total comments: 2

Patch Set 8 : git try #

Total comments: 4

Patch Set 9 : align byets #

Total comments: 2

Patch Set 10 : endian #

Total comments: 33
Unified diffs Side-by-side diffs Delta from patch set Stats (+368 lines, -46 lines) Patch
M build/build_config.h View 1 2 3 4 5 6 7 8 9 1 chunk +8 lines, -0 lines 2 comments Download
M crypto/crypto.gyp View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M crypto/encryptor.h View 1 2 3 4 5 6 7 8 9 4 chunks +67 lines, -1 line 10 comments Download
A crypto/encryptor.cc View 1 2 3 4 5 6 7 8 9 1 chunk +123 lines, -0 lines 10 comments Download
M crypto/encryptor_nss.cc View 1 2 3 4 5 6 7 2 chunks +109 lines, -45 lines 7 comments Download
M crypto/encryptor_unittest.cc View 1 2 3 4 5 6 7 1 chunk +60 lines, -0 lines 4 comments Download

Messages

Total messages: 37 (0 generated)
Ryan Sleevi
I know it's not published/finished, but some drive-by feedback/pointers for the implementation to hopefully save ...
9 years, 7 months ago (2011-05-23 05:55:04 UTC) #1
wtc
hclam: I didn't read the code, but the CL's description has typos. "SHA-ECB" should be ...
9 years, 7 months ago (2011-05-23 18:48:56 UTC) #2
Ryan Sleevi
On 2011/05/23 18:48:56, wtc wrote: > hclam: I didn't read the code, but the CL's ...
9 years, 7 months ago (2011-05-24 00:07:39 UTC) #3
Alpha Left Google
On 2011/05/24 00:07:39, Ryan Sleevi wrote: > On 2011/05/23 18:48:56, wtc wrote: > > hclam: ...
9 years, 7 months ago (2011-05-24 00:28:47 UTC) #4
Ryan Sleevi
On 2011/05/24 00:28:47, Alpha wrote: > On 2011/05/24 00:07:39, Ryan Sleevi wrote: > > On ...
9 years, 7 months ago (2011-05-24 01:02:22 UTC) #5
Alpha Left Google
http://codereview.chromium.org/7056026/diff/1/crypto/encryptor_nss.cc File crypto/encryptor_nss.cc (right): http://codereview.chromium.org/7056026/diff/1/crypto/encryptor_nss.cc#newcode65 crypto/encryptor_nss.cc:65: param_.reset(PK11_ParamFromIV(GetMechanism(mode), NULL)); On 2011/05/23 05:55:04, Ryan Sleevi wrote: > ...
9 years, 6 months ago (2011-06-01 20:29:36 UTC) #6
Alpha Left Google
To reiterate: the purpose of enabling ECB mode is to simulate AES-CTR encryption mode described ...
9 years, 6 months ago (2011-06-01 20:34:36 UTC) #7
Ryan Sleevi
Several minor nits and one request for comment below. I think it's fine/correct to implement ...
9 years, 6 months ago (2011-06-02 01:19:23 UTC) #8
wtc
hclam: I suggest that we expose the CTR mode instead of the insecure ECB mode ...
9 years, 6 months ago (2011-06-02 20:10:23 UTC) #9
Ryan Sleevi
On 2011/06/02 20:10:23, wtc wrote: > hclam: I suggest that we expose the CTR mode ...
9 years, 6 months ago (2011-06-03 00:04:13 UTC) #10
wtc
rsleevi: thank you for the info. You made a good point that crypto code should ...
9 years, 6 months ago (2011-06-03 02:14:03 UTC) #11
wtc
On 2011/06/03 02:14:03, wtc wrote: > > I think we can implement the CTR mode ...
9 years, 6 months ago (2011-06-03 02:16:01 UTC) #12
Alpha Left Google
On 2011/06/03 02:16:01, wtc wrote: > On 2011/06/03 02:14:03, wtc wrote: > > > > ...
9 years, 6 months ago (2011-06-03 17:40:09 UTC) #13
wtc
The counter should be implemented in Encryptor. You can use a counter structure similar to ...
9 years, 6 months ago (2011-06-03 17:49:22 UTC) #14
Alpha Left Google
Hey guys I updated this patch to include CTR encryption mode in Encryptor.
9 years, 6 months ago (2011-06-07 18:02:54 UTC) #15
Ryan Sleevi
http://codereview.chromium.org/7056026/diff/13002/crypto/encryptor.cc File crypto/encryptor.cc (right): http://codereview.chromium.org/7056026/diff/13002/crypto/encryptor.cc#newcode43 crypto/encryptor.cc:43: } style nit: The | operator should go at ...
9 years, 6 months ago (2011-06-08 01:29:22 UTC) #16
Alpha Left Google
http://codereview.chromium.org/7056026/diff/13002/crypto/encryptor.cc File crypto/encryptor.cc (right): http://codereview.chromium.org/7056026/diff/13002/crypto/encryptor.cc#newcode43 crypto/encryptor.cc:43: } On 2011/06/08 01:29:23, Ryan Sleevi wrote: > style ...
9 years, 6 months ago (2011-06-13 23:32:45 UTC) #17
wtc
hclam: I made a pass through the CL. Here are my comments. I'd like to ...
9 years, 6 months ago (2011-06-14 18:11:06 UTC) #18
Alpha Left Google
http://codereview.chromium.org/7056026/diff/22001/crypto/encryptor.cc File crypto/encryptor.cc (right): http://codereview.chromium.org/7056026/diff/22001/crypto/encryptor.cc#newcode42 crypto/encryptor.cc:42: (static_cast<uint64>(Get8(memory, 7)) << 0); On 2011/06/14 18:11:06, wtc wrote: ...
9 years, 6 months ago (2011-06-14 22:22:43 UTC) #19
Ryan Sleevi
Hopefully I haven't screwed up the math below. It's probably an extreme edge case, and ...
9 years, 6 months ago (2011-06-15 06:27:00 UTC) #20
Alpha Left Google
http://codereview.chromium.org/7056026/diff/27001/crypto/encryptor.cc File crypto/encryptor.cc (right): http://codereview.chromium.org/7056026/diff/27001/crypto/encryptor.cc#newcode103 crypto/encryptor.cc:103: mask->reset(new uint8[*mask_len]); On 2011/06/15 06:27:00, Ryan Sleevi wrote: > ...
9 years, 6 months ago (2011-06-15 18:54:42 UTC) #21
Alpha Left Google
ping.
9 years, 6 months ago (2011-06-17 23:31:31 UTC) #22
Alpha Left Google
ping on review.
9 years, 6 months ago (2011-06-20 18:33:17 UTC) #23
Ryan Sleevi
Sorry Alpha, I've been on the road and haven't been able to review. I believe ...
9 years, 6 months ago (2011-06-20 23:47:23 UTC) #24
Alpha Left Google
http://codereview.chromium.org/7056026/diff/33001/crypto/encryptor_nss.cc File crypto/encryptor_nss.cc (right): http://codereview.chromium.org/7056026/diff/33001/crypto/encryptor_nss.cc#newcode143 crypto/encryptor_nss.cc:143: size_t output_len = input.size() + AES_BLOCK_SIZE; On 2011/06/20 23:47:23, ...
9 years, 6 months ago (2011-06-20 23:59:44 UTC) #25
wtc
LGTM. High-Level Comments 1. Please include the flexibility of the PKCS #11 interface: typedef struct ...
9 years, 6 months ago (2011-06-21 00:33:32 UTC) #26
wtc
http://codereview.chromium.org/7056026/diff/41001/crypto/encryptor.cc File crypto/encryptor.cc (right): http://codereview.chromium.org/7056026/diff/41001/crypto/encryptor.cc#newcode43 crypto/encryptor.cc:43: } There are compiler built-in or intrinsic functions to ...
9 years, 6 months ago (2011-06-21 00:46:32 UTC) #27
Alpha Left Google
http://codereview.chromium.org/7056026/diff/33001/crypto/encryptor.cc File crypto/encryptor.cc (right): http://codereview.chromium.org/7056026/diff/33001/crypto/encryptor.cc#newcode63 crypto/encryptor.cc:63: // Overflow occurs. On 2011/06/21 00:33:32, wtc wrote: > ...
9 years, 6 months ago (2011-06-22 21:25:17 UTC) #28
wtc
hclam: thank you for implementing the byte swap optimization I suggested. Patch Set 8 has ...
9 years, 6 months ago (2011-06-22 22:12:28 UTC) #29
Alpha Left Google
http://codereview.chromium.org/7056026/diff/46001/crypto/encryptor.cc File crypto/encryptor.cc (right): http://codereview.chromium.org/7056026/diff/46001/crypto/encryptor.cc#newcode22 crypto/encryptor.cc:22: #include <byteswap.h> On 2011/06/22 22:12:28, wtc wrote: > This ...
9 years, 6 months ago (2011-06-22 22:22:58 UTC) #30
Alpha Left Google
Please let me know what you think regarding byte order. Thanks!
9 years, 6 months ago (2011-06-23 04:04:30 UTC) #31
wtc
hclam: anyone who writes networking or crypto code should be able to deal with byte ...
9 years, 6 months ago (2011-06-23 18:10:23 UTC) #32
Alpha Left Google
Thanks for your suggestions! I've used your advice and updated the patch, please take a ...
9 years, 6 months ago (2011-06-23 20:51:46 UTC) #33
wtc
LGTM. Please make the following changes before you check this in. Thanks. http://codereview.chromium.org/7056026/diff/54002/build/build_config.h File build/build_config.h ...
9 years, 6 months ago (2011-06-24 18:06:06 UTC) #34
Alpha Left Google
http://codereview.chromium.org/7056026/diff/54002/build/build_config.h File build/build_config.h (right): http://codereview.chromium.org/7056026/diff/54002/build/build_config.h#newcode97 build/build_config.h:97: #define ARCH_CPU_64_BITS 1 On 2011/06/24 18:06:06, wtc wrote: > ...
9 years, 6 months ago (2011-06-24 18:52:27 UTC) #35
Chris Palmer
I don't think you should commit this yet. http://codereview.chromium.org/7056026/diff/54002/crypto/encryptor_nss.cc File crypto/encryptor_nss.cc (right): http://codereview.chromium.org/7056026/diff/54002/crypto/encryptor_nss.cc#newcode30 crypto/encryptor_nss.cc:30: return ...
9 years, 2 months ago (2011-10-03 19:50:07 UTC) #36
Ryan Sleevi
9 years, 2 months ago (2011-10-04 00:00:21 UTC) #37
palmer: This already landed in http://crrev.com/90425

I have added comments to Issue 87152 ( http://crbug.com/87152 )  providing more
context about this code.

Powered by Google App Engine
This is Rietveld 408576698