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

magic

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

Index

Constants

Source: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-adts/735fd27a-3f22-4926-93f9-0298bb67a84b Source: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-adts/701a55dc-d062-4032-a2da-dbdfc384c8cf

The key material of KEY_USAGE_FEK (section 2.2.20.5.3) is a combination of an RSA 2048 public key (RFC8017) and an AES-256 KDF key. The version of the buffer is controlled by the FekKeyVersion field of the CUSTOM_KEY_INFORMATION structure and MUST be set to 1.

const (
    // FEK_KEY_VERSION_1 indicates the version 1 layout of the KEY_USAGE_FEK key
    // material buffer. This is the only version currently defined by MS-ADTS.
    FEK_KEY_VERSION_1 uint8 = 0x01
)

type FEK\_KEY\_MATERIAL\_VERSION

FEK_KEY_MATERIAL_VERSION is the 1-byte version tag that prefixes the FEK key material buffer described in MS-ADTS 2.2.20.5.3.

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

type FEK_KEY_MATERIAL_VERSION struct {
    // Version identifies the layout of the FEK key material buffer.
    // This field MUST be set to FEK_KEY_VERSION_1 (0x01).
    Version uint8
}

func (*FEK_KEY_MATERIAL_VERSION) Describe

func (v *FEK_KEY_MATERIAL_VERSION) Describe(indent int)

Describe prints the FEK_KEY_MATERIAL_VERSION structure to the console.

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

func (*FEK_KEY_MATERIAL_VERSION) Equal

func (v *FEK_KEY_MATERIAL_VERSION) Equal(other *FEK_KEY_MATERIAL_VERSION) bool

Equal returns true if the FEK_KEY_MATERIAL_VERSION structure is equal to the other FEK_KEY_MATERIAL_VERSION structure.

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

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

func (*FEK_KEY_MATERIAL_VERSION) Marshal

func (v *FEK_KEY_MATERIAL_VERSION) Marshal() ([]byte, error)

Marshal returns the raw bytes of the FEK_KEY_MATERIAL_VERSION structure.

Returns: - A byte slice representing the raw bytes of the FEK_KEY_MATERIAL_VERSION structure. - An error if the conversion fails.

func (*FEK_KEY_MATERIAL_VERSION) String

func (v *FEK_KEY_MATERIAL_VERSION) String() string

String returns a string representation of the FEK_KEY_MATERIAL_VERSION structure.

Returns: - A string representing the FEK_KEY_MATERIAL_VERSION structure.

func (*FEK_KEY_MATERIAL_VERSION) Unmarshal

func (v *FEK_KEY_MATERIAL_VERSION) Unmarshal(value []byte) (int, error)

Unmarshal parses the provided byte slice into the FEK_KEY_MATERIAL_VERSION structure.

Parameters: - value: A byte slice containing the raw version byte to be parsed.

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