Documentation
¶
Overview ¶
Package scheme orchestrates the cryptocore primitives, blob framing, archiving, and word codec into the two high-level operations: sealing a directory into a vault+warden pair, and the unlock handshake. UI (prompts, printing) lives in the commands; this package is pure logic so it can be tested headlessly.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewChallenge ¶
func NewChallenge() (ePriv *ecdh.PrivateKey, challenge []byte, err error)
NewChallenge generates an ephemeral keypair; the public bytes are the challenge.
func Seal ¶
func Seal(assetsDir string, wordlist, password, wardenPass []byte, noWarden bool) (vaultPayload, wardenPayload []byte, err error)
Seal encrypts assetsDir and returns the payloads to append to the vault and warden stubs. wordlist is the raw newline-separated BIP39 list. wardenPass may be empty (obfuscation only). If noWarden is true, the vault is single-factor (password only): no keypair/handshake, no warden — wardenPayload is nil and wardenPass is ignored.
func WardenHasPass ¶
WardenHasPass reports whether the warden payload needs a passphrase, without decrypting it (so the command can decide whether to prompt).
Types ¶
type VaultMeta ¶
type VaultMeta struct {
TwoFactor bool // false for a single-factor (--no-warden) vault
PK []byte // warden public key; empty unless TwoFactor
Wordlist []byte // raw BIP39 list; empty unless TwoFactor
// contains filtered or unexported fields
}
VaultMeta is the result of opening the vault's password-protected metadata.
func OpenVaultMeta ¶
OpenVaultMeta decrypts the metadata with the password. A wrong password fails here, before the handshake (if any).
func (*VaultMeta) OpenAssets ¶
OpenAssets completes the unlock: recover the share from the warden response, derive K_a, decrypt and extract the files.
type WardenKey ¶
type WardenKey struct {
Wordlist []byte
// contains filtered or unexported fields
}
WardenKey holds the responder's secret and wordlist after deobfuscation.
func OpenWarden ¶
OpenWarden deobfuscates (or decrypts, if a passphrase is set) the warden payload. pass may be empty when HasPass is false.