Package tss.tpm

Class 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 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
      • toTpm

        public byte[] toTpm()
        Deprecated.
        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.
        Use fromBytes(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 class TpmStructure
        Parameters:
        _p - The structure accumulator
        d - The data to serialize