josecipher

package
v0.0.0-...-3460c67 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2014 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AesKeyUnwrap

func AesKeyUnwrap(kek, ciphertext []byte) ([]byte, error)

AesKeyUnwrap unwraps a wrapped key (ciphertext) with the given key encryption key (kek).

func AesKeyWrap

func AesKeyWrap(kek, cek []byte) ([]byte, error)

AesKeyWrap wraps a content encryption key (cek) with the given key encryption key (kek).

func DeriveECDHES

func DeriveECDHES(alg string, apuData, apvData []byte, priv *ecdsa.PrivateKey, pub *ecdsa.PublicKey, size int) []byte

DeriveECDHES derives a shared encryption key using ECDH/ConcatKDF as described in JWE/JWA.

func NewCBCHMAC

func NewCBCHMAC(key []byte, newBlockCipher func([]byte) (cipher.Block, error)) (cipher.AEAD, error)

NewCBCHMAC instantiates a new AEAD based on CBC+HMAC.

func NewConcatKDF

func NewConcatKDF(hash crypto.Hash, z, algID, ptyUInfo, ptyVInfo, supPubInfo, supPrivInfo []byte) io.Reader

NewConcatKDF builds a KDF reader based on the given inputs.

Types

This section is empty.

Jump to

Keyboard shortcuts

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