diversify

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: May 8, 2026 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DiversityConstant128   = []byte{0x01}
	DiversityConstant192_1 = []byte{0x11}
	DiversityConstant192_2 = []byte{0x12}
	DiversityConstant256_1 = []byte{0x41}
	DiversityConstant256_2 = []byte{0x42}
)
View Source
var ErrWrongKeyLen = errors.New("key must be 16, 24, or 32 bytes long")

Functions

func DiversifyKey deprecated

func DiversifyKey(masterKey, diversificationData []byte) ([]byte, error)

DiversifyKey diversifies keys according to the AES standards in AN10922 for 128, 196, and 256 bit keys.

Deprecated: use Key.

func Key

func Key(masterKey, diversificationData []byte) ([]byte, error)

Key diversifies keys according to the AES standards in AN10922 for 128, 196, and 256 bit keys. A wrong-sized key will throw and IllegalArgumentException. The diversificationData should *not* include the diversity constant, but should include everything else (uid, application id, and system identifier).

Types

This section is empty.

Jump to

Keyboard shortcuts

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