package hpke

import "github.com/google/tink/go/hybrid/internal/hpke"

Package hpke provides implementations of Hybrid Public Key Encryption.

Index

Types

type Decrypt

type Decrypt struct {
	// contains filtered or unexported fields
}

Decrypt for HPKE implements interface HybridDecrypt.

func NewDecrypt

func NewDecrypt(recipientPrivKey *pb.HpkePrivateKey) (*Decrypt, error)

NewDecrypt constructs a Decrypt using HpkePrivateKey.

func (*Decrypt) Decrypt

func (d *Decrypt) Decrypt(ciphertext, contextInfo []byte) ([]byte, error)

Decrypt decrypts ciphertext, verifying the integrity of contextInfo.

type Encrypt

type Encrypt struct {
	// contains filtered or unexported fields
}

Encrypt for HPKE implements interface HybridEncrypt.

func NewEncrypt

func NewEncrypt(recipientPubKey *pb.HpkePublicKey) (*Encrypt, error)

NewEncrypt constructs an Encrypt using HpkePublicKey.

func (*Encrypt) Encrypt

func (e *Encrypt) Encrypt(plaintext, contextInfo []byte) ([]byte, error)

Encrypt encrypts plaintext, binding contextInfo to the resulting ciphertext.

Source Files

aead.go aes_gcm_aead.go chacha20poly1305_aead.go context.go decrypt.go encrypt.go hkdf_kdf.go hpke.go kdf.go kem.go primitive_factory.go x25519_kem.go

Version
v1.7.0 (latest)
Published
Aug 10, 2022
Platform
linux/amd64
Imports
12 packages
Last checked
3 months ago

Tools for package owners.