There are 2 types of RSA keys in EC repository:
- exponent F4 (0x10001), example board/hoho/dev_key.pem
- exponent 3, example board/hammer/dev_key.pem
# openssl rsa -in hoho/dev_key.pem -noout -text | grep publicExponent
publicExponent: 65537 (0x10001)
# openssl rsa -in hammer/dev_key.pem -noout -text | grep publicExponent
publicExponent: 3 (0x3)
We'd like to use exponent 3 keys for faster signature verification, however, futility does not seem to support it.
Basically, these instructions fail with an exponent 3 key:
futility create --desc "Key One" board/hoho/dev_key.pem foo
#Sign a RW binary and build a complete image out of the parts:
dd if=/dev/zero bs=$((65536 - 1024)) count=1 of=rw.bin
dd if=build/hammer/RW/ec.RW.flat of=rw.bin conv=notrunc
futility sign --type rwsig --prikey foo.vbprik2 build/hammer/RW/ec.RW.flat rw.bin.signed
dd if=/dev/zero bs=65536 count=1 of=image.bin
dd if=rw.bin of=image.bin conv=notrunc
dd if=rw.bin.signed bs=$((65536 - 1024)) seek=1 of=image.bin conv=notrunc
futility show --type rwsig --pubkey foo.vbpubk2 image.bin
Comment 1 by rspangler@chromium.org
, Jan 24 2017