subtle

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const A256KWAlg = "ECDH-1PU+A256KW"

A256KWAlg is the ECDH-1PU key wrapping algorithm.

Variables

This section is empty.

Functions

This section is empty.

Types

type ECDH1PUAEADCompositeDecrypt

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

ECDH1PUAEADCompositeDecrypt is an instance of ECDH-1PU decryption with Concat KDF and AEAD content decryption.

func NewECDH1PUAEADCompositeDecrypt

func NewECDH1PUAEADCompositeDecrypt(senderPub *hybrid.ECPublicKey, recPvt *hybrid.ECPrivateKey, ptFormat string,
	encHelper composite.EncrypterHelper, keyType commonpb.KeyType) *ECDH1PUAEADCompositeDecrypt

NewECDH1PUAEADCompositeDecrypt returns ECDH-ES composite decryption construct with Concat KDF/ECDH-1PU key unwrapping and AEAD payload decryption.

func (*ECDH1PUAEADCompositeDecrypt) Decrypt

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

Decrypt using composite ECDH-ES with a Concat KDF key unwrap and AEAD content decryption.

type ECDH1PUAEADCompositeEncrypt

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

ECDH1PUAEADCompositeEncrypt is an instance of ECDH-ES encryption with Concat KDF and AEAD content encryption.

func NewECDH1PUAEADCompositeEncrypt

func NewECDH1PUAEADCompositeEncrypt(recipientsKeys []*composite.PublicKey, senderPrivKey *hybrid.ECPrivateKey,
	ptFormat string, encHelper composite.EncrypterHelper, keyType commonpb.KeyType) *ECDH1PUAEADCompositeEncrypt

NewECDH1PUAEADCompositeEncrypt returns ECDH-ES encryption construct with Concat KDF key wrapping and AEAD content encryption.

func (*ECDH1PUAEADCompositeEncrypt) Encrypt

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

Encrypt using composite ECDH-1PU with a 1PU KDF key wrap and AEAD content encryption.

type ECDH1PUConcatKDFRecipientKW

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

ECDH1PUConcatKDFRecipientKW represents concat KDF based ECDH-1PU (One-Pass Unified Model) KW (key wrapping) for ECDH-1PU recipient's unwrapping of CEK.

type ECDH1PUConcatKDFSenderKW

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

ECDH1PUConcatKDFSenderKW represents concat KDF based ECDH-1PU KW (key wrapping) for ECDH-1PU sender.

Jump to

Keyboard shortcuts

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