tpm2_geteccparameters(1)
๐ tpm2_geteccparameters(1) โ like, the General Commands Manual, bestie ๐
okay so real talk: this is a page from tpm2-tools, and it's literally the manual for tpm2_geteccparameters(1). Buckle up, she's a long one but we're gonna get through it together ๐ซถ
โจ NAME โจ
tpm2_geteccparameters(1) โ grabs the parameters of an ECC curve, and the curve is identified by its TCG-assigned curveID. that's it, that's the whole vibe ๐ซ
โจ SYNOPSIS โจ
tpm2_geteccparameters [OPTIONS]
โจ DESCRIPTION โจ
tpm2_geteccparameters(1) โ Retrieves the parameters of an ECC curve identified by its TCG-assigned curveID. yes she's repeating herself, but honestly? iconic. no cap, that's the entire job ๐
โจ OPTIONS โจ
ARGUMENT=ALGORITHMโ specify which ECC curve you want, bestie. example:ecc521๐ธ-o,--output=FILEโ tell her where to save the ECC parameters (the file path, specifically) ๐พ--cphash=FILEโ file path where the hash of the command parameters gets recorded. people usually call this the cpHash. โ ๏ธ big important NOTE: when you pick this option, the tool will not actually execute the command โ it just hands you a cpHash and that's it. so don't come crying that nothing happened ๐ญ
๐ References
๐ฎ Algorithm Specifiers
options that take algorithms support โnice-namesโ. cute, right?
there are two major algorithm specification string classes: simple and complex. and heads up โ only certain algorithms will be accepted by the TPM, based on usage and conditions. the TPM is picky like that ๐
๐ผ Simple specifiers
these are strings with no additional specification data. when you're creating objects, any non-specified portions of an object are assumed to be defaults. the list of known โSimple Specifiersโ is right below ๐
๐ฆ Asymmetric
rsaecc
๐ Symmetric
aescamelliasm4
๐ Hashing Algorithms
sha1sha256sha384sha512sm3_256sha3_256sha3_384sha3_512
๐ Keyed Hash
hmacxor
โจ Signing Schemes
rsassarsapssecdsaecdaaecschnorrsm2
๐ Asymmetric Encryption Schemes
oaeprsaesecdh
๐ง Modes
ctrofbcbccfbecb
โญ Misc
null
๐ธ Complex Specifiers
when objects get specified for creation by the TPM, they've got numerous algorithms to populate in the public data. stuff like type, scheme and asymmetric details, key size, etc. the general format for specifying this data is:
<type>:<scheme>:<symmetric-details>
๐ Type Specifiers
this portion of the complex algorithm specifier is required. the remaining scheme and symmetric details will default based on the type specified and the type of the object being created. no skipping this one, bestie ๐จ
aesโ Default AES:aes128aes128<mode>โ 128 bit AES with optional mode (ctr|ofb|cbc|cfb|ecb). if mode is not specified, it defaults tonull.aes192<mode>โ same asaes128<mode>, except for a 192 bit key size.aes256<mode>โ same asaes128<mode>, except for a 256 bit key size.sm4โ Default SM4:sm4128sm4128orsm4_128 <mode>โ 128 bit SM4 with optional mode (ctr|ofb|cbc|cfb|ecb). if mode is not specified, it defaults tonull.eccโ Elliptical Curve, defaults toecc256.ecc192orecc_nist_p192โ 192 bit ECC NIST curveecc224orecc_nist_p224โ 224 bit ECC NIST curveecc256orecc_nist_p256โ 256 bit ECC NIST curveecc384orecc_nist_p384โ 384 bit ECC NIST curveecc521orecc_nist_p521โ 521 bit ECC NIST curveecc_sm2orecc_sm2_p256โ 256 bit SM2 curversaโ Default RSA:rsa2048rsa1024โ RSA with 1024 bit keysize.rsa2048โ RSA with 2048 bit keysize.rsa3072โ RSA with 3072 bit keysize.rsa4096โ RSA with 4096 bit keysize.
๐ซ Scheme Specifiers
next up is an optional field โ you can literally just skip it, no pressure ๐ซถ
schemes are usually Signing Schemes or Asymmetric Encryption Schemes. most signing schemes take a hash algorithm directly following the signing scheme. if the hash algorithm is missing, it defaults to sha256. some take no arguments, and some take multiple arguments. chaotic, i know.
๐ง Hash Optional Scheme Specifiers
these scheme specifiers are followed by a dash and a valid hash algorithm. for example: oaep-sha256.
oaepecdhrsassarsapssecdsaecschnorrsm2
๐ฐ Multiple Option Scheme Specifiers
this scheme specifier is followed by a count (max size UINT16) then followed by a dash (-) and a valid hash algorithm. * ecdaa for example, ecdaa4-sha256. if no count is specified, it defaults to 4.
๐ฏ No Option Scheme Specifiers
this scheme specifier takes NO arguments. * rsaes
๐ฆข Symmetric Details Specifiers
this field is optional, and defaults based on the type of object being created and it's attributes. generally, any valid Symmetric specifier from the Type Specifiers list should work. if not specified, an asymmetric object's symmetric details defaults to aes128cfb. slay ๐
๐ Examples
create an rsa2048 key with an rsaes asymmetric encryption scheme
tpm2_create -C parent.ctx -G rsa2048:rsaes -u key.pub -r key.priv
create an ecc256 key with an ecdaa signing scheme with a count of 4 and sha384 hash
/tpm2_create -C parent.ctx -G ecc256:ecdaa4-sha384 -u key.pub -r key.priv cryptographic algorithms ALGORITHM.
๐ COMMON OPTIONS ๐
this collection of options are common to many programs and provide information that many users may expect. the friend group of options, if you will ๐ฏโโ๏ธ
-h,--help=[man|no-man]โ Display the tool's manpage. by default, it attempts to invoke the manpager for the tool, however, on failure it will output a short tool summary. this is the same behavior if the โmanโ option argument is specified, however if explicit โmanโ is requested, the tool will provide errors from man on stderr. if the โno-manโ option is specified, or the manpager fails, the short options will be output to stdout.
to successfully use the manpages feature you need the manpages installed or onMANPATH. seeman(1)for more details. iykyk ๐
-v,--versionโ Display version information for this tool, supported tctis and exit. ๐-V,--verboseโ Increase the information that the tool prints to the console during its execution. when using this option the file and line number are printed. she's chatty and we love her ๐ฃ๏ธ-Q,--quietโ Silence normal tool output to stdout. ๐คซ-Z,--enable-errataโ Enable the application of errata fixups. useful if an errata fixup needs to be applied to commands sent to the TPM. defining the environmentTPM2TOOLS_ENABLE_ERRATAis equivalent. ๐ง-z,--pwd-sessionโ Use password session instead of a HMAC session for authentication. a clear text password is passed to the TPM to authorize the action. this option can be used to avoid problems when unsalted sessions are used in OpenSSL FIPS mode. if auth values are used a salted session should be used for authentication. ๐-R,--autoflushโ Enable autoflush for transient objects created by the command. if a parent object is loaded from a context file also the transient parent object will be flushed. autoflush can also be activated if the environment variableTPM2TOOLS_AUTOFLUSHis is set toyesortrue. ๐ฝโจ
information many users may expect.
๐ก TCTI Configuration
the TCTI or โTransmission Interfaceโ is the communication mechanism with the TPM. TCTIs can be changed for communication with TPMs across different mediums. she's the group chat bridge between you and the TPM ๐ฌ
to control the TCTI, the tools respect:
- the command line option
-Tor--tcti - the environment variable:
TPM2TOOLS_TCTI.
Note: the command line option always overrides the environment variable. no arguing ๐ซต
the current known TCTIs are:
tabrmdโ the resource manager, calledtabrmd. note thattabrmdandabrmdas a tcti name are synonymous. two names, one queen ๐mssimโ typically used for communicating to the TPM software simulator.deviceโ used when talking directly to a TPM device file.noneโ do not initalize a connection with the TPM. some tools allow for off-tpm options and thus support not using a TCTI. tools that do not support it will error when attempted to be used without a TCTI connection. does not support ANY options and MUST BE presented as the exact text of โnoneโ. she's strict like that ๐ซ
the arguments to either the command line option or the environment variable are in the form:
<tcti-name>:<tcti-option-config>
specifying an empty string for either the <tcti-name> or <tcti-option-config> results in the default being used for that portion respectively. ๐ซง
๐ TCTI Defaults
when a TCTI is not specified, the default TCTI is searched for using dlopen(3) semantics. the tools will search for tabrmd, device and mssim TCTIs IN THAT ORDER and USE THE FIRST ONE FOUND. you can query what TCTI will be chosen as the default by using the -v option to print the version information. the โdefault-tctiโ key-value pair will indicate which of the aforementioned TCTIs is the default. first come, first served fr fr ๐
๐ง Custom TCTIs
any TCTI that implements the dynamic TCTI interface can be loaded. the tools internally use dlopen(3), and the raw tcti-name value is used for the lookup. thus, this could be a path to the shared library, or a library name as understood by dlopen(3) semantics. bring your own, bestie ๐
๐ TCTI OPTIONS
this collection of options are used to configure the various known TCTI modules available:
deviceโ for the device TCTI, the TPM character device file for use by the device TCTI can be specified. the default is/dev/tpm0.
example: -T device:/dev/tpm0 or export TPM2TOOLS_TCTI=โdevice:/dev/tpm0โ
mssimโ for the mssim TCTI, the domain name or IP address and port number used by the simulator can be specified. the defaults are127.0.0.1and2321.
example: -T mssim:host=localhost,port=2321 or export TPM2TOOLS_TCTI=โmssim:host=localhost,port=2321โ
abrmdโ for the abrmd TCTI, the configuration string format is a series of simple key value pairs separated by a,character. each key and value string are separated by a=character.
TCTI abrmd supports two keys:
bus_name: the name of the tabrmd service on the bus (a string).bus_type: the type of the dbus instance (a string) limited tosessionandsystem.
specify the tabrmd tcti name and a config string of bus_name=com.example.FooBar:
\--tcti=tabrmd:bus_name=com.example.FooBar
specify the default (abrmd) tcti and a config string of bus_type=session:
\--tcti:bus_type=session
NOTE:abrmdandtabrmdare synonymous. the various known TCTI modules. ๐ซถ
๐ EXAMPLES ๐
tpm2_geteccparameters ecc256 -o ecc.params
look at her go ๐ญ๐
๐ Returns
tools can return any of the following codes:
0โ Success. ๐1โ General non-specific error. ๐2โ Options handling error. ๐3โ Authentication error. ๐4โ TCTI related error. ๐ก5โ Non supported scheme. applicable totpm2_testparams.
๐ BUGS
Github Issues โ yes, that's where you go. go tell 'em ๐ซก
๐ HELP
See the Mailing List ๐ฌ
โ๏ธ License
this work is licensed under the Creative Commons Attribution 4.0 International License (CC BY 4.0). ๐
and that's the whole page, bestie ๐โจ this has been tpm2_geteccparameters(1) from the tpm2-tools package โ mwah, go touch some ECC curves ๐
๐ฆ
๐ฆ where this page comes from
- arch rolling: tpm2-tools 5.8-1 ยท BSD-3-Clause
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms