Documentation ¶
Index ¶
- func DecryptOAEPRSA(bMessage []byte, pk *rsa.PrivateKey) ([]byte, error)
- func EncryptOAEPRSA(bMessage []byte, p *rsa.PublicKey) ([]byte, error)
- func GenerateAES256Key() (key []byte, er error)
- func GenerateAES256Keys(chainLength int) (keys [][]byte, er error)
- func GenerateRSAKey() (priv *rsa.PrivateKey, pub *rsa.PublicKey, er error)
- func GenerateRSAKeys(chainLength int) (privs []*rsa.PrivateKey, pubs []*rsa.PublicKey, er error)
- func UniqueIV(blockSize int) (iv []byte, er error)
- func UniqueIVs(chainLength, blockSize int) (ivs [][]byte, er error)
- type AES256KeysetBundle
- type EncryptionLevel
- type NestedAESCFB
- type NestedEncrypter
- type RSAKeysetBundle
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecryptOAEPRSA ¶
func DecryptOAEPRSA(bMessage []byte, pk *rsa.PrivateKey) ([]byte, error)
func GenerateAES256Key ¶
func GenerateAES256Keys ¶
func GenerateRSAKey ¶
func GenerateRSAKey() (priv *rsa.PrivateKey, pub *rsa.PublicKey, er error)
func GenerateRSAKeys ¶
Types ¶
type AES256KeysetBundle ¶
type AES256KeysetBundle struct {
// contains filtered or unexported fields
}
type EncryptionLevel ¶
type EncryptionLevel byte
const ( None EncryptionLevel = iota RSA_OAEP AES_256_GCM AES_256_CFB )
func (EncryptionLevel) Byte ¶
func (e EncryptionLevel) Byte() (b byte)
type NestedAESCFB ¶
func NewNestedAESCFB ¶
func NewNestedAESCFB(ivs, aesKeys [][]byte) (n *NestedAESCFB, er error)
func (*NestedAESCFB) AddLayers ¶
func (n *NestedAESCFB) AddLayers(ivs, aesKeys [][]byte) (er error)
func (*NestedAESCFB) Decrypt ¶
func (n *NestedAESCFB) Decrypt(chunk []byte, depth int) (pt []byte, er error)
not of use in the protocol. just to test Encrypt above
func (*NestedAESCFB) Depth ¶
func (n *NestedAESCFB) Depth() (d int)
type NestedEncrypter ¶
type RSAKeysetBundle ¶
type RSAKeysetBundle struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.