fek
import "github.com/TheManticoreProject/Manticore/windows/keycredentiallink/key/material/fek"
Index
type FEK\_KEY\_MATERIAL
FEK_KEY_MATERIAL represents the KEY_USAGE_FEK key material stored in a KEYCREDENTIALLINK_ENTRY. The buffer is a combination of an RSA 2048 public key (RFC8017) and an AES-256 KDF key, prefixed by a single version byte whose value MUST be 1 (see FekKeyVersion in CUSTOM_KEY_INFORMATION).
type FEK_KEY_MATERIAL struct {
// Version is the 1-byte version tag. MUST be FEK_KEY_VERSION_1 (0x01).
Version magic.FEK_KEY_MATERIAL_VERSION
// Header describes the sizes of the RSA and AES-256 KDF key material.
Header headers.FEK_KEY_MATERIAL_HEADER
// Content contains the RSA public exponent, modulus, and AES-256 KDF key.
Content blob.FEK_KEY_MATERIAL_BLOB
}
func (*FEK_KEY_MATERIAL) Describe
func (k *FEK_KEY_MATERIAL) Describe(indent int)
Describe prints a detailed description of the FEK_KEY_MATERIAL structure.
Parameters: - indent: An integer representing the indentation level for the printed output.
func (*FEK_KEY_MATERIAL) Equal
func (k *FEK_KEY_MATERIAL) Equal(other *FEK_KEY_MATERIAL) bool
Equal checks if two FEK_KEY_MATERIAL structures are equal.
Parameters: - other: The FEK_KEY_MATERIAL structure to compare to.
Returns: - True if the two FEK_KEY_MATERIAL structures are equal, false otherwise.
func (*FEK_KEY_MATERIAL) Fingerprint
func (k *FEK_KEY_MATERIAL) Fingerprint() string
Fingerprint returns the fingerprint of the FEK_KEY_MATERIAL structure.
Returns: - A string representing the fingerprint of the FEK_KEY_MATERIAL structure.
func (*FEK_KEY_MATERIAL) Marshal
func (k *FEK_KEY_MATERIAL) Marshal() ([]byte, error)
Marshal returns the raw bytes of the FEK_KEY_MATERIAL structure.
Returns: - A byte slice representing the raw bytes of the FEK_KEY_MATERIAL structure. - An error if the conversion fails.
func (*FEK_KEY_MATERIAL) Unmarshal
func (k *FEK_KEY_MATERIAL) Unmarshal(value []byte) (int, error)
Unmarshal parses the provided byte slice into the FEK_KEY_MATERIAL structure.
Parameters: - value: A byte slice containing the raw FEK key material to be parsed.
Returns: - The number of bytes read from the byte slice. - An error if the parsing fails, otherwise nil.