cose

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2022 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

View Source
const (
	COSE_KEY_TYPE_OKP       coseKeyType = 0b001
	COSE_KEY_TYPE_EC2       coseKeyType = 0b010
	COSE_KEY_TYPE_SYMMETRIC coseKeyType = 0b100
)
View Source
const (
	COSE_CURVE_ID_P256 coseCurveID = 1
)

Variables

This section is empty.

Functions

func EncodeKeyAsCOSE

func EncodeKeyAsCOSE(publicKey *ecdsa.PublicKey) []byte

Types

type COSEAlgorithmID

type COSEAlgorithmID int32
const (
	COSE_ALGORITHM_ID_ES256         COSEAlgorithmID = -7
	COSE_ALGORITHM_ID_ECDH_HKDF_256 COSEAlgorithmID = -25
)

type COSEPublicKey

type COSEPublicKey struct {
	KeyType   int8   `cbor:"1,keyasint"`  // Key Type
	Algorithm int8   `cbor:"3,keyasint"`  // Key Algorithm
	Curve     int8   `cbor:"-1,keyasint"` // Key Curve
	X         []byte `cbor:"-2,keyasint"`
	Y         []byte `cbor:"-3,keyasint"`
}

func (*COSEPublicKey) String

func (key *COSEPublicKey) String() string

Jump to

Keyboard shortcuts

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