api

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2023 License: Apache-2.0 Imports: 0 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CompositeDecrypt

type CompositeDecrypt interface {
	// Decrypt operation: decrypts ciphertext representing a serialized EncryptedData (mainly extracted from a
	// JWE message) for a given recipient. It uses an unwrapped cek and the AEAD decrypt primitive.
	// returns resulting plaintext extracted from the serialized object.
	Decrypt(cipherText, additionalData []byte) ([]byte, error)
}

CompositeDecrypt will decrypt a `ciphertext` representing a composite encryption with a protected cek for the recipient caller of this interface. In order to get the plaintext embedded, this type is configured with the recipient key type that will decrypt the embedded cek first.

type CompositeEncrypt

type CompositeEncrypt interface {
	// Encrypt operation: encrypts plaintext with aad for a given cek.
	// Returns resulting EncryptedData wrapping ciphertext content or error if failed.
	Encrypt(plainText, aad []byte) ([]byte, error)
}

CompositeEncrypt will encrypt a `plaintext` using AEAD primitive (with ECDH-ES cek key wrapping by recipient executed externally). It returns the resulting serialized JWE []byte. This type is used mainly for repudiation requests where the sender identity remains unknown to the recipient in a serialized EncryptedData envelope (used mainly to build JWE messages).

Jump to

Keyboard shortcuts

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