package kdf
import "go.mau.fi/libsignal/kdf"
Package kdf provides a key derivation function to calculate key output and negotiate shared secrets for curve X25519 keys.
Index ¶
- func CalculateSharedSecret(theirKey, ourKey [32]byte) [32]byte
- func DeriveSecrets(inputKeyMaterial, salt, info []byte, outputLength int) ([]byte, error)
- type HKDF
- type KeyMaterial
Functions ¶
func CalculateSharedSecret ¶
CalculateSharedSecret uses DH Curve25519 to find a shared secret. The result of this function should be used in `DeriveSecrets` to output the Root and Chain keys.
func DeriveSecrets ¶
DeriveSecrets derives the requested number of bytes using HKDF with the given input, salt, and info.
Types ¶
type HKDF ¶
HKDF is a hashed key derivation function type that can be used to derive keys.
type KeyMaterial ¶
KeyMaterial is a structure for representing a cipherkey, mac, and iv
Source Files ¶
HKDF.go
- Version
- v0.1.2 (latest)
- Published
- Feb 12, 2025
- Platform
- linux/amd64
- Imports
- 4 packages
- Last checked
- 1 week ago –
Tools for package owners.