Documentation ¶
Index ¶
- Constants
- func Decrypt(encryptedData, nonce, secretKey []byte) ([]byte, error)
- func DecryptConvergent(encryptedData, salt, secretKey []byte) ([]byte, error)
- func Desalinate(data []byte, length int) (desalted []byte, salt []byte)
- func Salinate(data, salt []byte) []byte
- type Args
- type Blob
- type BlockCipherMaker
Constants ¶
View Source
const KeySize = 32
View Source
const NonceSize = 12
There are issues with the proof of security with other nonce sizes so we only use 0 (for convergent) or 12
Variables ¶
This section is empty.
Functions ¶
func DecryptConvergent ¶
Decrypt data that was deterministically encrypted with the provided salt
Types ¶
type Args ¶
type Args struct { BlockCipherMaker BlockCipherMaker Nonce []byte SecretKey []byte AdditionalData []byte }
type Blob ¶
func EncryptConvergent ¶
Deterministically encrypt data using a supplied salt to produce a distinguished the encrypted result that will have a different content hash, secret key, and address than the same data encrypted with a different salt (or not salt). Can be used to watermark a copy of a blob shared with a particular party or to hide the fact a certain plaintext is stored.
Click to show internal directories.
Click to hide internal directories.