/uoscore-uedhoc-3.5.0/test/oscore_unit_tests/ |
D | unit_test_oscore2coap.c | 37 .piv.ptr = NULL, in t300_oscore_option_parser_no_piv() 38 .piv.len = 0, in t300_oscore_option_parser_no_piv() 64 zassert_is_null(result.piv.ptr, "piv pointer not NULL"); in t300_oscore_option_parser_no_piv() 65 zassert_equal(result.piv.len, 0, "wrong piv len"); in t300_oscore_option_parser_no_piv() 102 uint8_t piv[] = { 0x01 }; in t302_oscore_option_parser_no_kid() local 108 .piv.ptr = piv, in t302_oscore_option_parser_no_kid() 109 .piv.len = sizeof(piv), in t302_oscore_option_parser_no_kid() 116 uint8_t val[2 + sizeof(kid_context) + sizeof(piv)]; in t302_oscore_option_parser_no_kid() 118 memcpy(&val[1], piv, sizeof(piv)); in t302_oscore_option_parser_no_kid() 119 val[1 + sizeof(piv)] = sizeof(kid_context); in t302_oscore_option_parser_no_kid() [all …]
|
D | unit_test_security_context.c | 23 struct byte_array piv = BYTE_ARRAY_INIT(piv_ptr, piv_size); in test_single_piv2ssn() local 24 enum err result = piv2ssn(&piv, &ssn); in test_single_piv2ssn() 32 struct byte_array piv = BYTE_ARRAY_INIT(buf, sizeof(buf)); in test_single_ssn2piv() local 33 enum err result = ssn2piv(ssn, &piv); in test_single_ssn2piv() 36 zassert_equal(piv.len, expected_size, "wrong PIV size"); in test_single_ssn2piv() 37 zassert_mem_equal(piv.ptr, expected_piv, expected_size, "wrong PIV value"); in test_single_ssn2piv()
|
D | unit_test_coap2oscore.c | 679 struct byte_array piv = BYTE_ARRAY_INIT(NULL, 0); in t106_oscore_option_generate_no_piv() local 684 enum err r = oscore_option_generate(&piv, &kid, &kid_context, in t106_oscore_option_generate_no_piv()
|
/uoscore-uedhoc-3.5.0/src/oscore/ |
D | aad.c | 25 struct byte_array *piv, struct byte_array *out) in create_aad() argument 35 aad_array._aad_array_request_piv.value = piv->ptr; in create_aad() 36 aad_array._aad_array_request_piv.len = piv->len; in create_aad() 38 PRINT_ARRAY("request_piv", piv->ptr, piv->len); in create_aad()
|
D | nonce.c | 21 enum err create_nonce(struct byte_array *id_piv, struct byte_array *piv, in create_nonce() argument 26 TRY(_memcpy_s(&padded_piv[sizeof(padded_piv) - piv->len], piv->len, in create_nonce() 27 piv->ptr, piv->len)); in create_nonce()
|
D | security_context.c | 183 enum err ssn2piv(uint64_t ssn, struct byte_array *piv) in ssn2piv() argument 185 if ((NULL == piv) || (NULL == piv->ptr) || in ssn2piv() 200 piv->ptr[0] = 0; in ssn2piv() 201 piv->len = 1; in ssn2piv() 205 piv->ptr[pos] = tmp_piv[len - 1 - pos]; in ssn2piv() 207 piv->len = len; in ssn2piv() 212 enum err piv2ssn(struct byte_array *piv, uint64_t *ssn) in piv2ssn() argument 214 if ((NULL == ssn) || (NULL == piv)) { in piv2ssn() 218 uint8_t *value = piv->ptr; in piv2ssn() 219 uint32_t len = piv->len; in piv2ssn()
|
D | oscore2coap.c | 62 out->piv.ptr = NULL; in oscore_option_parser() 63 out->piv.len = 0; in oscore_option_parser() 88 out->piv.ptr = NULL; in oscore_option_parser() 89 out->piv.len = 0; in oscore_option_parser() 97 out->piv.ptr = val_ptr; in oscore_option_parser() 98 out->piv.len = out->n; in oscore_option_parser() 273 request_piv = new_nonce_oscore_option->piv; in decrypt_wrapper() 287 &new_nonce_oscore_option->piv, in decrypt_wrapper() 381 piv2ssn(&oscore_option.piv, &ssn); in oscore2coap() 407 piv2ssn(&oscore_option.piv, &ssn); in oscore2coap() [all …]
|
D | replay_protection.c | 128 struct byte_array *piv) in replay_protection_check_notification() argument 131 TRY(piv2ssn(piv, &ssn)); in replay_protection_check_notification() 145 struct byte_array *piv) in notification_number_update() argument 147 TRY(piv2ssn(piv, notification_num)); in notification_number_update()
|
D | coap2oscore.c | 274 STATIC enum err oscore_option_generate(struct byte_array *piv, in oscore_option_generate() argument 279 uint32_t piv_len = (NULL == piv) ? 0 : piv->len; in oscore_option_generate() 301 (uint8_t)(oscore_option->value[0] | piv->len); in oscore_option_generate() 307 TRY(_memcpy_s(++temp_ptr, dest_size, piv->ptr, in oscore_option_generate() 308 piv->len)); in oscore_option_generate() 310 temp_ptr += piv->len; in oscore_option_generate() 506 struct byte_array piv = BYTE_ARRAY_INIT(NULL, 0); in encrypt_wrapper() local 526 piv = new_piv; in encrypt_wrapper() 534 TRY(oscore_option_generate(&piv, &kid, &kid_context, oscore_option)); in encrypt_wrapper() 540 struct byte_array request_piv = piv; in encrypt_wrapper()
|
/uoscore-uedhoc-3.5.0/inc/oscore/ |
D | replay_protection.h | 75 struct byte_array *piv); 87 struct byte_array *piv);
|
D | security_context.h | 107 enum err ssn2piv(uint64_t ssn, struct byte_array *piv); 115 enum err piv2ssn(struct byte_array *piv, uint64_t *ssn);
|
D | nonce.h | 25 enum err create_nonce(struct byte_array *id_piv, struct byte_array *piv,
|
D | oscore_coap.h | 59 struct byte_array piv; /*same as sender sequence number*/ member
|
/uoscore-uedhoc-3.5.0/inc/common/ |
D | unit_test.h | 48 enum err oscore_option_generate(struct byte_array *piv, struct byte_array *kid,
|