Documentation
¶
Index ¶
- Constants
- Variables
- func AES256CGMOpen(key, nonce, cipherText []byte) (plainText []byte, err error)
- func AES256CGMSeal(key, nonce, plainText []byte) (cipherText []byte, err error)
- func ConcatAll(parts ...[]byte) (res []byte)
- func Dencapsulate(pub []byte, pvt []byte, ct []byte, keyType KeyType) (ss []byte, err error)
- func EncB64(b []byte) string
- func Encapsulate(pub []byte, keyType KeyType) (ct []byte, ss []byte, err error)
- func FrodoGetKem(keyType KeyType) (kem frodo.FrodoKEM, err error)
- func GenKey(keyType KeyType) (pvt []byte, pub []byte, err error)
- func KeyId(pub []byte) string
- func PrivateKeyAsString(pub []byte) string
- func PrivateKeyFromString(key string) (pvt []byte)
- func PublicKeyAsString(pub []byte) string
- func PublicKeyFromString(key string) (pub []byte)
- func QuickSha256(b []byte) []byte
- func RandBytes(size int) []byte
- func SimpleSuperTripleDecrypt(cipherText []byte, password string) (plainText []byte, err error)
- func SimpleSuperTripleEncrypt(plainText []byte, password string) (cipherText []byte, err error)
- type KemSizes
- type KeyType
- type SCryptParameters
- type SimpleTripleEncryptionHeader
Constants ¶
View Source
const SimpleTripleEncryptionHeaderLen int = 4*4 + 96 + 36
Variables ¶
View Source
var CipherTextSizeByKeyType = map[KeyType]KemSizes{ KeyTypeFrodo640AES: {19888, 9616, 9720, 16}, KeyTypeFrodo640SHAKE: {19888, 9616, 9720, 16}, KeyTypeFrodo976AES: {31296, 15632, 15744, 24}, KeyTypeFrodo976SHAKE: {31296, 15632, 15744, 24}, KeyTypeFrodo1344AES: {43088, 21520, 21632, 32}, KeyTypeFrodo1344SHAKE: {43088, 21520, 21632, 32}, KeyTypeKyber768: {64, 1184, 1088, 32}, KeyTypeKyber1024: {64, 1568, 1568, 32}, }
View Source
var CurrentSCryptParameters = SCryptParameters{
N: 65536 * 2,
R: 9,
P: 1,
}
View Source
var KeyTypeAsString = map[KeyType]string{ KeyTypeFrodo640AES: "FRODO_640_AES", KeyTypeFrodo640SHAKE: "FRODO_640_SHAKE", KeyTypeFrodo976AES: "FRODO_976_AES", KeyTypeFrodo976SHAKE: "FRODO_976_SHAKE", KeyTypeFrodo1344AES: "FRODO_1344_AES", KeyTypeFrodo1344SHAKE: "FRODO_1344_SHAKE", KeyTypeKyber768: "KYBER_768", KeyTypeKyber1024: "KYBER_1024", }
Functions ¶
func AES256CGMOpen ¶
func AES256CGMSeal ¶
func Dencapsulate ¶
func PrivateKeyAsString ¶
func PrivateKeyFromString ¶
func PublicKeyAsString ¶
func PublicKeyFromString ¶
func QuickSha256 ¶
Types ¶
type KeyType ¶
type KeyType uint8
const ( KeyTypeUnknown KeyType = 255 KeyTypeInvalid KeyType = iota KeyTypeFrodo640AES KeyType = iota KeyTypeFrodo640SHAKE KeyType = iota KeyTypeFrodo976AES KeyType = iota KeyTypeFrodo976SHAKE KeyType = iota KeyTypeFrodo1344AES KeyType = iota KeyTypeFrodo1344SHAKE KeyType = iota KeyTypeKyber768 KeyType = iota KeyTypeKyber1024 KeyType = iota )
type SCryptParameters ¶
type SimpleTripleEncryptionHeader ¶
type SimpleTripleEncryptionHeader struct {
Magic uint32
Salt [32 * 3]byte
Nonces [12 * 3]byte
SCryptParams SCryptParameters
}
Click to show internal directories.
Click to hide internal directories.