Documentation ¶
Index ¶
- Variables
- func Dump(r io.Reader, verbose bool, pubaf PublicKeyAnnotatorFunc) (string, error)
- func EncryptSymmetricKey(symmetricKey []byte, akey AssymmetricKey, recipient *ecdsa.PublicKey, ...) (*pb.EncryptedSymmetricKey, error)
- func Seal(w io.Writer, plaintext []byte, akey AssymmetricKey, ...) error
- func Unseal(r io.Reader, akey AssymmetricKey) ([]byte, []*ecdsa.PublicKey, error)
- type AssymmetricKey
- type LocalPrivateKey
- type PublicKeyAnnotatorFunc
Constants ¶
This section is empty.
Variables ¶
View Source
var ( EncryptSymmetricKeySalt = []byte("encrypt_symmetric_key") ErrInvalidEnvelopeSignature = errors.New("Envelope signature verification failed") ErrInvalidRecipientKeySignature = errors.New("Recipient key signature verification failed") ErrNotRecipient = errors.New("The private key is not a recipient of the envelope. Likely you sealed the envelope before adding the key to the lws") )
Functions ¶
func EncryptSymmetricKey ¶
func EncryptSymmetricKey(symmetricKey []byte, akey AssymmetricKey, recipient *ecdsa.PublicKey, randr io.Reader) (*pb.EncryptedSymmetricKey, error)
Types ¶
type AssymmetricKey ¶
type LocalPrivateKey ¶
type LocalPrivateKey struct { Priv *ecdsa.PrivateKey // contains filtered or unexported fields }
func NewLocalPrivateKey ¶
func NewLocalPrivateKey(priv *ecdsa.PrivateKey) *LocalPrivateKey
func (*LocalPrivateKey) Close ¶ added in v0.0.2
func (k *LocalPrivateKey) Close() error
func (*LocalPrivateKey) Public ¶
func (k *LocalPrivateKey) Public() *ecdsa.PublicKey
type PublicKeyAnnotatorFunc ¶
Click to show internal directories.
Click to hide internal directories.