Versions in this module Expand all Collapse all v1 v1.0.2 Nov 30, 2021 v1.0.1 Nov 30, 2021 Changes in this version + var RandReader = rand.Reader + var StrictOrderCheck = true + type Algorithm uint16 + const AlgECC + const AlgECDSA + const AlgNull + const AlgRSA + const AlgRSAPSS + const AlgRSASSA + const AlgSHA1 + const AlgSHA256 + const AlgSHA384 + const AlgSHA512 + const AlgSM2 + const AlgSM3 + const AlgUnknown + func GetAlgFromString(name string) (Algorithm, error) + func (a Algorithm) Hash() (hash.Hash, error) + func (a Algorithm) IsNull() bool + func (a Algorithm) String() string + func (v Algorithm) PrettyString(depth uint, withHeader bool, opts ...pretty.Option) string + func (v Algorithm) ReadFrom(r io.Reader) (int64, error) + func (v Algorithm) TotalSize() uint64 + func (v Algorithm) WriteTo(w io.Writer) (int64, error) + type BitSize uint16 + func (ks *BitSize) SetInBits(amountOfBits uint16) + func (ks *BitSize) SetInBytes(amountOfBytes uint16) + func (ks BitSize) InBits() uint16 + func (ks BitSize) InBytes() uint16 + func (v BitSize) PrettyString(depth uint, withHeader bool, opts ...pretty.Option) string + func (v BitSize) ReadFrom(r io.Reader) (int64, error) + func (v BitSize) TotalSize() uint64 + func (v BitSize) WriteTo(w io.Writer) (int64, error) + type ChipsetACModuleInformation struct + AcmRevision [3]uint8 + AcmVersion uint8 + Capabilities uint32 + ChipsetACMType uint8 + ChipsetIDList uint32 + Length uint16 + MinMleHeaderVer uint32 + OsSinitDataVer uint32 + ProcessorIDList uint32 + UUID [16]byte + Version uint8 + func NewChipsetACModuleInformation() *ChipsetACModuleInformation + func (s *ChipsetACModuleInformation) AcmRevisionOffset() uint64 + func (s *ChipsetACModuleInformation) AcmRevisionTotalSize() uint64 + func (s *ChipsetACModuleInformation) AcmVersionOffset() uint64 + func (s *ChipsetACModuleInformation) AcmVersionTotalSize() uint64 + func (s *ChipsetACModuleInformation) CapabilitiesOffset() uint64 + func (s *ChipsetACModuleInformation) CapabilitiesTotalSize() uint64 + func (s *ChipsetACModuleInformation) ChipsetACMTypeOffset() uint64 + func (s *ChipsetACModuleInformation) ChipsetACMTypeTotalSize() uint64 + func (s *ChipsetACModuleInformation) ChipsetIDListOffset() uint64 + func (s *ChipsetACModuleInformation) ChipsetIDListTotalSize() uint64 + func (s *ChipsetACModuleInformation) LengthOffset() uint64 + func (s *ChipsetACModuleInformation) LengthTotalSize() uint64 + func (s *ChipsetACModuleInformation) MinMleHeaderVerOffset() uint64 + func (s *ChipsetACModuleInformation) MinMleHeaderVerTotalSize() uint64 + func (s *ChipsetACModuleInformation) OsSinitDataVerOffset() uint64 + func (s *ChipsetACModuleInformation) OsSinitDataVerTotalSize() uint64 + func (s *ChipsetACModuleInformation) PrettyString(depth uint, withHeader bool, opts ...pretty.Option) string + func (s *ChipsetACModuleInformation) ProcessorIDListOffset() uint64 + func (s *ChipsetACModuleInformation) ProcessorIDListTotalSize() uint64 + func (s *ChipsetACModuleInformation) ReadFrom(r io.Reader) (int64, error) + func (s *ChipsetACModuleInformation) Rehash() + func (s *ChipsetACModuleInformation) RehashRecursive() + func (s *ChipsetACModuleInformation) TotalSize() uint64 + func (s *ChipsetACModuleInformation) UUIDOffset() uint64 + func (s *ChipsetACModuleInformation) UUIDTotalSize() uint64 + func (s *ChipsetACModuleInformation) Validate() error + func (s *ChipsetACModuleInformation) VersionOffset() uint64 + func (s *ChipsetACModuleInformation) VersionTotalSize() uint64 + func (s *ChipsetACModuleInformation) WriteTo(w io.Writer) (int64, error) + type ChipsetACModuleInformationV5 struct + Base ChipsetACModuleInformation + TPMInfoList uint32 + func NewChipsetACModuleInformationV5() *ChipsetACModuleInformationV5 + func ParseChipsetACModuleInformation(r io.Reader) (int64, ChipsetACModuleInformationV5, error) + func (s *ChipsetACModuleInformationV5) BaseOffset() uint64 + func (s *ChipsetACModuleInformationV5) BaseTotalSize() uint64 + func (s *ChipsetACModuleInformationV5) PrettyString(depth uint, withHeader bool, opts ...pretty.Option) string + func (s *ChipsetACModuleInformationV5) ReadFrom(r io.Reader) (int64, error) + func (s *ChipsetACModuleInformationV5) Rehash() + func (s *ChipsetACModuleInformationV5) RehashRecursive() + func (s *ChipsetACModuleInformationV5) TPMInfoListOffset() uint64 + func (s *ChipsetACModuleInformationV5) TPMInfoListTotalSize() uint64 + func (s *ChipsetACModuleInformationV5) TotalSize() uint64 + func (s *ChipsetACModuleInformationV5) Validate() error + func (s *ChipsetACModuleInformationV5) WriteTo(w io.Writer) (int64, error) + type Element interface + GetStructInfo func() StructInfo + ReadDataFrom func(r io.Reader) (int64, error) + SetStructInfo func(StructInfo) + type ElementsContainer interface + GetFieldByStructID func(structID string) interface{} + type HashList struct + List []HashStructure + Size uint16 + func NewHashList() *HashList + func (s *HashList) ListOffset() uint64 + func (s *HashList) ListTotalSize() uint64 + func (s *HashList) PrettyString(depth uint, withHeader bool, opts ...pretty.Option) string + func (s *HashList) ReadFrom(r io.Reader) (int64, error) + func (s *HashList) Rehash() + func (s *HashList) RehashRecursive() + func (s *HashList) SizeOffset() uint64 + func (s *HashList) SizeTotalSize() uint64 + func (s *HashList) TotalSize() uint64 + func (s *HashList) Validate() error + func (s *HashList) WriteTo(w io.Writer) (int64, error) + type HashStructure struct + HashAlg Algorithm + HashBuffer []byte + func NewHashStructure() *HashStructure + func (s *HashStructure) HashAlgOffset() uint64 + func (s *HashStructure) HashAlgTotalSize() uint64 + func (s *HashStructure) HashBufferOffset() uint64 + func (s *HashStructure) HashBufferTotalSize() uint64 + func (s *HashStructure) PrettyString(depth uint, withHeader bool, opts ...pretty.Option) string + func (s *HashStructure) ReadFrom(r io.Reader) (int64, error) + func (s *HashStructure) Rehash() + func (s *HashStructure) RehashRecursive() + func (s *HashStructure) TotalSize() uint64 + func (s *HashStructure) Validate() error + func (s *HashStructure) WriteTo(w io.Writer) (int64, error) + type Key struct + Data []byte + KeyAlg Algorithm + KeySize BitSize + Version uint8 + func NewKey() *Key + func (k *Key) PrintBPMPubKey(bpmAlg Algorithm) error + func (k *Key) PrintKMPubKey(kmAlg Algorithm) error + func (k *Key) SetPubKey(key crypto.PublicKey) error + func (k Key) PubKey() (crypto.PublicKey, error) + func (s *Key) DataOffset() uint64 + func (s *Key) DataTotalSize() uint64 + func (s *Key) KeyAlgOffset() uint64 + func (s *Key) KeyAlgTotalSize() uint64 + func (s *Key) KeySizeOffset() uint64 + func (s *Key) KeySizeTotalSize() uint64 + func (s *Key) PrettyString(depth uint, withHeader bool, opts ...pretty.Option) string + func (s *Key) ReadFrom(r io.Reader) (int64, error) + func (s *Key) Rehash() + func (s *Key) RehashRecursive() + func (s *Key) TotalSize() uint64 + func (s *Key) Validate() error + func (s *Key) VersionOffset() uint64 + func (s *Key) VersionTotalSize() uint64 + func (s *Key) WriteTo(w io.Writer) (int64, error) + type KeySignature struct + Key Key + Signature Signature + Version uint8 + func NewKeySignature() *KeySignature + func (s *KeySignature) FillSignature(signAlgo Algorithm, pubKey crypto.PublicKey, signedData []byte, ...) error + func (s *KeySignature) KeyOffset() uint64 + func (s *KeySignature) KeyTotalSize() uint64 + func (s *KeySignature) PrettyString(depth uint, withHeader bool, opts ...pretty.Option) string + func (s *KeySignature) ReadFrom(r io.Reader) (int64, error) + func (s *KeySignature) Rehash() + func (s *KeySignature) RehashRecursive() + func (s *KeySignature) SetSignature(signAlgo Algorithm, privKey crypto.Signer, signedData []byte) error + func (s *KeySignature) SetSignatureAuto(privKey crypto.Signer, signedData []byte) error + func (s *KeySignature) SignatureOffset() uint64 + func (s *KeySignature) SignatureTotalSize() uint64 + func (s *KeySignature) TotalSize() uint64 + func (s *KeySignature) Validate() error + func (s *KeySignature) Verify(signedData []byte) error + func (s *KeySignature) VersionOffset() uint64 + func (s *KeySignature) VersionTotalSize() uint64 + func (s *KeySignature) WriteTo(w io.Writer) (int64, error) + type Manifest interface + type SVN uint8 + func (svn SVN) SVN() uint8 + type Signature struct + Data []byte + HashAlg Algorithm + KeySize BitSize + SigScheme Algorithm + Version uint8 + func NewSignature() *Signature + func (m *Signature) FillSignature(signAlgo Algorithm, pubKey crypto.PublicKey, signedData []byte, ...) error + func (m *Signature) SetSignature(signAlgo Algorithm, privKey crypto.Signer, signedData []byte) error + func (m *Signature) SetSignatureByData(sig SignatureDataInterface, hashAlgo Algorithm) error + func (m *Signature) SetSignatureData(sig SignatureDataInterface) error + func (m Signature) SignatureData() (SignatureDataInterface, error) + func (s *Signature) DataOffset() uint64 + func (s *Signature) DataTotalSize() uint64 + func (s *Signature) HashAlgOffset() uint64 + func (s *Signature) HashAlgTotalSize() uint64 + func (s *Signature) KeySizeOffset() uint64 + func (s *Signature) KeySizeTotalSize() uint64 + func (s *Signature) PrettyString(depth uint, withHeader bool, opts ...pretty.Option) string + func (s *Signature) ReadFrom(r io.Reader) (int64, error) + func (s *Signature) Rehash() + func (s *Signature) RehashRecursive() + func (s *Signature) SigSchemeOffset() uint64 + func (s *Signature) SigSchemeTotalSize() uint64 + func (s *Signature) TotalSize() uint64 + func (s *Signature) Validate() error + func (s *Signature) VersionOffset() uint64 + func (s *Signature) VersionTotalSize() uint64 + func (s *Signature) WriteTo(w io.Writer) (int64, error) + type SignatureDataInterface interface + Verify func(pk crypto.PublicKey, signedData []byte) error + func NewSignatureByData(signAlgo Algorithm, pubKey crypto.PublicKey, signedData []byte) (SignatureDataInterface, error) + func NewSignatureData(signAlgo Algorithm, privKey crypto.Signer, signedData []byte) (SignatureDataInterface, error) + type SignatureECDSA struct + R *big.Int + S *big.Int + func (s SignatureECDSA) String() string + func (s SignatureECDSA) Verify(pkIface crypto.PublicKey, signedData []byte) error + type SignatureRSAASA []byte + func (s SignatureRSAASA) String() string + func (s SignatureRSAASA) Verify(pkIface crypto.PublicKey, signedData []byte) error + type SignatureRSAPSS []byte + func (s SignatureRSAPSS) String() string + func (s SignatureRSAPSS) Verify(pkIface crypto.PublicKey, signedData []byte) error + type SignatureSM2 struct + R *big.Int + S *big.Int + func (s SignatureSM2) String() string + func (s SignatureSM2) Verify(pkIface crypto.PublicKey, signedData []byte) error + type StructInfo struct + ElementSize uint16 + ID StructureID + Variable0 uint8 + Version uint8 + func NewStructInfo() *StructInfo + func (s *StructInfo) ElementSizeOffset() uint64 + func (s *StructInfo) ElementSizeTotalSize() uint64 + func (s *StructInfo) IDOffset() uint64 + func (s *StructInfo) IDTotalSize() uint64 + func (s *StructInfo) PrettyString(depth uint, withHeader bool, opts ...pretty.Option) string + func (s *StructInfo) ReadFrom(r io.Reader) (int64, error) + func (s *StructInfo) Rehash() + func (s *StructInfo) RehashRecursive() + func (s *StructInfo) TotalSize() uint64 + func (s *StructInfo) Validate() error + func (s *StructInfo) Variable0Offset() uint64 + func (s *StructInfo) Variable0TotalSize() uint64 + func (s *StructInfo) VersionOffset() uint64 + func (s *StructInfo) VersionTotalSize() uint64 + func (s *StructInfo) WriteTo(w io.Writer) (int64, error) + func (s StructInfo) StructInfo() StructInfo + type Structure interface + PrettyString func(depth uint, withHeader bool, opts ...pretty.Option) string + TotalSize func() uint64 + type StructureID [8]byte + func (s StructureID) String() string + type TPM2PCRExtendPolicySupport uint8 + const TPM2PCRExtendBothPolicies + const TPM2PCRExtendIllegal + const TPM2PCRExtendMaximumAgilityPolicy + const TPM2PCRExtendMaximumPerformancePolicy + func (v TPM2PCRExtendPolicySupport) PrettyString(depth uint, withHeader bool, opts ...pretty.Option) string + func (v TPM2PCRExtendPolicySupport) ReadFrom(r io.Reader) (int64, error) + func (v TPM2PCRExtendPolicySupport) TotalSize() uint64 + func (v TPM2PCRExtendPolicySupport) WriteTo(w io.Writer) (int64, error) + type TPMCapabilities uint32 + func (cap TPMCapabilities) TPM2PCRExtendPolicySupport() TPM2PCRExtendPolicySupport + func (cap TPMCapabilities) TPMFamilySupport() TPMFamilySupport + func (v TPMCapabilities) PrettyString(depth uint, withHeader bool, opts ...pretty.Option) string + func (v TPMCapabilities) ReadFrom(r io.Reader) (int64, error) + func (v TPMCapabilities) TotalSize() uint64 + func (v TPMCapabilities) WriteTo(w io.Writer) (int64, error) + type TPMFamilySupport uint8 + func (familySupport TPMFamilySupport) IsDiscreteTPM12Supported() bool + func (familySupport TPMFamilySupport) IsDiscreteTPM20Supported() bool + func (familySupport TPMFamilySupport) IsFirmwareTPM20Supported() bool + func (v TPMFamilySupport) PrettyString(depth uint, withHeader bool, opts ...pretty.Option) string + func (v TPMFamilySupport) ReadFrom(r io.Reader) (int64, error) + func (v TPMFamilySupport) TotalSize() uint64 + func (v TPMFamilySupport) WriteTo(w io.Writer) (int64, error) + type TPMInfoList struct + Algorithms []Algorithm + Capabilities TPMCapabilities + func NewTPMInfoList() *TPMInfoList + func (s *TPMInfoList) AlgorithmsOffset() uint64 + func (s *TPMInfoList) AlgorithmsTotalSize() uint64 + func (s *TPMInfoList) CapabilitiesOffset() uint64 + func (s *TPMInfoList) CapabilitiesTotalSize() uint64 + func (s *TPMInfoList) PrettyString(depth uint, withHeader bool, opts ...pretty.Option) string + func (s *TPMInfoList) ReadFrom(r io.Reader) (int64, error) + func (s *TPMInfoList) Rehash() + func (s *TPMInfoList) RehashRecursive() + func (s *TPMInfoList) TotalSize() uint64 + func (s *TPMInfoList) Validate() error + func (s *TPMInfoList) WriteTo(w io.Writer) (int64, error) Other modules containing this package github.com/orangecms/converged-security-suite/v2