Documentation ¶
Overview ¶
Encryption and checksum methods as specified in RFC 3961
Index ¶
- func DES3DecryptData(key, data []byte, e etype.EType) ([]byte, error)
- func DES3DecryptMessage(key, ciphertext []byte, usage uint32, e etype.EType) ([]byte, error)
- func DES3EncryptData(key, data []byte, e etype.EType) ([]byte, []byte, error)
- func DES3EncryptMessage(key, message []byte, usage uint32, e etype.EType) ([]byte, []byte, error)
- func DES3RandomToKey(b []byte) []byte
- func DES3StringToKey(secret, salt string, e etype.EType) ([]byte, error)
- func DeriveKey(protocolKey, usage []byte, e etype.EType) ([]byte, error)
- func DeriveRandom(key, usage []byte, e etype.EType) ([]byte, error)
- func Nfold(m []byte, n int) []byte
- func PseudoRandom(key, b []byte, e etype.EType) ([]byte, error)
- func RandomToKey(b []byte) []byte
- func S2KparamsToItertions(s2kparams string) (int, error)
- func StringToKey(secret, salt, s2kparams string, e etype.EType) ([]byte, error)
- func StringToKeyIter(secret, salt string, iterations int, e etype.EType) ([]byte, error)
- func StringToPBKDF2(secret, salt string, iterations int, e etype.EType) []byte
- func VerifyIntegrity(key, ct, pt []byte, usage uint32, etype etype.EType) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DES3DecryptMessage ¶
func DES3EncryptData ¶
func DES3EncryptMessage ¶
func DES3RandomToKey ¶
func DeriveRandom ¶
RFC 3961: DR(Key, Constant) = k-truncate(E(Key, Constant, initial-cipher-state)).
key: base key or protocol key. Likely to be a key from a keytab file.
usage: a constant.
n: block size in bits (not bytes) - note if you use something like aes.BlockSize this is in bytes.
k: key length / key seed length in bits. Eg. for AES256 this value is 256.
e: the encryption etype function to use.
func Nfold ¶
RFC 3961: n-fold algorithm.
m input bytes that will be "stretched" to the least common multiple of n bits and the bit length of m.
func RandomToKey ¶
func S2KparamsToItertions ¶
func StringToKeyIter ¶
func StringToPBKDF2 ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.