/base/security/device_auth/frameworks/deviceauth_lite/inc/huks_adapter/ |
H A D | huks_adapter.h | 182 int32_t sign(struct hc_key_alias *key_alias, const struct uint8_buff *message, struct signature *out_signature); 194 int32_t verify(struct hc_key_alias *key_alias, const int32_t user_type, const struct uint8_buff *message, 208 int32_t verify_with_public_key(const int32_t user_type, const struct uint8_buff *message, 245 int32_t compute_hmac(struct var_buffer *key, const struct uint8_buff *message, struct hmac *out_hmac); 267 int32_t aes_gcm_encrypt(struct var_buffer *key, const struct uint8_buff *plain, 268 struct aes_aad *aad, struct uint8_buff *out_cipher); 279 int32_t aes_gcm_decrypt(struct var_buffer *key, const struct uint8_buff *cipher, 280 struct aes_aad *aad, struct uint8_buff *out_plain); 285 int32_t aes_ccm_decrypt(struct var_buffer *key, const struct uint8_buff *cipher, 286 struct aes_aad *aad, struct uint8_buff *out_plai [all...] |
/base/security/device_auth/frameworks/deviceauth_lite/test/unittest/ |
H A D | huks_adapter_test.h | 186 int32_t sign(struct hc_key_alias *key_alias, const struct uint8_buff *message, struct signature *out_signature); 198 int32_t verify(struct hc_key_alias *key_alias, const int32_t user_type, const struct uint8_buff *message, 212 int32_t verify_with_public_key(const int32_t user_type, const struct uint8_buff *message, 249 int32_t compute_hmac(struct var_buffer *key, const struct uint8_buff *message, struct hmac *out_hmac); 271 int32_t aes_gcm_encrypt(struct var_buffer *key, const struct uint8_buff *plain, 272 struct aes_aad *aad, struct uint8_buff *out_cipher); 283 int32_t aes_gcm_decrypt(struct var_buffer *key, const struct uint8_buff *cipher, 284 struct aes_aad *aad, struct uint8_buff *out_plain); 289 int32_t aes_ccm_decrypt(struct var_buffer *key, const struct uint8_buff *cipher, 290 struct aes_aad *aad, struct uint8_buff *out_plai [all...] |
H A D | auth_info_test.h | 31 struct uint8_buff cipher; 63 int32_t encrypt_payload(const struct var_buffer *key, const struct uint8_buff *plain, 64 const char *aad, struct uint8_buff *payload); 65 int32_t decrypt_payload(const struct var_buffer *key, const struct uint8_buff *payload, 66 const char *aad, struct uint8_buff *plain);
|
H A D | hichain_receivedata_test.cpp | 159 uint8_buff data = { in HWTEST_F() 186 uint8_buff data = { in HWTEST_F() 240 uint8_buff data001 = { in HWTEST_F() 248 uint8_buff data002 = { in HWTEST_F() 256 uint8_buff data003 = { in HWTEST_F() 296 uint8_buff data001 = { in HWTEST_F() 336 uint8_buff data001 = { in HWTEST_F() 347 uint8_buff data002 = { in HWTEST_F() 390 uint8_buff data001 = { in HWTEST_F() 397 uint8_buff data00 in HWTEST_F() [all...] |
H A D | huks_adapter_test.cpp | 39 int32_t GenerateSignMessage(hc_handle handle, struct uint8_buff *message); 576 struct uint8_buff message; in HWTEST_F() 595 struct uint8_buff message = { in HWTEST_F() 623 struct uint8_buff message = { in HWTEST_F() 659 struct uint8_buff message; in HWTEST_F() 701 struct uint8_buff message; in HWTEST_F() 725 struct uint8_buff message; in HWTEST_F() 863 struct uint8_buff message = { in HWTEST_F() 884 struct uint8_buff message; in HWTEST_F() 934 struct uint8_buff messag in HWTEST_F() [all...] |
H A D | hichain_pake_test.cpp | 169 struct uint8_buff data001 = { in HWTEST_F() 177 struct uint8_buff data002 = { in HWTEST_F() 184 struct uint8_buff data003 = { in HWTEST_F()
|
/base/security/device_auth/frameworks/deviceauth_lite/inc/auth_info/ |
H A D | auth_info.h | 27 struct uint8_buff cipher; 59 int32_t encrypt_payload(const struct var_buffer *key, const struct uint8_buff *plain, 60 const char *aad, struct uint8_buff *payload); 61 int32_t decrypt_payload(const struct var_buffer *key, const struct uint8_buff *payload, 62 const char *aad, struct uint8_buff *plain);
|
/base/security/device_auth/frameworks/deviceauth_lite/source/auth_info/ |
H A D | exchange_auth_info_client.c | 37 static int32_t get_field_from_request_payload(struct uint8_buff *payload, struct signature *sign_result, 39 static int32_t verify_peer_public_key(const struct hichain *hichain, struct uint8_buff *auth_info, 99 struct uint8_buff plain = { 0, 0, 0 }; in parse_exchange_response_data() 114 struct uint8_buff *auth_info = &plain; in parse_exchange_response_data() 126 static int32_t build_auth_info(struct uint8_buff *auth_info, const struct hc_auth_id *auth_id, struct ltpk *ltpk); 127 static int32_t sign_self_public_key(const struct hichain *hichain, struct uint8_buff *auth_info, 140 struct uint8_buff auth_info = { NULL, 0, 0 }; in build_exchange_request() 153 struct uint8_buff plain; in build_exchange_request() 220 static int32_t parse_auth_info(const struct uint8_buff *auth_info, struct hc_auth_id *auth_id, struct ltpk *ltpk); 221 static int32_t get_field_from_request_payload(struct uint8_buff *payloa [all...] |
H A D | auth_info.c | 75 int32_t encrypt_payload(const struct var_buffer *key, const struct uint8_buff *plain, in encrypt_payload() 76 const char *aad, struct uint8_buff *payload) in encrypt_payload() 93 int32_t decrypt_payload(const struct var_buffer *key, const struct uint8_buff *payload, in decrypt_payload() 94 const char *aad, struct uint8_buff *plain) in decrypt_payload()
|
H A D | remove_auth_info.c | 68 static int32_t get_field_from_request_payload(struct uint8_buff *payload, int32_t *user_type, 78 struct uint8_buff plain = { 0, 0, 0 }; in parse_remove_request_data() 101 struct uint8_buff plain = { in build_remove_response_data() 145 static int32_t get_field_from_request_payload(struct uint8_buff *payload, int32_t *user_type, in get_field_from_request_payload()
|
H A D | remove_auth_info_client.c | 75 struct uint8_buff payload = { NULL, 0, 0 }; in build_remove_request_data() 76 struct uint8_buff plain = { NULL, 0, 0 }; in build_remove_request_data() 125 struct uint8_buff plain = { 0, 0, 0 }; in parse_remove_response_data()
|
/base/security/device_auth/frameworks/deviceauth_lite/source/struct/ |
H A D | sec_clone_data.c | 29 struct uint8_buff *data = (struct uint8_buff *)obj; in free_single_buff() 40 struct uint8_buff *request_data = (struct uint8_buff *)MALLOC(sizeof(struct uint8_buff)); in get_single_json_from_buff() 80 struct uint8_buff *src_data = data; in make_single_json_data() 105 struct uint8_buff *src_data = data; in make_single_json_data_srv_proof()
|
/base/security/device_auth/frameworks/deviceauth_lite/inc/key_agreement/ |
H A D | sec_clone_server.h | 35 struct uint8_buff start_request_data; 36 struct uint8_buff client_sec_data;
|
/base/security/device_auth/frameworks/deviceauth_lite/source/key_agreement/ |
H A D | sts_client.c | 142 static int32_t generate_sign_message(void *handle, struct uint8_buff *message) in generate_sign_message() 172 static int32_t verify_response_data(void *handle, const struct uint8_buff *message, struct signature *signature) in verify_response_data() 249 struct uint8_buff sign_message = { info, len, len }; in generate_sts_request_sign() 261 static int32_t init_auth_data(struct uint8_buff *auth_data) in init_auth_data() 286 struct uint8_buff out_plain = { 0, 0, 0 }; in init_signature() 296 struct uint8_buff auth_data = {sts_client->peer_auth_data.auth_data, sts_client->peer_auth_data.length, in init_signature() 323 struct uint8_buff message; in verify_data() 355 struct uint8_buff out_auth_data; in build_end_request_data() 369 struct uint8_buff plain = {request_sign.signature, request_sign.length, request_sign.length}; in build_end_request_data() 393 struct uint8_buff auth_re in parse_end_response_data() [all...] |
H A D | pake_client.c | 339 struct uint8_buff challenge = { in generate_proof() 369 struct uint8_buff challenge = {.size = CHALLENGE_BUFF_LENGTH + CHALLENGE_BUFF_LENGTH}; in verify_proof_is_ok()
|
/base/security/device_auth/interfaces/inner_api/deviceauth_lite/ |
H A D | hichain.h | 170 struct uint8_buff { struct 301 DLL_API_PUBLIC int32_t receive_data(hc_handle handle, struct uint8_buff *data); 404 DLL_API_PUBLIC void set_self_auth_id(hc_handle handle, struct uint8_buff *data);
|
/base/security/device_auth/frameworks/deviceauth_lite/test/fuzztest/receivedata_fuzzer/ |
H A D | receivedata_fuzzer.cpp | 110 struct uint8_buff buff; in ReceiveDataFuzz()
|
/base/security/device_auth/frameworks/deviceauth_lite/source/huks_adapter/ |
H A D | huks_adapter.c | 70 CREATE_STRUCT(uint8_buff) 199 static struct sha256_value sha256(const struct uint8_buff *message) in sha256() 396 int32_t compute_hmac(struct var_buffer *key, const struct uint8_buff *message, struct hmac *out_hmac) in compute_hmac() 548 int32_t aes_gcm_encrypt(struct var_buffer *key, const struct uint8_buff *plain, in aes_gcm_encrypt() 549 struct aes_aad *aad, struct uint8_buff *out_cipher) in aes_gcm_encrypt() 590 const struct uint8_buff *cipher, struct aes_aad *aad, uint32_t key_byte_size) in init_aes_gcm_decrypt_param_set() 635 int32_t aes_gcm_decrypt(struct var_buffer *key, const struct uint8_buff *cipher, in aes_gcm_decrypt() 636 struct aes_aad *aad, struct uint8_buff *out_plain) in aes_gcm_decrypt() 705 struct uint8_buff id_buff = { in generate_service_id() 797 struct uint8_buff key_alias_buf in generate_key_alias() [all...] |
/base/security/device_auth/frameworks/deviceauth_lite/test/unittest/unittest_mock/ |
H A D | huks_adapter_mock_for_pake.c | 70 CREATE_STRUCT(uint8_buff) 179 static struct sha256_value sha256(const struct uint8_buff *message) in sha256() 369 int32_t compute_hmac(struct var_buffer *key, const struct uint8_buff *message, struct hmac *out_hmac) in compute_hmac() 502 int32_t aes_gcm_encrypt(struct var_buffer *key, const struct uint8_buff *plain, in aes_gcm_encrypt() 503 struct aes_aad *aad, struct uint8_buff *out_cipher) in aes_gcm_encrypt() 544 const struct uint8_buff *cipher, struct aes_aad *aad, uint32_t key_byte_size) in init_aes_gcm_decrypt_param_set() 580 int32_t aes_gcm_decrypt(struct var_buffer *key, const struct uint8_buff *cipher, in aes_gcm_decrypt() 581 struct aes_aad *aad, struct uint8_buff *out_plain) in aes_gcm_decrypt() 649 struct uint8_buff id_buff = { in generate_service_id() 741 struct uint8_buff key_alias_buf in generate_key_alias() [all...] |
H A D | huks_adapter_mock.c | 70 CREATE_STRUCT(uint8_buff) 179 static struct sha256_value sha256(const struct uint8_buff *message) in sha256() 369 int32_t compute_hmac(struct var_buffer *key, const struct uint8_buff *message, struct hmac *out_hmac) in compute_hmac() 502 int32_t aes_gcm_encrypt(struct var_buffer *key, const struct uint8_buff *plain, in aes_gcm_encrypt() 503 struct aes_aad *aad, struct uint8_buff *out_cipher) in aes_gcm_encrypt() 546 int32_t aes_gcm_decrypt(struct var_buffer *key, const struct uint8_buff *cipher, in aes_gcm_decrypt() 547 struct aes_aad *aad, struct uint8_buff *out_plain) in aes_gcm_decrypt() 578 struct uint8_buff id_buff = { in generate_service_id() 670 struct uint8_buff key_alias_buff; in generate_key_alias() 1309 int32_t sign(struct hc_key_alias *key_alias, const struct uint8_buff *messag [all...] |
/base/security/device_auth/frameworks/deviceauth_lite/source/ |
H A D | hichain.c | 55 static int32_t deserialize_message(const struct uint8_buff *data, struct message *receive); 64 static int32_t GetErrorCode(const struct uint8_buff *data, int32_t *errorCode); 143 DLL_API_PUBLIC int32_t receive_data(hc_handle handle, struct uint8_buff *data) in receive_data() 625 static int32_t deserialize_message(const struct uint8_buff *data, struct message *receive) in deserialize_message() 796 struct uint8_buff *data = message->payload; in destroy_send_data() 800 struct uint8_buff *data = message->payload; in destroy_send_data() 939 static int32_t GetErrorCode(const struct uint8_buff *data, int32_t *errorCode) in GetErrorCode()
|