Home
last modified time | relevance | path

Searched refs:sec_ctx (Results 1 – 6 of 6) sorted by relevance

/Zephyr-Core-3.7.0/subsys/net/l2/ieee802154/
Dieee802154_security.c25 int ieee802154_security_setup_session(struct ieee802154_security_ctx *sec_ctx, uint8_t level, in ieee802154_security_setup_session() argument
43 sec_ctx->level = level; in ieee802154_security_setup_session()
58 sec_ctx->enc.mode_params.ccm_info.tag_len = authtag_len; in ieee802154_security_setup_session()
59 sec_ctx->dec.mode_params.ccm_info.tag_len = authtag_len; in ieee802154_security_setup_session()
61 memcpy(sec_ctx->key, key, key_len); in ieee802154_security_setup_session()
62 sec_ctx->key_len = key_len; in ieee802154_security_setup_session()
63 sec_ctx->key_mode = key_mode; in ieee802154_security_setup_session()
65 sec_ctx->enc.key.bit_stream = sec_ctx->key; in ieee802154_security_setup_session()
66 sec_ctx->enc.keylen = sec_ctx->key_len; in ieee802154_security_setup_session()
68 sec_ctx->dec.key.bit_stream = sec_ctx->key; in ieee802154_security_setup_session()
[all …]
Dieee802154_security.h18 int ieee802154_security_setup_session(struct ieee802154_security_ctx *sec_ctx, uint8_t level,
21 void ieee802154_security_teardown_session(struct ieee802154_security_ctx *sec_ctx);
35 bool ieee802154_decrypt_auth(struct ieee802154_security_ctx *sec_ctx, uint8_t *frame,
50 bool ieee802154_encrypt_auth(struct ieee802154_security_ctx *sec_ctx, uint8_t *frame,
54 int ieee802154_security_init(struct ieee802154_security_ctx *sec_ctx);
Dieee802154_frame.c473 struct ieee802154_security_ctx *sec_ctx = &ctx->sec_ctx; in ieee802154_compute_header_and_authtag_len() local
474 if (sec_ctx->level == IEEE802154_SECURITY_LEVEL_NONE) { in ieee802154_compute_header_and_authtag_len()
481 switch (sec_ctx->key_mode) { in ieee802154_compute_header_and_authtag_len()
497 if (sec_ctx->level < IEEE802154_SECURITY_LEVEL_ENC) { in ieee802154_compute_header_and_authtag_len()
498 tag_len = level_2_authtag_len[sec_ctx->level]; in ieee802154_compute_header_and_authtag_len()
500 tag_len = level_2_authtag_len[sec_ctx->level - 4U]; in ieee802154_compute_header_and_authtag_len()
644 static uint8_t *generate_aux_security_hdr(struct ieee802154_security_ctx *sec_ctx, uint8_t *p_buf) in generate_aux_security_hdr() argument
648 if (sec_ctx->level == IEEE802154_SECURITY_LEVEL_NONE) { in generate_aux_security_hdr()
652 if (sec_ctx->key_mode != IEEE802154_KEY_ID_MODE_IMPLICIT) { in generate_aux_security_hdr()
659 aux_sec->control.security_level = sec_ctx->level; in generate_aux_security_hdr()
[all …]
Dieee802154_mgmt.c511 cmd->assoc_req.ci.sec_capability = ctx->sec_ctx.level > IEEE802154_SECURITY_LEVEL_NONE; in ieee802154_associate()
910 ieee802154_security_teardown_session(&ctx->sec_ctx); in ieee802154_set_security_settings()
912 if (ieee802154_security_setup_session(&ctx->sec_ctx, params->level, in ieee802154_set_security_settings()
942 memcpy(params->key, ctx->sec_ctx.key, ctx->sec_ctx.key_len); in ieee802154_get_security_settings()
943 params->key_len = ctx->sec_ctx.key_len; in ieee802154_get_security_settings()
944 params->key_mode = ctx->sec_ctx.key_mode; in ieee802154_get_security_settings()
945 params->level = ctx->sec_ctx.level; in ieee802154_get_security_settings()
Dieee802154.c669 if (ieee802154_security_init(&ctx->sec_ctx)) { in ieee802154_init()
/Zephyr-Core-3.7.0/include/zephyr/net/
Dieee802154.h303 struct ieee802154_security_ctx sec_ctx; member