+46
−0
+18
−3
Loading
This applies a few improvements to a commit previously included in PR #596: * Move functions to dump a private key to the private key classes * Remove language option; always dumps in C format * Add option to generate a minimal dump. This will remove extra parameters that are present in keys generated with the `keygen` command. For P256 this will remove the public point, which is already ignored by the parsing function. The resulting key dump shrinks from 138 to 70 bytes. For RSA it will remove the DP/DQ/QP parameters which are only used with CRT enabled, and if not available, can be calculated at runtime. This reduces the size of a key dump from around 1190 bytes to somewhere close to 800 bytes. A patch to the RSA parsing routine will be added in another commit. Signed-off-by:Fabio Utzig <utzig@apache.org> Signed-off-by:
Ioannis Konstantelias <ikonstadel@gmail.com>
CRA Git | Maintained and supported by SUSTech CRA and CCSE