304 void *user,
const uint8_t *in,
size_t len);
331 int use_mask,
int bits,
const char *curve,
332 const uint8_t *kid,
size_t kl);
352 struct lws_cose_validate_context;
383 struct lws_cose_validate_context *
cps;
390 void *opaque,
const uint8_t *paychunk,
391 size_t paychunk_len);
394 struct lws_context *
cx;
443 const uint8_t *in,
size_t in_len,
size_t *used_in);
451 struct lws_cose_sign_context;
453 #define LCSC_FL_ADD_CBOR_TAG (1 << 0)
454 #define LCSC_FL_ADD_CBOR_PREFER_MAC0 (1 << 1)
457 struct lws_context *
cx;
506 const uint8_t *in,
size_t in_len);
@ LCOSESIGEXTCB_RET_FINISHED
@ LCOSESIGEXTCB_RET_AGAIN
@ LCOSESIGEXTCB_RET_ERROR
size_t inline_payload_len
const lws_cose_key_t * cose_key
struct lws_gencrypto_keyelem meta[LWS_COUNT_COSE_KEY_ELEMENTS]
LWS_VISIBLE LWS_EXTERN enum lws_lec_pctx_ret lws_cose_sign_payload_chunk(struct lws_cose_sign_context *csc, const uint8_t *in, size_t in_len)
LWS_VISIBLE LWS_EXTERN cose_param_t lws_cose_name_to_alg(const char *name)
LWS_VISIBLE LWS_EXTERN int lws_cose_validate_chunk(struct lws_cose_validate_context *cps, const uint8_t *in, size_t in_len, size_t *used_in)
@ LWS_COUNT_COSE_KEY_ELEMENTS
LWS_VISIBLE LWS_EXTERN lws_dll2_owner_t * lws_cose_validate_results(struct lws_cose_validate_context *cps)
LWS_VISIBLE LWS_EXTERN void lws_cose_key_set_destroy(lws_dll2_owner_t *o)
LWS_VISIBLE LWS_EXTERN struct lws_cose_sign_context * lws_cose_sign_create(const lws_cose_sign_create_info_t *info)
LWS_VISIBLE LWS_EXTERN void lws_cose_sign_destroy(struct lws_cose_sign_context **csc)
LWS_VISIBLE LWS_EXTERN int lws_cose_sign_add(struct lws_cose_sign_context *csc, cose_param_t alg, const lws_cose_key_t *ck)
LWS_VISIBLE LWS_EXTERN void lws_cose_key_dump(const lws_cose_key_t *ck)
int(* lws_cose_sign_ext_pay_cb_t)(lws_cose_sig_ext_pay_t *x)
int(* lws_cose_validate_pay_cb_t)(struct lws_cose_validate_context *cps, void *opaque, const uint8_t *paychunk, size_t paychunk_len)
LWS_VISIBLE LWS_EXTERN lws_cose_key_t * lws_cose_key_from_set(lws_dll2_owner_t *set, const uint8_t *kid, size_t kl)
LWS_VISIBLE LWS_EXTERN lws_cose_key_t * lws_cose_key_generate(struct lws_context *context, cose_param_t cose_kty, int use_mask, int bits, const char *curve, const uint8_t *kid, size_t kl)
@ LWSCOSE_WKAPECDH_STATIC_KEY
@ LWSCOSE_WKAAESCCM_64_128_128
@ LWSCOSE_WKAECDSA_ALG_ES384
@ LWSCOSE_WKAAESCCM_64_64_128
@ LWSCOAP_CONTENTFORMAT_COSE_MAC
@ LWSCOSE_WKKO_UNWRAP_KEY
@ LWSCOSE_WKAAESCCM_64_128_256
@ LWSCOAP_CONTENTFORMAT_COSE_KEY_SET
@ LWSCOSE_WKAPCTX_PARTY_U_OTHER
@ LWSCOSE_WKAPCTX_PARTY_U_NONCE
@ LWSCOSE_WKACHACHA_POLY1305
@ LWSCOSE_WKAHMAC_256_256
@ LWSCOSE_WKKTV_WALNUTDSA
@ LWSCOSE_WKKTV_SYMMETRIC
@ LWSCOSE_WKAPECDH_ES_A128KW
@ LWSCOSE_WKAAESCCM_16_64_128
@ LWSCOSE_WKAECDSA_ALG_ES512
@ LWSCOSE_WKAPECDH_SS_A256KW
@ LWSCOSE_WKL_CONTENT_TYPE
@ LWSCOSE_WKAAESCCM_16_64_256
@ LWSCOSE_WKAPECDH_SS_A128KW
@ LWSCOSE_WKK_DIRECT_HKDFKW_SHA_256
@ LWSCOSE_WKARSA_ALG_RS384
@ LWSCOSE_WKAPECDH_ES_A192KW
@ LWSCOAP_CONTENTFORMAT_COSE_ENCRYPT
@ LWSCOSE_WKL_CUPH_OWNER_PUBKEY
@ LWSCOSE_WKK_DIRECT_HKDF_AES_256
@ LWSCOSE_WKKO_DERIVE_BITS
@ LWSCOSE_WKKO_DERIVE_KEY
@ LWSCOSE_WKK_DIRECT_HKDFKW_AES_128
@ LWSCOSE_WKAAESCCM_64_64_256
@ LWSCOSE_WKAPCTX_PARTY_U_IDENTITY
@ LWSCOSE_WKAPCTX_PARTY_V_IDENTITY
@ LWSCOSE_WKSYMKP_KEY_VALUE
@ LWSCOSE_WKAPECDH_EPHEMERAL_KEY
@ LWSCOAP_CONTENTFORMAT_COSE_SIGN1
@ LWSCOSE_WKL_COUNTERSIGNATURE0
@ LWSCOSE_WKAPECDH_STATIC_KEY_ID
@ LWSCOAP_CONTENTFORMAT_COSE_KEY
@ LWSCOSE_WKARSA_ALG_RS512
@ LWSCOSE_WKK_DIRECT_HKDF_SHA_256
@ LWSCOSE_WKK_DIRECT_HKDFKW_SHA_512
@ LWSCOSE_WKAECDH_ALG_ES_HKDF_512
@ LWSCOSE_WKKO_MAC_CREATE
@ LWSCOSE_WKK_DIRECT_HKDF_AES_128
@ LWSCOAP_CONTENTFORMAT_COSE_ENCRYPT0
@ LWSCOSE_WKAHMAC_384_384
@ LWSCOSE_WKL_COUNTERSIG0
@ LWSCOSE_WKK_DIRECT_HKDF_SHA_512
@ LWSCOSE_WKAAESCCM_16_128_256
@ LWSCOAP_CONTENTFORMAT_COSE_SIGN
@ LWSCOSE_WKAECDSA_ALG_ES256
@ LWSCOSE_WKAECDH_ALG_SS_HKDF_256
@ LWSCOAP_CONTENTFORMAT_COSE_MAC0
@ LWSCOSE_WKAECDH_ALG_SS_HKDF_512
@ LWSCOSE_WKAHMAC_512_512
@ LWSCOSE_WKL_KID_CONTEXT
@ LWSCOSE_WKAPCTX_PARTY_V_NONCE
@ LWSCOSE_WKAEDDSA_ALG_EDDSA
@ LWSCOSE_WKAECDH_ALG_ES_HKDF_256
@ LWSCOSE_WKAPCTX_PARTY_V_OTHER
@ LWSCOSE_WKKO_MAC_VERIFY
@ LWSCOSE_WKAPECDH_ES_A256KW
@ LWSCOSE_WKARSA_ALG_RS256
@ LWSCOSE_WKAAESCCM_16_128_128
@ LWSCOSE_WKAPECDH_SS_A192KW
lws_cose_sign_ext_pay_cb_t ext_cb
enum lws_cose_sig_types sigtype
lws_cose_sign_ext_pay_cb_t ext_cb
lws_cose_validate_pay_cb_t pay_cb
enum lws_cose_sig_types sigtype
lws_dll2_owner_t * keyset
struct lws_gencrypto_keyelem e[LWS_GENCRYPTO_MAX_KEYEL_COUNT]
struct lws_cose_key lws_cose_key_t
lws_dll2_owner_t * keyset
LWS_VISIBLE LWS_EXTERN void lws_cose_key_destroy(lws_cose_key_t **ck)
LWS_VISIBLE LWS_EXTERN void lws_cose_validate_destroy(struct lws_cose_validate_context **cps)
struct lws_cose_validate_create_info lws_cose_validate_create_info_t
LWS_VISIBLE LWS_EXTERN enum lws_lec_pctx_ret lws_cose_key_export(lws_cose_key_t *ck, lws_lec_pctx_t *ctx, int flags)
LWS_VISIBLE LWS_EXTERN lws_cose_key_t * lws_cose_key_import(lws_dll2_owner_t *pkey_set, lws_cose_key_import_callback cb, void *user, const uint8_t *in, size_t len)
LWS_VISIBLE LWS_EXTERN struct lws_cose_validate_context * lws_cose_validate_create(const lws_cose_validate_create_info_t *info)
int(* lws_cose_key_import_callback)(struct lws_cose_key *s, void *user)
struct lws_cose_validate_context * cps
LWS_VISIBLE LWS_EXTERN const char * lws_cose_alg_to_name(cose_param_t alg)
struct lws_cose_sign_create_info lws_cose_sign_create_info_t
#define LWS_GENCRYPTO_MAX_KEYEL_COUNT