Home
last modified time | relevance | path

Searched refs:piv (Results 1 – 14 of 14) sorted by relevance

/uoscore-uedhoc-3.5.0/test/oscore_unit_tests/
Dunit_test_oscore2coap.c37 .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 …]
Dunit_test_security_context.c23 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()
Dunit_test_coap2oscore.c679 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/
Daad.c25 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()
Dnonce.c21 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()
Dsecurity_context.c183 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()
Doscore2coap.c62 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 …]
Dreplay_protection.c128 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()
Dcoap2oscore.c274 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/
Dreplay_protection.h75 struct byte_array *piv);
87 struct byte_array *piv);
Dsecurity_context.h107 enum err ssn2piv(uint64_t ssn, struct byte_array *piv);
115 enum err piv2ssn(struct byte_array *piv, uint64_t *ssn);
Dnonce.h25 enum err create_nonce(struct byte_array *id_piv, struct byte_array *piv,
Doscore_coap.h59 struct byte_array piv; /*same as sender sequence number*/ member
/uoscore-uedhoc-3.5.0/inc/common/
Dunit_test.h48 enum err oscore_option_generate(struct byte_array *piv, struct byte_array *kid,