import "berty.tech/berty/go/internal/cryptoutil"
Package cryptoutil contains generic & stateless crypto helpers.
const ( KeySize = 32 // Key size required by box NonceSize = 24 // Nonce size required by box ScryptIterations = 1 << 15 ScryptR = 8 ScryptP = 1 ScryptKeyLen = 32 )
AESCTRStream returns a CTR stream that can be used to produce ciphertext without padding.
AESGCMDecrypt uses AES+GCM to decrypt plaintext data.
AESGCMEncrypt use AES+GCM to encrypt plaintext data.
The generated output will be longer than the original plaintext input.
DeriveKey takes a passphrase of any length and returns a key of fixed size.
If no salt is provided, a new one will be created and returned.
func EdwardsToMontgomery(privKey crypto.PrivKey, pubKey crypto.PubKey) (*[32]byte, *[32]byte, error)
EdwardsToMontgomery converts ed25519 priv/pub keys to X25519 keys.
EdwardsToMontgomeryPriv converts ed25519 priv key to X25519 priv key.
EdwardsToMontgomeryPub converts ed25519 pub key to X25519 pub key.
Package cryptoutil imports 11 packages (graph). Updated 2021-01-07. Refresh now. Tools for package owners.