summaryrefslogtreecommitdiff
path: root/scripts/update_device.py
diff options
context:
space:
mode:
authorxunchang <xunchang@google.com>2019-03-26 15:41:14 -0700
committerTianjie Xu <xunchang@google.com>2019-04-02 01:32:28 +0000
commitcda3c034bc46a4040dcd31a3a512ffd56dfe28c2 (patch)
tree08047606804777795fcadd27cd8f6aec4af7f45c /scripts/update_device.py
parent8546a717e5389bb9cb5067f4eb139520802a7537 (diff)
Support signing payload with 4096 bits RSA keys
The 32 bytes sha256 hash was padded to 256 bytes before payload signing and verification. During the padding, we appended a hard coded header according to RFC3447 spec. As we want to support signing with 4096 bits keys, the format of the padding doesn't change but the length needs adjustion. Now callers will pass in the RSA size in bytes in the padding function. And the verification function will now take the raw 32 bytes sha256 hash instead of the padded value. The new key for unittest is generated by: openssl genrsa -out unittest_key_RSA4096.pem 4096 Bug: 129163830 Test: unit tests pass, create and install an update signed by 4096 bits key. Change-Id: I8e0d02ddb1472e22976c0f170e8bf2b8b094c7d4
Diffstat (limited to 'scripts/update_device.py')
0 files changed, 0 insertions, 0 deletions