cipher

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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. It is an error to call this function with a private/public key that are not on the same curve. Callers must ensure that the keys are valid before calling this function. Output size may be at most 1<<16 bytes (64 KiB).

func DeriveSm2ECDHES

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

func NewConcatKDF

func NewConcatKDF(hash x509.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