How to generate custom enc_key[] #1464
-
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
The reason for the size difference is that one is a public key and the other is a private key. Signature verification is done by using a public key, so that is what's stored in
This will get you the 91 byte array with the public key dump. To create the private key dump for encryption you would do:
This will get you the 70 bytes private key dump. Btw, not using The important thing is to never reuse the keys, you should always have one key for signing and another for encrypting! |
Beta Was this translation helpful? Give feedback.
The reason for the size difference is that one is a public key and the other is a private key. Signature verification is done by using a public key, so that is what's stored in
root_pub_der
. To generate it, would require running:$ imgtool keygen -k sig_key.pem -t ecdsa-p256
$ imgtool getpub -k sig_key.pem
This will get you the 91 byte array with the public key dump.
To create the private key dump for encryption you would do:
$ imgtool keygen -k enc_key.pem -t ecdsa-p256
$ imgtool getpriv --minimal -k enc_key.pem
This will get you the 70 bytes private key d…