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

Issue 6771024: AU: Switch to 2048 bit RSA keys; Pad SHA256 hashes appropriately. (Closed)

Created:
9 years, 9 months ago by adlr
Modified:
9 years ago
Reviewers:
gauravsh, sosa
CC:
chromium-os-reviews_chromium.org, adlr
Visibility:
Public.

Description

AU: Switch to 2048 bit RSA keys; Pad SHA256 hashes appropriately. Manually pad hashes according to how SHA256 hashes should be padded for use in RSA 2048 bit encryption. Also, remove the public key from the repository, as it's generated by scons. In an upcoming CL, I will test via an actual update. BUG=chromium-os:13341 TEST=unittests Committed: http://chrome-svn/viewvc/chromeos?view=rev&revision=bdfaaf0

Patch Set 1 #

Patch Set 2 : remove debug log statement #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+125 lines, -46 lines) Patch
M delta_performer.cc View 1 chunk +2 lines, -1 line 0 comments Download
M delta_performer_unittest.cc View 2 chunks +8 lines, -2 lines 0 comments Download
M payload_signer.h View 1 chunk +3 lines, -0 lines 4 comments Download
M payload_signer.cc View 1 5 chunks +39 lines, -4 lines 2 comments Download
M payload_signer_unittest.cc View 3 chunks +48 lines, -20 lines 0 comments Download
M unittest_key.pem View 1 chunk +25 lines, -13 lines 0 comments Download
D unittest_key.pub.pem View 1 chunk +0 lines, -6 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
adlr
9 years, 9 months ago (2011-03-29 21:35:41 UTC) #1
petkov
I think sosa's AU harness might be using the public key.
9 years, 9 months ago (2011-03-29 22:05:11 UTC) #2
sosa
I do :( On Tue, Mar 29, 2011 at 3:05 PM, <petkov@chromium.org> wrote: > I ...
9 years, 9 months ago (2011-03-29 22:47:45 UTC) #3
sosa
s/I/it On Tue, Mar 29, 2011 at 3:47 PM, Chris Sosa <sosa@chromium.org> wrote: > I ...
9 years, 9 months ago (2011-03-29 22:48:07 UTC) #4
adlr
Is it too much of a hassle to generate it? It would be nice not ...
9 years, 9 months ago (2011-03-29 22:59:38 UTC) #5
gauravsh
So, overall this looks fine but are you ok with keeping the key size fixed ...
9 years, 9 months ago (2011-03-29 23:04:05 UTC) #6
gauravsh
http://codereview.chromium.org/6771024/diff/9/payload_signer.cc File payload_signer.cc (right): http://codereview.chromium.org/6771024/diff/9/payload_signer.cc#newcode139 payload_signer.cc:139: vector<char> padded_hash(hash); should you check here that this is ...
9 years, 9 months ago (2011-03-29 23:04:50 UTC) #7
sosa
Very well. http://codereview.chromium.org/6775011/ On Tue, Mar 29, 2011 at 4:04 PM, <gauravsh@chromium.org> wrote: > > ...
9 years, 9 months ago (2011-03-29 23:15:22 UTC) #8
adlr
Awesome, thanks, Chris! -andrew On Tue, Mar 29, 2011 at 4:15 PM, Chris Sosa <sosa@chromium.org> ...
9 years, 9 months ago (2011-03-29 23:24:57 UTC) #9
sosa
Pushed my CL. Ctest no longer has the dependency :) On Tue, Mar 29, 2011 ...
9 years, 9 months ago (2011-03-29 23:43:06 UTC) #10
adlr
Hey, PTAL. I pushed b/c I mistakenly thought you had LGTMed, but I now see ...
9 years, 8 months ago (2011-03-30 19:40:14 UTC) #11
gauravsh
9 years, 8 months ago (2011-03-31 17:48:02 UTC) #12
Can you upload the new patchset?

What about the key size issue? I can easily see the 2K-bit key
restriction becoming a problem in the future. In any case, if 2K bit
keys are the only ones supported, there should be checks for that to
avoid problems like Sosa's test had.

On Wed, Mar 30, 2011 at 12:40 PM,  <adlr@chromium.org> wrote:
> Hey, PTAL.
>
> I pushed b/c I mistakenly thought you had LGTMed, but I now see you haven't.
> I'm
> sorry.
>
> If you see any issues, I'll fix them immediately, or I can rollback if
> necessary.
>
> -andrew
>
>
> http://codereview.chromium.org/6771024/diff/9/payload_signer.cc
> File payload_signer.cc (right):
>
> http://codereview.chromium.org/6771024/diff/9/payload_signer.cc#newcode139
> payload_signer.cc:139: vector<char> padded_hash(hash);
> On 2011/03/29 23:04:50, gauravsh wrote:
>>
>> should you check here that this is indeed the size that you expect?
>
> Done.
>
> http://codereview.chromium.org/6771024/diff/9/payload_signer.h
> File payload_signer.h (right):
>
> http://codereview.chromium.org/6771024/diff/9/payload_signer.h#newcode70
> payload_signer.h:70: // Pads a SHA256 hash so that it may be
> encrypted/signed with RSA2048.
> On 2011/03/29 23:04:05, gauravsh wrote:
>>
>> just a add a comment that this pads using the PKCS#1 v1.5 scheme.
>
> (there are
>>
>> multiple types of padding schemes)
>
> Done.
>
> http://codereview.chromium.org/6771024/diff/9/payload_signer.h#newcode72
> payload_signer.h:72: static bool PadRSA2048SHA256Hash(std::vector<char>*
> hash);
> On 2011/03/29 23:04:05, gauravsh wrote:
>>
>> comment on what |hash| is? Also that in-place modifies the hash.
>
> Done.
>
> http://codereview.chromium.org/6771024/
>



-- 
-g

Powered by Google App Engine
This is Rietveld 408576698