12#ifndef __T_COSE_COMMON_H__
13#define __T_COSE_COMMON_H__
67#define T_COSE_VERSION_MAJOR 1
68#define T_COSE_VERSION_MINOR 1
69#define T_COSE_VERSION_PATCH 2
83#define T_COSE_ALGORITHM_ES256 -7
96#define T_COSE_ALGORITHM_EDDSA -8
109#define T_COSE_ALGORITHM_ES384 -35
122#define T_COSE_ALGORITHM_ES512 -36
132#define T_COSE_ALGORITHM_PS256 -37
142#define T_COSE_ALGORITHM_PS384 -38
152#define T_COSE_ALGORITHM_PS512 -39
217#define T_COSE_NULL_KEY {T_COSE_CRYPTO_LIB_UNIDENTIFIED, {0}}
219#define T_COSE_NULL_KEY \
220 ((struct t_cose_key){T_COSE_CRYPTO_LIB_UNIDENTIFIED, {0}})
237#define T_COSE_SIGN1_MAX_SIZE_PROTECTED_PARAMETERS (1+1+5+17)
433#define T_COSE_PARAMETER_LIST_MAX 10
441#define T_COSE_EMPTY_UINT_CONTENT_TYPE UINT16_MAX+1
Definition t_cose_common.h:186
uint64_t key_handle
Definition t_cose_common.h:196
enum t_cose_crypto_lib_t crypto_lib
Definition t_cose_common.h:190
void * key_ptr
Definition t_cose_common.h:194
t_cose_crypto_lib_t
Definition t_cose_common.h:162
@ T_COSE_CRYPTO_LIB_PSA
Definition t_cose_common.h:172
@ T_COSE_CRYPTO_LIB_OPENSSL
Definition t_cose_common.h:169
@ T_COSE_CRYPTO_LIB_UNIDENTIFIED
Definition t_cose_common.h:166
t_cose_err_t
Definition t_cose_common.h:250
@ T_COSE_ERR_UNSUPPORTED_SIGNING_ALG
Definition t_cose_common.h:255
@ T_COSE_ERR_INSUFFICIENT_MEMORY
Definition t_cose_common.h:314
@ T_COSE_ERR_CRIT_PARAMETER
Definition t_cose_common.h:401
@ T_COSE_ERR_WRONG_TYPE_OF_KEY
Definition t_cose_common.h:328
@ T_COSE_ERR_SIG_BUFFER_SIZE
Definition t_cose_common.h:274
@ T_COSE_ERR_NO_KID
Definition t_cose_common.h:299
@ T_COSE_ERR_UNSUPPORTED_HASH
Definition t_cose_common.h:264
@ T_COSE_ERR_INCORRECT_KEY_FOR_LIB
Definition t_cose_common.h:370
@ T_COSE_ERR_HASH_GENERAL_FAIL
Definition t_cose_common.h:267
@ T_COSE_ERR_CBOR_NOT_WELL_FORMED
Definition t_cose_common.h:285
@ T_COSE_ERR_SIGN1_FORMAT
Definition t_cose_common.h:280
@ T_COSE_ERR_SHORT_CIRCUIT_SIG
Definition t_cose_common.h:337
@ T_COSE_ERR_NEED_AUXILIARY_BUFFER
Definition t_cose_common.h:410
@ T_COSE_ERR_CBOR_FORMATTING
Definition t_cose_common.h:347
@ T_COSE_ERR_SIG_VERIFY
Definition t_cose_common.h:304
@ T_COSE_ERR_BAD_SHORT_CIRCUIT_KID
Definition t_cose_common.h:307
@ T_COSE_ERR_TOO_SMALL
Definition t_cose_common.h:350
@ T_COSE_ERR_BAD_CONTENT_TYPE
Definition t_cose_common.h:379
@ T_COSE_ERR_NON_INTEGER_ALG_ID
Definition t_cose_common.h:374
@ T_COSE_ERR_TOO_MANY_TAGS
Definition t_cose_common.h:405
@ T_COSE_ERR_INCORRECTLY_TAGGED
Definition t_cose_common.h:384
@ T_COSE_ERR_TAMPERING_DETECTED
Definition t_cose_common.h:320
@ T_COSE_ERR_PARAMETER_NOT_PROTECTED
Definition t_cose_common.h:398
@ T_COSE_ERR_SIG_STRUCT
Definition t_cose_common.h:332
@ T_COSE_ERR_DUPLICATE_PARAMETER
Definition t_cose_common.h:393
@ T_COSE_ERR_UNKNOWN_CRITICAL_PARAMETER
Definition t_cose_common.h:360
@ T_COSE_ERR_HASH_BUFFER_SIZE
Definition t_cose_common.h:270
@ T_COSE_ERR_TOO_MANY_PARAMETERS
Definition t_cose_common.h:356
@ T_COSE_ERR_UNKNOWN_KEY
Definition t_cose_common.h:324
@ T_COSE_ERR_SHORT_CIRCUIT_SIG_DISABLED
Definition t_cose_common.h:365
@ T_COSE_ERR_PARAMETER_CBOR
Definition t_cose_common.h:291
@ T_COSE_ERR_INVALID_ARGUMENT
Definition t_cose_common.h:310
@ T_COSE_ERR_FAIL
Definition t_cose_common.h:317
@ T_COSE_ERR_SIG_FAIL
Definition t_cose_common.h:341
@ T_COSE_ERR_MAKING_PROTECTED
Definition t_cose_common.h:260
@ T_COSE_SUCCESS
Definition t_cose_common.h:252
@ T_COSE_ERR_NO_ALG_ID
Definition t_cose_common.h:295
@ T_COSE_ERR_AUXILIARY_BUFFER_SIZE
Definition t_cose_common.h:413
@ T_COSE_ERR_EMPTY_KEY
Definition t_cose_common.h:387
bool t_cose_is_algorithm_supported(int32_t cose_algorithm_id)
Check whether an algorithm is supported.