# Functions
AlgorithmLabelToAlgorithm converts the cose key alg label (string or int64)
to a string algorithm name.
CNFCoseKey gets the cose key from the CNF field of CWT_Claims if it exists
expected format is:
/cnf/ 8 :{ /COSE_Key/ 1 :{ /kty/ 1 : /EC2/ 2, /crv/ -1 : /P-256/ 1, /x/ -2 : h'd7cc072de2205bdc1537a543d53c60a6acb62eccd890c7fa27c9 e354089bbe13', /y/ -3 : h'f95e1d4b851a2cc80fff87d8e23f22afb725d535e515d020731e 79a3b4e47120' } }.
CoseAlgForEC returns the appropraite algorithm for the provided public key curve or an error if the curve is not supported
Noting that: "In order to promote interoperability, it is suggested that SHA-256 be used only with curve P-256, SHA-384 be used only with curve P-384, and SHA-512 be used with curve P-521." -- rfc 8152 & sec 4, 5480.
CurveLabelToCurve converts the cose key crv label (string or int64)
to a string curve name.
KeyTypeLabelToKeyType converts the cose key type label (int64 or string)
to a string keytype name.
MarshalCBOR marshals a cose_Sign1 message to cbor.
NewCNFClaim returns a CoseKey cnf claim formatted properly for the cose cwt claim label 13.
NewCoseCommonKey creates a new cose key with common fields.
NewCoseSign1Message creates a new cose sign1 message.
NewCoseSign1Message creates a new cose sign1 message from a cbor encoded message.
No description provided by the author
NewECCoseKey creates a new EC Cose Key.
No description provided by the author
NewRSACoseKey creates a new RSA cose key.
UnmarshalCBOR unmarshals a cbor encoded cose_Sign1 message.
No description provided by the author
No description provided by the author
# Constants
No description provided by the author
Confirmation Method Label.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Variables
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
CoseKey as defined in:
https://www.rfc-editor.org/rfc/rfc8152.html#page-33
COSE_Key = { 1 => tstr / int, ; kty ? 2 => bstr, ; kid ? 3 => tstr / int, ; alg ? 4 => [+ (tstr / nt) ], ; key_ops ? 5 => bstr, ; Base IV * label => values }
Only with the common fields.
CoseSign1Message extends the cose.sign1message.
CWTClaims are the cwt claims found on the protected header of a signed SCITT statement: https://ietf-wg-scitt.github.io/draft-ietf-scitt-architecture/draft-ietf-scitt-architecture.html.
No description provided by the author
ECCoseKey is an EC2 cose key.
ErrKeyFormatError occurs when the key has unexpected format.
ErrKeyValueError occurs when the key has unexpected values.
ErrNoProtectedHeaderValue occurs when a cose protected header doesn't have a value for a given label.
ErrUnexpectedProtectedHeaderType occurs when a cose protected header label value doesn't have the expected value type.
No description provided by the author
RSACoseKey is an RSA cose key.
No description provided by the author
# Interfaces
// CoseKey interface as defined in:
https://www.rfc-editor.org/rfc/rfc8152.html#page-33
allows the retrieval of common properties as well as the public key half.
# Type aliases
No description provided by the author