hpke

package
v1.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 10, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package hpke provides implementations of Hybrid Public Key Encryption.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL