Package tss.tpm
Class TPMS_RSA_PARMS
- java.lang.Object
-
- tss.TpmStructure
-
- tss.tpm.TPMS_RSA_PARMS
-
- All Implemented Interfaces:
TPMU_PUBLIC_PARMS
,TpmMarshaller
,TpmUnion
public class TPMS_RSA_PARMS extends TpmStructure implements TPMU_PUBLIC_PARMS
A TPM compatible with this specification and supporting RSA shall support two primes and an exponent of zero. An exponent of zero indicates that the exponent is the default of 216 + 1. Support for other values is optional. Use of other exponents in duplicated keys is not recommended because the resulting keys would not be interoperable with other TPMs.
-
-
Field Summary
Fields Modifier and Type Field Description int
exponent
The public exponent A prime number greater than 2.int
keyBits
Number of bits in the public modulusTPMU_ASYM_SCHEME
scheme
Scheme.scheme shall be: for an unrestricted signing key, either TPM_ALG_RSAPSS TPM_ALG_RSASSA or TPM_ALG_NULL for a restricted signing key, either TPM_ALG_RSAPSS or TPM_ALG_RSASSA for an unrestricted decryption key, TPM_ALG_RSAES, TPM_ALG_OAEP, or TPM_ALG_NULL unless the object also has the sign attribute for a restricted decryption key, TPM_ALG_NULL NOTE When both sign and decrypt are SET, restricted shall be CLEAR and scheme shall be TPM_ALG_NULL.TPMT_SYM_DEF_OBJECT
symmetric
For a restricted decryption key, shall be set to a supported symmetric algorithm, key size, and mode.
-
Constructor Summary
Constructors Constructor Description TPMS_RSA_PARMS()
TPMS_RSA_PARMS(TPMT_SYM_DEF_OBJECT _symmetric, TPMU_ASYM_SCHEME _scheme, int _keyBits, int _exponent)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static TPMS_RSA_PARMS
fromBytes(byte[] byteBuf)
Static marshaling helperstatic TPMS_RSA_PARMS
fromTpm(byte[] byteBuf)
Deprecated.UsefromBytes(byte[])
insteadstatic TPMS_RSA_PARMS
fromTpm(TpmBuffer buf)
Static marshaling helperTPM_ALG_ID
GetUnionSelector()
TpmUnion methodvoid
initFromTpm(TpmBuffer buf)
TpmMarshaller methodTPM_ALG_ID
schemeScheme()
Scheme selectorString
toString()
void
toStringInternal(TpmStructurePrinter _p, int d)
Serialize this object to the structure printerbyte[]
toTpm()
Deprecated.UseTpmStructure.toBytes()
insteadvoid
toTpm(TpmBuffer buf)
TpmMarshaller method-
Methods inherited from class tss.TpmStructure
equals, hashCode, toBytes
-
-
-
-
Field Detail
-
symmetric
public TPMT_SYM_DEF_OBJECT symmetric
For a restricted decryption key, shall be set to a supported symmetric algorithm, key size, and mode. if the key is not a restricted decryption key, this field shall be set to TPM_ALG_NULL.
-
scheme
public TPMU_ASYM_SCHEME scheme
Scheme.scheme shall be: for an unrestricted signing key, either TPM_ALG_RSAPSS TPM_ALG_RSASSA or TPM_ALG_NULL for a restricted signing key, either TPM_ALG_RSAPSS or TPM_ALG_RSASSA for an unrestricted decryption key, TPM_ALG_RSAES, TPM_ALG_OAEP, or TPM_ALG_NULL unless the object also has the sign attribute for a restricted decryption key, TPM_ALG_NULL NOTE When both sign and decrypt are SET, restricted shall be CLEAR and scheme shall be TPM_ALG_NULL. One of: TPMS_KEY_SCHEME_ECDH, TPMS_KEY_SCHEME_ECMQV, TPMS_SIG_SCHEME_RSASSA, TPMS_SIG_SCHEME_RSAPSS, TPMS_SIG_SCHEME_ECDSA, TPMS_SIG_SCHEME_ECDAA, TPMS_SIG_SCHEME_SM2, TPMS_SIG_SCHEME_ECSCHNORR, TPMS_ENC_SCHEME_RSAES, TPMS_ENC_SCHEME_OAEP, TPMS_SCHEME_HASH, TPMS_NULL_ASYM_SCHEME.
-
keyBits
public int keyBits
Number of bits in the public modulus
-
exponent
public int exponent
The public exponent A prime number greater than 2.
-
-
Constructor Detail
-
TPMS_RSA_PARMS
public TPMS_RSA_PARMS()
-
TPMS_RSA_PARMS
public TPMS_RSA_PARMS(TPMT_SYM_DEF_OBJECT _symmetric, TPMU_ASYM_SCHEME _scheme, int _keyBits, int _exponent)
- Parameters:
_symmetric
- For a restricted decryption key, shall be set to a supported symmetric algorithm, key size, and mode. if the key is not a restricted decryption key, this field shall be set to TPM_ALG_NULL._scheme
- Scheme.scheme shall be: for an unrestricted signing key, either TPM_ALG_RSAPSS TPM_ALG_RSASSA or TPM_ALG_NULL for a restricted signing key, either TPM_ALG_RSAPSS or TPM_ALG_RSASSA for an unrestricted decryption key, TPM_ALG_RSAES, TPM_ALG_OAEP, or TPM_ALG_NULL unless the object also has the sign attribute for a restricted decryption key, TPM_ALG_NULL NOTE When both sign and decrypt are SET, restricted shall be CLEAR and scheme shall be TPM_ALG_NULL. One of: TPMS_KEY_SCHEME_ECDH, TPMS_KEY_SCHEME_ECMQV, TPMS_SIG_SCHEME_RSASSA, TPMS_SIG_SCHEME_RSAPSS, TPMS_SIG_SCHEME_ECDSA, TPMS_SIG_SCHEME_ECDAA, TPMS_SIG_SCHEME_SM2, TPMS_SIG_SCHEME_ECSCHNORR, TPMS_ENC_SCHEME_RSAES, TPMS_ENC_SCHEME_OAEP, TPMS_SCHEME_HASH, TPMS_NULL_ASYM_SCHEME._keyBits
- Number of bits in the public modulus_exponent
- The public exponent A prime number greater than 2.
-
-
Method Detail
-
schemeScheme
public TPM_ALG_ID schemeScheme()
Scheme selector
-
GetUnionSelector
public TPM_ALG_ID GetUnionSelector()
TpmUnion method- Specified by:
GetUnionSelector
in interfaceTPMU_PUBLIC_PARMS
-
toTpm
public void toTpm(TpmBuffer buf)
TpmMarshaller method- Specified by:
toTpm
in interfaceTpmMarshaller
- Overrides:
toTpm
in classTpmStructure
- Parameters:
buf
- An output byte buffer
-
initFromTpm
public void initFromTpm(TpmBuffer buf)
TpmMarshaller method- Specified by:
initFromTpm
in interfaceTpmMarshaller
- Overrides:
initFromTpm
in classTpmStructure
- Parameters:
buf
- An input byte buffer
-
toTpm
public byte[] toTpm()
Deprecated.UseTpmStructure.toBytes()
instead- Returns:
- Wire (marshaled) representation of this object
-
fromBytes
public static TPMS_RSA_PARMS fromBytes(byte[] byteBuf)
Static marshaling helper- Parameters:
byteBuf
- Wire representation of the object- Returns:
- New object constructed from its wire representation
-
fromTpm
public static TPMS_RSA_PARMS fromTpm(byte[] byteBuf)
Deprecated.UsefromBytes(byte[])
instead- Parameters:
byteBuf
- Wire representation of the object- Returns:
- New object constructed from its wire representation
-
fromTpm
public static TPMS_RSA_PARMS fromTpm(TpmBuffer buf)
Static marshaling helper- Parameters:
buf
- Wire representation of the object- Returns:
- New object constructed from its wire representation
-
toStringInternal
public void toStringInternal(TpmStructurePrinter _p, int d)
Description copied from class:TpmStructure
Serialize this object to the structure printer- Overrides:
toStringInternal
in classTpmStructure
- Parameters:
_p
- The structure accumulatord
- The data to serialize
-
-