package
0.0.0-20240723192418-397b19c8a77e
Repository: https://github.com/snapcore/secboot.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# Functions

Activate unlocks the LUKS device at sourceDevicePath using systemd-cryptsetup and creates a device mapping with the supplied volumeName.
AddKey adds the supplied key in to a new keyslot for specified LUKS2 container.
Deactivate detaches the LUKS volume with the supplied name.
DetectCryptsetupFeatures returns the features supported by the cryptsetup binary on this system.
Format will initialize a LUKS2 container with the specified options and set the primary key to the supplied key.
ImportToken imports the supplied token in to the JSON metadata area of the specified LUKS2 container.
KillSlot erases the keyslot with the supplied slot number from the specified LUKS2 container.
ReadHeader will decode the LUKS header at the specified path.
RegisterTokenDecoder registers a custom decoder for the specified token type, in order for external packages to be able to create type-specific token structures as opposed to relying on GenericToken.
RemoveToken removes the token with the supplied ID from the JSON metadata area of the specified LUKS2 container.
SetSlotPriority sets the priority of the keyslot with the supplied slot number on the specified LUKS2 container.

# Constants

No description provided by the author
AnyId tells ImportToken to automatically choose an appropriate token ID as opposed to hard coding one.
AnySlot tells AddKey to automatically choose an appropriate slot as opposed to hard coding one.
No description provided by the author
FeatureHeaderSizeSetting indicates that the header size settings can be specified when using the Format API.
FeatureTokenImport indicates that ImportToken can be used.
FeatureTokenReplace indicates that tokens can be atomically replaced with ImportToken (yet to be implemented).
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
SlotPriorityHigh means that cryptsetup will try the associated keyslot before it tries any keyslots with a priority of SlotPriorityNormal.
SlotPriorityIgnore means that cryptsetup will not use the associated keyslot unless it is specified explicitly.
SlotPriorityNormal is the default keyslot priority.
No description provided by the author

# Variables

ErrMissingCryptsetupFeature is returned from some functions that make use of the system's cryptsetup binary, if that binary is missing some required features.

# Structs

AddKeyOptions provides the options for adding a key to a LUKS2 volume.
AF correspnds to an af object in the JSON metadata of a LUKS2 volume, and details the anti-forensic splitter parameters for a keyslot.
Area corresponds to an area object in the JSON metadata of a LUKS2 volume, and details the parameters for the storage area in the binary keyslots area for a keyslot.
Config corresponds to a config object in the JSON metadata of a LUKS2 volume.
Digest corresponds to a digest object in the JSON metadata area of a LUKS2 volume, and provides a way to verify that a key decrypted from a keyslot is correct.
FormatOptions provide the options for formatting a new LUKS2 volume.
GenericToken corresponds to a token that doesn't have a more type-specific representation.
HeaderInfo corresponds to the header (binary header and JSON metadata) for a LUKS2 volume.
ImportTokenOptions provides the options for importing a JSON token into a LUKS2 header.
Integrity corresponds to an integrity object in the JSON metadata of a LUKS2 volume, and details the data integrity parameters for a segment.
KDF corresponds to a kdf object in the JSON metadata of a LUKS2 volume, and details the KDF parameters for a keyslot.
KDFOptions specifies parameters for the Argon2 KDF.
Keyslot corresponds to a keyslot object in the JSON metadata of a LUKS2 volume, and contains information about a stored protected key.
Metadata corresponds to the top level object in the JSON metadata area of a LUKS2 volume.
Segment corresponds to a segment object in the JSON metadata of a LUKS2 volume, and details an encrypted area on disk.

# Interfaces

Token corresponds to a token object in the JSON metadata of a LUKS2 volume.

# Type aliases

AFType corresponds to an anti-forensic splitter algorithm.
AreaType corresponds to the type of a storage area in the binary keyslots area.
Features indicates the set of features supported by this package, determined by the features of the system's cryptsetup binary.
Hash corresponds to a cryptpgraphic digest algorithm.
JsonNumber represents a JSON number literal.
KDFType corresponds to a key derivation function.
KeyslotType corresponds to the type of a keyslot.
LockMode defines the locking mode for ReadHeader.
SlotPriority represents the priority of a keyslot.
TokenDecoder provides a mechanism for an external package to decode custom token types.
No description provided by the author