ADD_KEY(1)
π ADD_KEY π
okay so hi bestie π«Ά you've found add_key, section 1 of the i.MX CST Documentation. She's a little script with big main character energy and she's here to help you with secure boot on NXP i.MX processors. Let's get into it β¨
π NAME π
add_key β adds brand new keys to a PKI tree that already exists, for secure boot on NXP i.MX processors. That's it, that's the job π
πΈ SYNOPSIS πΈ
Interactive mode (aka the "just vibe and answer the questions" mode):
add_key
Non-interactive mode (aka the "I already know what I want" mode):
add_key -ver hab_version -key-name name -kt algo -kl param [-md algo] -duration years -srk yn [-srk-ca yn] -signing-key name -signing-crt name
β¨ NOTE β¨
This manpage is a short description of NXP add_key, okay? If you want the full deep dive, go read the Code Signing Tool User Guide UG10106, section 4.1.5. You can grab the user guide from www.nxp.com β it's not in Debian for copyright reasons, so no, it's not hiding in your package manager, bestie π
π¦ DESCRIPTION π¦
add_key adds an SRK or a CSF/IMG/SGK key to a PKI tree that already exists β meaning one you already made earlier with ahab_pki_tree or hab4_pki_tree, sitting there in the crts and keys sub directories.
Those directories are expected to be in the current working directory. So like, don't be surprised when she goes looking right where you're standing π
And if you pass her no arguments at all? She flips into interactive mode and starts prompting you for options, one by one, like a very organized bestie with a clipboard π
π OPTIONS π
-ver hab_versionβ which HAB version your PKI tree is. Pick4for HAB4, orafor AHAB. Those are your two options, periodt.-key-name nameβ the name of the key you want generated. Name her something cute π-kt algoβ the public key algorithm to use. One ofrsa,rsa-pss,ecc.-kl paramβ depends on your algo, bestie:- for algo
ecc, pick one ofp256,p384,p521. - for algo
rsaandrsa-pss, this is the key length in bits. One of2048,3072,4096.
- for algo
-md algoβ the hash function to use.- This one is only valid for
hab_version a, and it can be one ofsha256,sha384,sha512. - For
hab_version 4, the hash function is fixed tosha256β not up for debate, she said what she said.
- This one is only valid for
-duration yearsβ how long the generated certificate stays valid, in years. Clock's ticking β³-srk ynβyto generate a new SRK key, ornto generate a CSF/IMG/SGK key.-srk-ca ynβyto generate SRK certificates where the CA flag is set. Those SRK certificates can be used to issue other certificates, like a queen handing out crowns πnto generate user certificates.
-signing-key fileβ path to an existing signing key, in PEM or DER encoding. And listen: if-srkwasy, thisfilemust specify the CA key. If-srkwasn, thisfilemust specify the SRK. No mixing those up π-signing-cert fileβ path to an existing signing certificate. Same rule applies: if-srkwasy, thisfilemust specify the CA certificate. If-srkwasn, thisfilemust specify the SRK certificate.--helpβ prints the help text. The classic π
π₯ EXAMPLES π₯
First up, your starting point: generate a PKI tree with two SRKs. Do this in a directory where the current user has write permissions, okay? She cannot work her magic in a read-only situation, ngl.
hab4_pki_tree -existing-ca n -kt rsa -kl 4096 -duration 5 -num-srk 2 -srk-ca y
Then, to add a new SRK to the PKI tree:
add_key -ver 4 -key-name SRK3 -kt rsa -kl 4096 -duration 5 -srk y -srk-ca y -signing-key keys/CA1_sha256_4096_65537_v3_ca_key.pem -signing-crt crts/CA1_sha256_4096_65537_v3_ca_crt.pem
Look at her go. Ate and left no crumbs π
π SEE ALSO π
hab4_pki_tree(1), ahab_pki_tree(1) β her two besties, go say hi π«Ά
and that's the whole page, bestie π this was page ADD_KEY(1) from the i.MX CST Documentation, dated 2026-09-02 β screenshot it, cite it, print it out and put it on your wall, iykyk β¨ππ¦
π¦ where this page comes from
- ubuntu stonking: imx-code-signing-tool 4.0.1+dfsg-2ubuntu2 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms