Package tss.tpm

Class TPMS_ALGORITHM_DETAIL_ECC

  • All Implemented Interfaces:
    TpmMarshaller

    public class TPMS_ALGORITHM_DETAIL_ECC
    extends TpmStructure
    This structure is used to report on the curve parameters of an ECC curve. It is returned by TPM2_ECC_Parameters().
    • Field Detail

      • keySize

        public int keySize
        Size in bits of the key
      • kdf

        public TPMU_KDF_SCHEME kdf
        If not TPM_ALG_NULL, the required KDF and hash algorithm used in secret sharing operations One of: TPMS_KDF_SCHEME_MGF1, TPMS_KDF_SCHEME_KDF1_SP800_56A, TPMS_KDF_SCHEME_KDF2, TPMS_KDF_SCHEME_KDF1_SP800_108, TPMS_SCHEME_HASH, TPMS_NULL_KDF_SCHEME.
      • sign

        public TPMU_ASYM_SCHEME sign
        If not TPM_ALG_NULL, this is the mandatory signature scheme that is required to be used with this curve. 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.
      • p

        public byte[] p
        Fp (the modulus)
      • a

        public byte[] a
        Coefficient of the linear term in the curve equation
      • b

        public byte[] b
        Constant term for curve equation
      • gX

        public byte[] gX
        X coordinate of base point G
      • gY

        public byte[] gY
        Y coordinate of base point G
      • n

        public byte[] n
        Order of G
      • h

        public byte[] h
        Cofactor (a size of zero indicates a cofactor of 1)
    • Constructor Detail

      • TPMS_ALGORITHM_DETAIL_ECC

        public TPMS_ALGORITHM_DETAIL_ECC()
      • TPMS_ALGORITHM_DETAIL_ECC

        public TPMS_ALGORITHM_DETAIL_ECC​(TPM_ECC_CURVE _curveID,
                                         int _keySize,
                                         TPMU_KDF_SCHEME _kdf,
                                         TPMU_ASYM_SCHEME _sign,
                                         byte[] _p,
                                         byte[] _a,
                                         byte[] _b,
                                         byte[] _gX,
                                         byte[] _gY,
                                         byte[] _n,
                                         byte[] _h)
        Parameters:
        _curveID - Identifier for the curve
        _keySize - Size in bits of the key
        _kdf - If not TPM_ALG_NULL, the required KDF and hash algorithm used in secret sharing operations One of: TPMS_KDF_SCHEME_MGF1, TPMS_KDF_SCHEME_KDF1_SP800_56A, TPMS_KDF_SCHEME_KDF2, TPMS_KDF_SCHEME_KDF1_SP800_108, TPMS_SCHEME_HASH, TPMS_NULL_KDF_SCHEME.
        _sign - If not TPM_ALG_NULL, this is the mandatory signature scheme that is required to be used with this curve. 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.
        _p - Fp (the modulus)
        _a - Coefficient of the linear term in the curve equation
        _b - Constant term for curve equation
        _gX - X coordinate of base point G
        _gY - Y coordinate of base point G
        _n - Order of G
        _h - Cofactor (a size of zero indicates a cofactor of 1)
    • Method Detail

      • kdfScheme

        public TPM_ALG_ID kdfScheme()
        Scheme selector
      • signScheme

        public TPM_ALG_ID signScheme()
        Scheme selector
      • toTpm

        public byte[] toTpm()
        Deprecated.
        Returns:
        Wire (marshaled) representation of this object
      • fromBytes

        public static TPMS_ALGORITHM_DETAIL_ECC 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_ALGORITHM_DETAIL_ECC 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_ALGORITHM_DETAIL_ECC 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