Versions in this module Expand all Collapse all v1 v1.2.0 May 11, 2023 Changes in this version + const ABLPublicKey + const AGESABinary0Entry + const AMDPublicKeyEntry + const BIOSRTMSignatureEntry + const BIOSRTMVolumeEntry + const DRTMTAEntry + const DXIOPHYSRAMFirmwareEntry + const KeyDatabaseEntry + const MP5FirmwareEntry + const OEMSigningKeyEntry + const PSPRecoveryBootloader + const SEVCodeEntry + const SMUOffChipFirmware2Entry + const SMUOffChipFirmwareEntry + const SecurityPolicyBinaryEntry + const UnlockDebugImageEntry + func DumpBIOSEntry(amdFw *amd_manifest.AMDFirmware, biosLevel uint, ...) (int, error) + func DumpPSPEntry(amdFw *amd_manifest.AMDFirmware, pspLevel uint, ...) (int, error) + func ExtractBIOSEntry(amdFw *amd_manifest.AMDFirmware, biosLevel uint, ...) ([]byte, error) + func ExtractPSPEntry(amdFw *amd_manifest.AMDFirmware, pspLevel uint, ...) ([]byte, error) + func GetBIOSEntries(pspFirmware *amd_manifest.PSPFirmware, biosLevel uint, ...) ([]amd_manifest.BIOSDirectoryTableEntry, error) + func GetBIOSEntry(pspFirmware *amd_manifest.PSPFirmware, biosLevel uint, ...) (*amd_manifest.BIOSDirectoryTableEntry, error) + func GetEntries(pspFirmware *amd_manifest.PSPFirmware, directory DirectoryType, entryID uint32) ([]bytes2.Range, error) + func GetPSPEntries(pspFirmware *amd_manifest.PSPFirmware, pspLevel uint, ...) ([]amd_manifest.PSPDirectoryTableEntry, error) + func GetPSPEntry(pspFirmware *amd_manifest.PSPFirmware, pspLevel uint, ...) (*amd_manifest.PSPDirectoryTableEntry, error) + func GetRangeBytes(image []byte, start, length uint64) ([]byte, error) + func IsPSBEnabled(amdFw *amd_manifest.AMDFirmware) (bool, error) + func NewMultiKeySignedBlob(signature []byte, signedData []byte, keySet KeySet) (*SignedBlob, *Key, error) + func OutputBIOSEntries(amdFw *amd_manifest.AMDFirmware) error + func OutputPSPEntries(amdFw *amd_manifest.AMDFirmware) error + func ParseAMDFirmware(image []byte) (*amd_manifest.AMDFirmware, error) + func PatchBIOSEntry(amdFw *amd_manifest.AMDFirmware, biosLevel uint, ...) (int, error) + func PatchPSPEntry(amdFw *amd_manifest.AMDFirmware, pspLevel uint, ...) (int, error) + type BIOSDirectoryEntryItem struct + Entry amd_manifest.BIOSDirectoryTableEntryType + Instance uint8 + Level uint8 + func (biosEntry BIOSDirectoryEntryItem) String() string + type BIOSEntryType uint8 + func (_type BIOSEntryType) String() string + type Buf16B = [16]uint8 + type Buf32B = [32]uint8 + type Buf36B = [36]uint8 + type Buf3B = [3]uint8 + type Buf44B = [44]uint8 + type Buf4B = [4]uint8 + type Buf8B = [8]uint8 + type DirectoryType uint8 + const BIOSDirectoryLevel1 + const BIOSDirectoryLevel2 + const PSPDirectoryLevel1 + const PSPDirectoryLevel2 + func AllDirectoryTypes() []DirectoryType + func DirectoryTypeFromString(in string) (DirectoryType, error) + func GetBIOSDirectoryOfLevel(level uint) (DirectoryType, error) + func GetPSPDirectoryOfLevel(level uint) (DirectoryType, error) + func (t DirectoryType) Level() uint + func (t DirectoryType) ShortName() string + func (t DirectoryType) String() string + type ErrInvalidFormat struct + func (err ErrInvalidFormat) Error() string + func (err ErrInvalidFormat) GetItem() FirmwareItem + func (err ErrInvalidFormat) Unwrap() error + type ErrNotFound struct + func (err ErrNotFound) Error() string + func (err ErrNotFound) GetItem() FirmwareItem + type FirmwareItem interface + type Key struct + func GetPSBSignBIOSKey(amdFw *amd_manifest.AMDFirmware, biosLevel uint) (*Key, error) + func NewKeyFromDatabase(buff *bytes.Buffer) (*Key, error) + func NewRootKey(buff *bytes.Buffer) (*Key, error) + func NewTokenKey(buff *bytes.Buffer, keySet KeySet) (*Key, error) + func (k *Key) Get() (interface{}, error) + func (k *Key) SignatureSize() (int, error) + func (k *Key) String() string + type KeyData struct + CertifyingKeyID Buf16B + Exponent []byte + ExponentSize uint32 + KeyID KeyID + KeyUsageFlag KeyUsageFlag + Modulus []byte + ModulusSize uint32 + Reserved Buf16B + VersionID uint32 + type KeyID Buf16B + func (kid *KeyID) Hex() string + func (kid *KeyID) String() string + type KeyIDs []KeyID + func (kids KeyIDs) String() string + type KeySet struct + func GetKeys(amdFw *amd_manifest.AMDFirmware, level uint) (KeySet, error) + func NewKeySet() KeySet + func (kdb *KeySet) String() string + func (kdb KeySet) AddKey(k *Key, keyType KeyType) error + func (kdb KeySet) AllKeyIDs() KeyIDs + func (kdb KeySet) GetKey(id KeyID) *Key + func (kdb KeySet) KeysetFromType(keyType KeyType) (KeySet, error) + type KeyType string + const ABLKey + const AMDRootKey + const KeyDatabaseKey + const OEMKey + type KeyUsageFlag uint32 + const PSBSignBIOS + const SignAMDBootloaderPSPSMU + const SignAMDOEMPSP + const SignBIOS + type PSPBinary struct + func (b *PSPBinary) Header() *PspHeader + type PSPDirectoryEntryItem struct + Entry amd_manifest.PSPDirectoryTableEntryType + Level uint8 + func (pspEntry PSPDirectoryEntryItem) String() string + type PSPEntryType uint8 + func (_type PSPEntryType) String() string + type PSPHeaderData struct + ApuFamilyID uint32 + CompressedImageSize uint32 + CompressionOptions uint32 + CompressionParameters Buf8B + DebugEncKey Buf16B + EncryptionKey Buf16B + EncryptionOptions uint32 + EncryptionParameters Buf16B + FirmwareLoadAddress uint32 + FirmwareSplitAddress uint32 + FwSpecificData Buf32B + FwSubType uint8 + FwType uint8 + HeaderVersion uint32 + IKEKType uint8 + ImageVersion uint32 + Nonce Buf16B + Reserved Buf4B + Reserved0 Buf3B + Reserved1 uint16 + SecurityPatchLevel uint32 + SignatureAlgorithmID uint32 + SignatureOption uint32 + SignatureParameters Buf16B + SigningInfo Buf16B + SizeFwUnsigned uint32 + SizeImage uint32 + SizeSigned uint32 + UncompressedImageSize uint32 + type PlatformBindingInfo struct + KeyRevisionID uint8 + PlatformModelID uint8 + VendorID uint8 + func GetPlatformBindingInfo(k *Key) (PlatformBindingInfo, error) + func (b PlatformBindingInfo) String() string + type PspHeader struct + func (h *PspHeader) Version() uint32 + type SecurityFeatureVector struct + DisableAMDBIOSKeyUse bool + DisableBIOSKeyAntiRollback bool + DisableSecureDebugUnlock bool + func GetSecurityFeatureVector(k *Key) (SecurityFeatureVector, error) + func (sfv SecurityFeatureVector) String() string + type Signature struct + func NewSignature(signature []byte, signingKey *Key) Signature + func (s *Signature) SigningKey() *Key + func (s *Signature) String() string + type SignatureCheckError struct + func (m *SignatureCheckError) Error() string + func (m *SignatureCheckError) SignedElement() FirmwareItem + func (m *SignatureCheckError) SigningKey() *Key + func (m *SignatureCheckError) Unwrap() error + type SignatureValidationResult struct + func ValidatePSPEntries(amdFw *amd_manifest.AMDFirmware, keyDB KeySet, directory DirectoryType, ...) ([]SignatureValidationResult, error) + func ValidatePSPEntry(amdFw *amd_manifest.AMDFirmware, keyDB KeySet, offset, length uint64) (SignatureValidationResult, error) + func ValidateRTM(amdFw *amd_manifest.AMDFirmware, biosLevel uint) (*SignatureValidationResult, error) + func (v *SignatureValidationResult) Error() error + func (v *SignatureValidationResult) SigningKey() *Key + func (v *SignatureValidationResult) String() string + type SignedBlob struct + func NewSignedBlob(signature []byte, signedData []byte, signingKey *Key) (*SignedBlob, error) + func (b *SignedBlob) Signature() *Signature + func (b *SignedBlob) SignedData() []byte + type UnknownSigningKeyError struct + func (s *UnknownSigningKeyError) Error() string + func (s *UnknownSigningKeyError) SignedElement() FirmwareItem