Package com.authlete.cose.constants
package com.authlete.cose.constants
-
ClassesClassDescriptionCOSE Algorithms Name Value Description
COSEAlgorithms.RS512
-259 RSASSA-PKCS1-v1_5 using SHA-512COSEAlgorithms.RS384
-258 RSASSA-PKCS1-v1_5 using SHA-384COSEAlgorithms.RS256
-257 RSASSA-PKCS1-v1_5 using SHA-256COSEAlgorithms.ES256K
-47 ECDSA using secp256k1 curve and SHA-256COSEAlgorithms.PS512
-39 RSASSA-PSS w/ SHA-512COSEAlgorithms.PS384
-38 RSASSA-PSS w/ SHA-384COSEAlgorithms.PS256
-37 RSASSA-PSS w/ SHA-256COSEAlgorithms.ES512
-36 ECDSA w/ SHA-512COSEAlgorithms.ES384
-35 ECDSA w/ SHA-384COSEAlgorithms.EdDSA
-8 EdDSACOSEAlgorithms.ES256
-7 ECDSA w/ SHA-256COSE Elliptic Curves Name Value Key Type DescriptionP-256
1EC2
NIST P-256 also known as secp256r1P-384
2EC2
NIST P-384 also known as secp384r1P-521
3EC2
NIST P-521 also known as secp521r1X25519
4OKP
X25519 for use w/ ECDH onlyX448
5OKP
X448 for use w/ ECDH onlyEd25519
6OKP
Ed25519 for use w/ EdDSA onlyEd448
7OKP
Ed448 for use w/ EdDSA onlysecp256k1
8EC2
Ed448 for use w/ EdDSA onlyCOSE Header Parameters Name Label Value Type Description Referencealg
1 int / tstr Cryptographic algorithm to use RFC 9052crit
2 [+ label] Critical headers to be understood RFC 9052content type
3 tstr / uint Content type of the payload RFC 9052kid
4 bstr Key identifier RFC 9052IV
5 bstr Full Initialization Vector RFC 9052Partial IV
6 bstr Partial Initialization Vector RFC 9052x5chain
33 COSE_X509 An ordered chain of X.509 certificates RFC 9360COSE Key Common Parameters Name Label CBOR Type Descriptionkty
1 tstr / int Identification of the key typekid
2 bstr Key identification value - match to kid in messagealg
3 tstr / int Key usage restriction to this algorithmkey_ops
4 [+ (tstr/int)] Restrict set of permissible operationsBase IV
5 bstr Base IV to be XORed with Partial IVsCOSE Key Operations Name Value Descriptionsign
1 The key is used to create signatures.COSE Key Type Parameters Key Type Name Label CBOR Type DescriptionOKP
crv
-1 int / tstr EC identifier -- Taken from the "COSE Elliptic Curves" registryx
-2 bstr Public keyd
-4 bstr Private keyEC2
crv
-1 int / tstr EC identifier -- Taken from the "COSE Elliptic Curves" registryx
-2 bstr x-coordinatey
-3 bstr / bool y-coordinated
-4 bstr Private keyRSA
n
-1 bstr The RSA modulus ne
-2 bstr The RSA public exponent ed
-3 bstr The RSA private exponent dp
-4 bstr The prime factor p of nq
-5 bstr The prime factor q of ndP
-6 bstr dP is d mod (p - 1)dQ
-7 bstr dQ is d mod (q - 1)qInv
-8 bstr qInv is the CRT coefficient q^(-1) mod pother
-9 array Other prime infos, an arrayr_i
-10 bstr A prime factor r_i of n, where i >= 3d_i
-11 bstr d_i = d mod (r_i - 1)t_i
-12 bstr The CRT coefficient t_i = (r_1 * r_2 * ... * r_(i-1))^(-1) mod r_iSymmetric
k
-1 bstr Key valueHSS-LMS
pub
-1 bstr Public key for HSS/LMS hash-based digital signatureWalnutDSA
N
-1 unit Group and Matrix (NxN) sizeq
-2 unit Finite field F_qt-values
-3 array (of unit) List of T-values, entries in F_qmatrix 1
-4 array (of array of unit) NxN Matrix of entries in F_q in column-major formpermutation 1
-5 array (of unit) Permutation associated with matrix 1matrix 2
-6 array (of array of unit) NxN Matrix of entries in F_q in column-major formCOSE Key Types Name Value DescriptionCOSEKeyTypes.OKP
1 Octet Key PairCOSEKeyTypes.EC2
2 Elliptic Curve Keys w/ x- and y-coordinate pairCOSEKeyTypes.RSA
3 RSA KeySymmetric
4 Symmetric KeysHSS-LMS
5 Public key for HSS/LMS hash-based digital signatureWalnutDSA
6 WalnutDSA public key