Generated from Manticore v1.1.5 • 201 packages. View on pkg.go.dev

blob

import "github.com/TheManticoreProject/Manticore/windows/keycredentiallink/key/material/fek/blob"

Index

type FEK\_KEY\_MATERIAL\_BLOB

FEK_KEY_MATERIAL_BLOB carries the variable-length fields of the KEY_USAGE_FEK key material: the RSA 2048 public exponent, the RSA 2048 modulus, and the AES-256 KDF key. The sizes of each field are supplied by FEK_KEY_MATERIAL_HEADER.

The layout of a FEK_KEY_MATERIAL_BLOB in memory is as follows:

PublicExponent[CbPublicExp] // Big-endian
Modulus[CbModulus]          // Big-endian
AESKDFKey[CbAESKDFKey]      // Raw bytes

See: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-adts/735fd27a-3f22-4926-93f9-0298bb67a84b

type FEK_KEY_MATERIAL_BLOB struct {
    // PublicExponent is the public exponent of the RSA 2048 key, in big-endian.
    PublicExponent []byte

    // Modulus is the modulus of the RSA 2048 key, in big-endian.
    Modulus []byte

    // AESKDFKey is the AES-256 KDF key material.
    AESKDFKey []byte
}

func (*FEK_KEY_MATERIAL_BLOB) Describe

func (b *FEK_KEY_MATERIAL_BLOB) Describe(indent int)

Describe prints the FEK_KEY_MATERIAL_BLOB structure to the console.

Parameters: - indent: The number of levels to indent the output.

func (*FEK_KEY_MATERIAL_BLOB) Equal

func (b *FEK_KEY_MATERIAL_BLOB) Equal(other *FEK_KEY_MATERIAL_BLOB) bool

Equal checks if two FEK_KEY_MATERIAL_BLOB structures are equal.

Parameters: - other: The FEK_KEY_MATERIAL_BLOB structure to compare to.

Returns: - True if the two structures are equal, false otherwise.

func (*FEK_KEY_MATERIAL_BLOB) Marshal

func (b *FEK_KEY_MATERIAL_BLOB) Marshal() ([]byte, error)

Marshal returns the raw bytes of the FEK_KEY_MATERIAL_BLOB structure.

Returns: - A byte slice representing the raw bytes of the FEK_KEY_MATERIAL_BLOB structure.

func (*FEK_KEY_MATERIAL_BLOB) Unmarshal

func (b *FEK_KEY_MATERIAL_BLOB) Unmarshal(keyHeader headers.FEK_KEY_MATERIAL_HEADER, value []byte) (int, error)

Unmarshal parses the provided byte slice into the FEK_KEY_MATERIAL_BLOB structure.

Parameters: - keyHeader: The FEK_KEY_MATERIAL_HEADER describing the field sizes. - value: A byte slice containing the raw FEK key material blob to be parsed.

Returns: - The number of bytes read from the byte slice. - An error if the parsing fails, otherwise nil.