Documentation
¶
Overview ¶
Package crypto describes interfaces for the various encryption and hmac algorithms that might be used to encrypt and sign transaction envelopes being passed securely in the TRISA network. Subpackages implement specific algorithms such as aesgcm for symmetric encryption or rsa for asymmetric encryption. Note that not all encryption mechanisms are legal in different countries, these interfaces allow the use of different algorithms and methodologies in the protocol without specifying what must be used.
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
Types ¶
type Cipher ¶
type Cipher interface { Encrypt(plaintext []byte) (ciphertext []byte, err error) Decrypt(ciphertext []byte) (plaintext []byte, err error) EncryptionAlgorithm() string }
Cipher is a device that can perform encryption and decryption, This interface wraps different encryption algorithms that must be identified in the TRISA protocol.
type Crypto ¶
type Crypto interface { Cipher Signer KeyHandler }
Crypto handler for TRISA transaction envelopes must be both a Cipher and a Signer.
type KeyHandler ¶ added in v0.3.3
KeyHandler can return its internal encryption key and hmac secret
type KeyIdentifier ¶ added in v0.3.3
KeyIdentifier can return a hash value or some other identifying material for a public key