Documentation
¶
Index ¶
- Constants
- func HybridIdentityFromKey(key, salt []byte) (*age.HybridIdentity, error)
- func HybridIdentityFromPassword(password, salt []byte) (*age.HybridIdentity, error)
- func HybridIdentityFromPasswordWithParameters(password, salt []byte, argon2idTime, argon2idMemory uint32, ...) (*age.HybridIdentity, error)
- func X25519IdentityFromKey(key, salt []byte) (*age.X25519Identity, error)
- func X25519IdentityFromPassword(password, salt []byte) (*age.X25519Identity, error)
- func X25519IdentityFromPasswordWithParameters(password, salt []byte, argon2idTime, argon2idMemory uint32, ...) (*age.X25519Identity, error)
Constants ¶
const ( DefaultArgon2idTime uint32 = 4 DefaultArgon2idMemory uint32 = 6291456 // KiB = 6 GiB DefaultArgon2idThreads uint8 = 8 )
Variables ¶
This section is empty.
Functions ¶
func HybridIdentityFromKey ¶ added in v1.1.0
func HybridIdentityFromKey(key, salt []byte) (*age.HybridIdentity, error)
HybridIdentityFromKey derives a hybrid age MLKEM768X25519 identity from a high-entropy key. Callers are responsible for ensuring that the provided key is suitably generated, e.g. 32 bytes read from crypto/rand.
func HybridIdentityFromPassword ¶ added in v1.1.0
func HybridIdentityFromPassword(password, salt []byte) (*age.HybridIdentity, error)
HybridIdentityFromPassword derives a hybrid age MLKEM768X25519 identity from a password using Argon2id, with strong default parameters.
func HybridIdentityFromPasswordWithParameters ¶ added in v1.1.0
func HybridIdentityFromPasswordWithParameters(password, salt []byte, argon2idTime, argon2idMemory uint32, argon2idThreads uint8) (*age.HybridIdentity, error)
HybridIdentityFromPasswordWithParameters derives a hybrid age MLKEM768X25519 identity from a password, with custom Argon2id parameters.
func X25519IdentityFromKey ¶
func X25519IdentityFromKey(key, salt []byte) (*age.X25519Identity, error)
X25519IdentityFromKey derives an age X25519 identity from a high-entropy key. Callers are responsible for ensuring that the provided key is suitably generated, e.g. 32 bytes read from crypto/rand.
For post-quantum security, use HybridIdentityFromKey instead.
func X25519IdentityFromPassword ¶
func X25519IdentityFromPassword(password, salt []byte) (*age.X25519Identity, error)
X25519IdentityFromPassword derives an age X25519 identity from a password using Argon2id, with strong default parameters.
For post-quantum security, use HybridIdentityFromPassword instead.
func X25519IdentityFromPasswordWithParameters ¶
func X25519IdentityFromPasswordWithParameters(password, salt []byte, argon2idTime, argon2idMemory uint32, argon2idThreads uint8) (*age.X25519Identity, error)
X25519IdentityFromPasswordWithParameters derives an age X25519 identity from a password, with custom Argon2id parameters.
For post-quantum security, use HybridIdentityFromPasswordWithParameters instead.
Types ¶
This section is empty.