Documentation
¶
Index ¶
- Constants
- func AdoptLegacySpool(key, ciphertextPath, envelopePath string, identity *Identity, root string, ...) error
- func ConfigDirectory() (string, error)
- func DecryptFile(input, output string, key []byte) error
- func DecryptManifestFile(input, output string, manifest Manifest) error
- func DecryptManifestStream(source io.Reader, destination io.Writer, manifest Manifest) error
- func EncryptFile(input, output, plaintextRoot string, plaintextSize int64, fileName string, ...) ([]byte, error)
- func EncryptManifestStream(source io.Reader, destination io.Writer, root string, size int64, name string, ...) ([]byte, error)
- func SealHistory(plaintext []byte, publicKeys []string) ([]byte, error)
- func SealManifest(manifest Manifest, publicKeys []string) ([]byte, error)
- func SpoolPaths(dedupKey string, namespace ...string) (string, string, error)
- type Identity
- type Manifest
Constants ¶
const Suite = "DARE20-AGE-X25519-v1"
Variables ¶
This section is empty.
Functions ¶
func AdoptLegacySpool ¶
func AdoptLegacySpool(key, ciphertextPath, envelopePath string, identity *Identity, root string, size int64) error
Adopt a legacy cache only after authenticating its envelope for this device and verifying its plaintext identity. Leave all legacy files untouched.
func ConfigDirectory ¶
func DecryptFile ¶
func DecryptManifestFile ¶
SIO encodes an empty source as zero bytes and its generic decryptor rejects that stream. Accept that one case only when the authenticated manifest explicitly commits to an empty plaintext. Key-only decryption stays strict.
func DecryptManifestStream ¶
The manifest must already have been opened with this recipient's age key. Callers additionally verify the plaintext size and root before committing.
func EncryptFile ¶
func EncryptManifestStream ¶
Types ¶
type Identity ¶
type Identity struct {
// contains filtered or unexported fields
}
func LoadIdentity ¶
func (*Identity) LocalCertificate ¶
func (i *Identity) LocalCertificate() (tls.Certificate, error)
The device key is the peer's trust anchor. Local connections pin this public key directly, so they do not need a CA, DNS or a synchronized peer clock.