Documentation ¶
Index ¶
- func GenerateKeyPair(rand io.Reader, pk_algo string) (pub, priv []byte, err error)
- func RegisterCipher(str string, ciph Cipher_Driver)
- func RegisterPkAlgo(str string, pka Pka_Driver)
- type Cipher_Buffer
- type Cipher_Driver
- type DecryptionContext
- type EncryptionContext
- type InvalidKeyError
- type KeyRing
- type KeyRing2
- type MalformedEncryptedKeyError
- type MalformedKeyError
- type Pka_Driver
- type PrivateKey
- type PublicKey
- type UnknownCipherError
- type UnknownPkaError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateKeyPair ¶
func RegisterCipher ¶
func RegisterCipher(str string, ciph Cipher_Driver)
func RegisterPkAlgo ¶
func RegisterPkAlgo(str string, pka Pka_Driver)
Types ¶
type Cipher_Buffer ¶
type Cipher_Driver ¶
type Cipher_Driver interface { Keybuf() *Cipher_Buffer Encrypt(b *Cipher_Buffer) (*format2.CipherObject, error) Decrypt(b *Cipher_Buffer) (*format2.CipherObject, error) }
type DecryptionContext ¶
func (*DecryptionContext) StartDecryption ¶
func (d *DecryptionContext) StartDecryption(p *format2.Preamble) (*format2.CipherObject, error)
type EncryptionContext ¶
type EncryptionContext struct { PublicKey PublicKey PK_Algo string Encoding string Random io.Reader }
Encrypter for non-Wrapped Opaques.
func (*EncryptionContext) StartEncryption ¶
func (e *EncryptionContext) StartEncryption() (*format2.Preamble, *format2.CipherObject, error)
type InvalidKeyError ¶
type InvalidKeyError string
func (InvalidKeyError) Error ¶
func (e InvalidKeyError) Error() string
type KeyRing ¶
type KeyRing interface { // GetKey SHOULD return the corresponding private key for a ciphertext. GetKey(opaque []byte, pk_algo string) (PrivateKey, error) }
func AsKeyRing ¶
func AsKeyRing(priv PrivateKey) KeyRing
type KeyRing2 ¶
type KeyRing2 interface { // GetKey2 SHOULD return the corresponding private key for a ciphertext. // // This works like GetKey except, that opaque might be substituted by n_opaque GetKey2(opaque []byte, pk_algo string) (n_opaque []byte, pk PrivateKey, err error) }
Key-Ring object for wrapped opaques.
type MalformedEncryptedKeyError ¶
type MalformedEncryptedKeyError string
func (MalformedEncryptedKeyError) Error ¶
func (e MalformedEncryptedKeyError) Error() string
type MalformedKeyError ¶
type MalformedKeyError string
func (MalformedKeyError) Error ¶
func (e MalformedKeyError) Error() string
type Pka_Driver ¶
type Pka_Driver interface { GenerateKeyPair(rand io.Reader) (pub, priv []byte, err error) LoadPublic(pub []byte) (PublicKey, error) LoadPrivate(priv []byte) (PrivateKey, error) DecryptKey(opaque []byte, prik PrivateKey, cb *Cipher_Buffer) error EncryptKey(rand io.Reader, pubk PublicKey, cb *Cipher_Buffer) (opaque []byte, err error) }
type PrivateKey ¶
type PrivateKey interface{}
func LoadPrivateKey ¶
func LoadPrivateKey(pk_algo string, priv []byte) (PrivateKey, error)
type UnknownCipherError ¶
type UnknownCipherError string
func (UnknownCipherError) Error ¶
func (e UnknownCipherError) Error() string
type UnknownPkaError ¶
type UnknownPkaError string
func (UnknownPkaError) Error ¶
func (e UnknownPkaError) Error() string
Directories ¶
Path | Synopsis |
---|---|
Implements AES (128,192,256) in various modes of operations.
|
Implements AES (128,192,256) in various modes of operations. |
Implements AEZ AEAD cipher.
|
Implements AEZ AEAD cipher. |
This package implements support for bcns, a key exchange based on the Ring Learning With Errors Problem.
|
This package implements support for bcns, a key exchange based on the Ring Learning With Errors Problem. |
Implements Block Modes.
|
Implements Block Modes. |
European Brainpool ECC curves.
|
European Brainpool ECC curves. |
Implements CAMELLIA encryption algorithm (128,192,256 bit) in various modes of operations.
|
Implements CAMELLIA encryption algorithm (128,192,256 bit) in various modes of operations. |
Implements the ChaCha20-Poly1305 AEAD as specified in RFC 7539, and its extended nonce variant XChaCha20-Poly1305.
|
Implements the ChaCha20-Poly1305 AEAD as specified in RFC 7539, and its extended nonce variant XChaCha20-Poly1305. |
This package implements the cleptographic ECC curves from FIPS 186-3.
|
This package implements the cleptographic ECC curves from FIPS 186-3. |
Implements the HS1-SIV Authenticated Cipher.
|
Implements the HS1-SIV Authenticated Cipher. |
Bitelliptic implements several Koblitz PK_Algo = ( "koblitz_s160" "koblitz_s192" "koblitz_s224" "koblitz_s256" )
|
Bitelliptic implements several Koblitz PK_Algo = ( "koblitz_s160" "koblitz_s192" "koblitz_s224" "koblitz_s256" ) |
Implements ciphers from Korea Internet Security Agency.
|
Implements ciphers from Korea Internet Security Agency. |
Implements the MORUS-1280-256 Authenticated Cipher.
|
Implements the MORUS-1280-256 Authenticated Cipher. |
This package implements support for newhope, a key exchange based on the Ring Learning With Errors Problem.
|
This package implements support for newhope, a key exchange based on the Ring Learning With Errors Problem. |
This package implements support for curve25519 PK_Algo = ( "curve25519" )
|
This package implements support for curve25519 PK_Algo = ( "curve25519" ) |
Key Derivation functions for Public-Key-Algorithms.
|
Key Derivation functions for Public-Key-Algorithms. |
Implements Twofish (128,192,256 keysize) in various modes of operations.
|
Implements Twofish (128,192,256 keysize) in various modes of operations. |
This package implements support for x448 PK_Algo = ( "x448" )
|
This package implements support for x448 PK_Algo = ( "x448" ) |
Click to show internal directories.
Click to hide internal directories.