Lines Matching refs:s

1025 static TEEC_Result mac_compute_final(ADBG_Case_t *c, TEEC_Session *s,
1030 static TEEC_Result cipher_do_final(ADBG_Case_t *c, TEEC_Session *s,
1058 TEEC_Session *s, in Invoke_Crypto_AllocateOperation() argument
1080 res = TEEC_InvokeCommand(s, cmd, &op, &ret_orig); in Invoke_Crypto_AllocateOperation()
1092 TEEC_Session *s, in Invoke_Crypto_GetOperationInfo() argument
1104 res = TEEC_InvokeCommand(s, cmd, &op, &ret_orig); in Invoke_Crypto_GetOperationInfo()
1128 TEEC_Session *s, in Invoke_Crypto_GetOperationInfoMultiple() argument
1144 res = TEEC_AllocateSharedMemory(s->ctx, &shm); in Invoke_Crypto_GetOperationInfoMultiple()
1154 res = TEEC_InvokeCommand(s, cmd, &op, &org); in Invoke_Crypto_GetOperationInfoMultiple()
1228 static TEEC_Result Invoke_Crypto_ResetOperation(ADBG_Case_t *c, TEEC_Session *s, in Invoke_Crypto_ResetOperation() argument
1232 return Invoke_Simple_Function_v1(c, s, cmd, op_handle, 0); in Invoke_Crypto_ResetOperation()
1236 TEEC_Session *s, in Invoke_Crypto_FreeAllKeysAndOperations() argument
1240 return Invoke_Simple_Function_v1(c, s, cmd, op_handle, 0); in Invoke_Crypto_FreeAllKeysAndOperations()
1292 Invoke_Crypto_InitObjectWithKeys(ADBG_Case_t *c, TEEC_Session *s, uint32_t cmd, in Invoke_Crypto_InitObjectWithKeys() argument
1315 res = TEEC_AllocateSharedMemory(s->ctx, &shm1); in Invoke_Crypto_InitObjectWithKeys()
1319 res = TEEC_AllocateSharedMemory(s->ctx, &shm2); in Invoke_Crypto_InitObjectWithKeys()
1349 res = TEEC_InvokeCommand(s, cmd, &op, &org); in Invoke_Crypto_InitObjectWithKeys()
1363 Invoke_Crypto_InitObjectWithKeysExt(ADBG_Case_t *c, TEEC_Session *s, in Invoke_Crypto_InitObjectWithKeysExt() argument
1373 return Invoke_Crypto_InitObjectWithKeys(c, s, cmd, obj_type, obj_size, in Invoke_Crypto_InitObjectWithKeysExt()
1382 TEEC_Session *s, uint32_t cmd, in Invoke_Crypto_SetOperationKey() argument
1386 TEEC_Result res = Invoke_Simple_Function_v1(c, s, cmd, op_handle, in Invoke_Crypto_SetOperationKey()
1399 TEEC_Session *s, in Invoke_Crypto_SetOperationKey2() argument
1405 TEEC_Result res = Invoke_Simple_Function_v2(c, s, cmd, op_handle, in Invoke_Crypto_SetOperationKey2()
1417 static TEEC_Result Invoke_Crypto_DeriveKey(ADBG_Case_t *c, TEEC_Session *s, in Invoke_Crypto_DeriveKey() argument
1435 return Invoke_Simple_Function_v2(c, s, cmd, op_handle, obj_handle, in Invoke_Crypto_DeriveKey()
1439 static TEEC_Result Invoke_Crypto_AEInit(ADBG_Case_t *c, TEEC_Session *s, in Invoke_Crypto_AEInit() argument
1454 res = TEEC_AllocateSharedMemory(s->ctx, &shm); in Invoke_Crypto_AEInit()
1468 res = TEEC_InvokeCommand(s, cmd, &op, &org); in Invoke_Crypto_AEInit()
1474 TEEC_Session *s, in Invoke_Crypto_AEUpdate_for_encryption() argument
1487 ALLOCATE_AND_FILL_SHARED_MEMORY(s->ctx, SHARE_MEM01, partd_length, in Invoke_Crypto_AEUpdate_for_encryption()
1490 ALLOCATE_SHARED_MEMORY(s->ctx, SHARE_MEM02, DS_BIG_SIZE, in Invoke_Crypto_AEUpdate_for_encryption()
1510 res = TEEC_InvokeCommand(s, cmd, &op, &org); in Invoke_Crypto_AEUpdate_for_encryption()
1538 TEEC_Session *s, in Invoke_Crypto_AEUpdate_for_decryption() argument
1550 ALLOCATE_AND_FILL_SHARED_MEMORY(s->ctx, SHARE_MEM01, in Invoke_Crypto_AEUpdate_for_decryption()
1556 ALLOCATE_SHARED_MEMORY(s->ctx, SHARE_MEM02, partd_length, in Invoke_Crypto_AEUpdate_for_decryption()
1574 res = TEEC_InvokeCommand(s, cmd, &op, &ret_orig); in Invoke_Crypto_AEUpdate_for_decryption()
1604 static TEEC_Result Invoke_Crypto_AEUpdateAAD(ADBG_Case_t *c, TEEC_Session *s, in Invoke_Crypto_AEUpdateAAD() argument
1614 ALLOCATE_AND_FILL_SHARED_MEMORY(s->ctx, SHARE_MEM01, aad_length, in Invoke_Crypto_AEUpdateAAD()
1626 res = TEEC_InvokeCommand(s, cmd, &op, &ret_orig); in Invoke_Crypto_AEUpdateAAD()
1641 static TEEC_Result Invoke_Crypto_AEEncryptFinal(ADBG_Case_t *c, TEEC_Session *s, in Invoke_Crypto_AEEncryptFinal() argument
1656 ALLOCATE_AND_FILL_SHARED_MEMORY(s->ctx, SHARE_MEM01, partd_length, in Invoke_Crypto_AEEncryptFinal()
1659 ALLOCATE_SHARED_MEMORY(s->ctx, SHARE_MEM02, partd_length, in Invoke_Crypto_AEEncryptFinal()
1661 ALLOCATE_SHARED_MEMORY(s->ctx, SHARE_MEM03, partd_length, in Invoke_Crypto_AEEncryptFinal()
1695 res = TEEC_InvokeCommand(s, cmd, &op, &ret_orig); in Invoke_Crypto_AEEncryptFinal()
1736 static TEEC_Result Invoke_Crypto_AEDecryptFinal(ADBG_Case_t *c, TEEC_Session *s, in Invoke_Crypto_AEDecryptFinal() argument
1752 ALLOCATE_AND_FILL_SHARED_MEMORY(s->ctx, SHARE_MEM01, in Invoke_Crypto_AEDecryptFinal()
1758 ALLOCATE_SHARED_MEMORY(s->ctx, SHARE_MEM02, partd_length, in Invoke_Crypto_AEDecryptFinal()
1760 ALLOCATE_SHARED_MEMORY(s->ctx, SHARE_MEM03, ae_encrypt_tag.size, in Invoke_Crypto_AEDecryptFinal()
1794 res = TEEC_InvokeCommand(s, cmd, &op, &ret_orig); in Invoke_Crypto_AEDecryptFinal()
1832 static TEEC_Result Invoke_Crypto_GenerateRandom(ADBG_Case_t *c, TEEC_Session *s, in Invoke_Crypto_GenerateRandom() argument
1839 ALLOCATE_SHARED_MEMORY(s->ctx, SHARE_MEM01, BIG_SIZE, in Invoke_Crypto_GenerateRandom()
1848 res = TEEC_InvokeCommand(s, cmd, &op, &ret_orig); in Invoke_Crypto_GenerateRandom()
1886 static TEEC_Result Invoke_Crypto_DigestUpdate(ADBG_Case_t *c, TEEC_Session *s, in Invoke_Crypto_DigestUpdate() argument
1895 ALLOCATE_AND_FILL_SHARED_MEMORY(s->ctx, SHARE_MEM01, partd_length, in Invoke_Crypto_DigestUpdate()
1907 res = TEEC_InvokeCommand(s, cmd, &op, &ret_orig); in Invoke_Crypto_DigestUpdate()
1914 static TEEC_Result Invoke_Crypto_DigestDoFinal(ADBG_Case_t *c, TEEC_Session *s, in Invoke_Crypto_DigestDoFinal() argument
1927 ALLOCATE_AND_FILL_SHARED_MEMORY(s->ctx, SHARE_MEM01, partd_length, in Invoke_Crypto_DigestDoFinal()
1930 ALLOCATE_SHARED_MEMORY(s->ctx, SHARE_MEM02, fdata_length, in Invoke_Crypto_DigestDoFinal()
1948 res = TEEC_InvokeCommand(s, cmd, &op, &ret_orig); in Invoke_Crypto_DigestDoFinal()
1984 Invoke_Crypto_AsymmetricSignDigest(ADBG_Case_t *c, TEEC_Session *s, in Invoke_Crypto_AsymmetricSignDigest() argument
1998 ALLOCATE_AND_FILL_SHARED_MEMORY(s->ctx, SHARE_MEM01, in Invoke_Crypto_AsymmetricSignDigest()
2002 ALLOCATE_SHARED_MEMORY(s->ctx, SHARE_MEM02, 512, in Invoke_Crypto_AsymmetricSignDigest()
2023 res = TEEC_InvokeCommand(s, cmd, &op, &ret_orig); in Invoke_Crypto_AsymmetricSignDigest()
2049 Invoke_Crypto_AsymmetricVerifyDigest(ADBG_Case_t *c, TEEC_Session *s, in Invoke_Crypto_AsymmetricVerifyDigest() argument
2060 ALLOCATE_AND_FILL_SHARED_MEMORY(s->ctx, SHARE_MEM01, fdata_length, in Invoke_Crypto_AsymmetricVerifyDigest()
2063 ALLOCATE_SHARED_MEMORY(s->ctx, SHARE_MEM02, 512, in Invoke_Crypto_AsymmetricVerifyDigest()
2096 res = TEEC_InvokeCommand(s, cmd, &op, &ret_orig); in Invoke_Crypto_AsymmetricVerifyDigest()
2108 TEEC_Session *s, in Invoke_Crypto_AsymmetricEncrypt() argument
2121 ALLOCATE_AND_FILL_SHARED_MEMORY(s->ctx, SHARE_MEM01, fdata_length, in Invoke_Crypto_AsymmetricEncrypt()
2126 ALLOCATE_SHARED_MEMORY(s->ctx, SHARE_MEM02, 512, in Invoke_Crypto_AsymmetricEncrypt()
2146 res = TEEC_InvokeCommand(s, cmd, &op, &ret_orig); in Invoke_Crypto_AsymmetricEncrypt()
2175 TEEC_Session *s, in Invoke_Crypto_AsymmetricDecrypt() argument
2191 ALLOCATE_AND_FILL_SHARED_MEMORY(s->ctx, SHARE_MEM01, in Invoke_Crypto_AsymmetricDecrypt()
2196 ALLOCATE_SHARED_MEMORY(s->ctx, SHARE_MEM02, 512, in Invoke_Crypto_AsymmetricDecrypt()
2217 res = TEEC_InvokeCommand(s, cmd, &op, &ret_orig); in Invoke_Crypto_AsymmetricDecrypt()
2257 static TEEC_Result Invoke_Crypto_CopyOperation(ADBG_Case_t *c, TEEC_Session *s, in Invoke_Crypto_CopyOperation() argument
2261 return Invoke_Simple_Function_v1(c, s, cmd, dst_oph, src_oph); in Invoke_Crypto_CopyOperation()
2265 ADBG_Case_t *c, TEEC_Session *s, in Invoke_Crypto_MACInit() argument
2273 ALLOCATE_AND_FILL_SHARED_MEMORY(s->ctx, SHARE_MEM06, iv_len, in Invoke_Crypto_MACInit()
2283 res = TEEC_InvokeCommand(s, cmd, &op, &ret_orig); in Invoke_Crypto_MACInit()
2302 ADBG_Case_t *c, TEEC_Session *s, in Invoke_Crypto_MACUpdate() argument
2310 ALLOCATE_AND_FILL_SHARED_MEMORY(s->ctx, SHARE_MEM01, partd_length, in Invoke_Crypto_MACUpdate()
2322 res = TEEC_InvokeCommand(s, cmd, &op, &ret_orig); in Invoke_Crypto_MACUpdate()
2331 ADBG_Case_t *c, TEEC_Session *s, in Invoke_Crypto_MACCompareFinal() argument
2342 ALLOCATE_AND_FILL_SHARED_MEMORY(s->ctx, SHARE_MEM01, partd_length, in Invoke_Crypto_MACCompareFinal()
2345 ALLOCATE_SHARED_MEMORY(s->ctx, SHARE_MEM02, fdata_length, in Invoke_Crypto_MACCompareFinal()
2351 res = mac_compute_final(c, s, full_data, fdata_length, &mac); in Invoke_Crypto_MACCompareFinal()
2372 res = TEEC_InvokeCommand(s, cmd, &op, &ret_orig); in Invoke_Crypto_MACCompareFinal()
2385 ADBG_Case_t *c, TEEC_Session *s, in Invoke_Crypto_MACComputeFinal() argument
2396 ALLOCATE_AND_FILL_SHARED_MEMORY(s->ctx, SHARE_MEM01, partd_length, in Invoke_Crypto_MACComputeFinal()
2399 ALLOCATE_SHARED_MEMORY(s->ctx, SHARE_MEM02, fdata_length, in Invoke_Crypto_MACComputeFinal()
2417 res = TEEC_InvokeCommand(s, cmd, &op, &ret_orig); in Invoke_Crypto_MACComputeFinal()
2425 mac_compute_final(c, s, in Invoke_Crypto_MACComputeFinal()
2453 ADBG_Case_t *c, TEEC_Session *s, in Invoke_Crypto_CipherInit() argument
2461 ALLOCATE_AND_FILL_SHARED_MEMORY(s->ctx, SHARE_MEM01, iv_len, in Invoke_Crypto_CipherInit()
2472 res = TEEC_InvokeCommand(s, cmd, &op, &ret_orig); in Invoke_Crypto_CipherInit()
2496 ADBG_Case_t *c, TEEC_Session *s, in Invoke_Crypto_CipherUpdate() argument
2506 ALLOCATE_AND_FILL_SHARED_MEMORY(s->ctx, SHARE_MEM01, partd_length, in Invoke_Crypto_CipherUpdate()
2509 ALLOCATE_SHARED_MEMORY(s->ctx, SHARE_MEM02, partd_length, in Invoke_Crypto_CipherUpdate()
2529 res = TEEC_InvokeCommand(s, cmd, &op, &ret_orig); in Invoke_Crypto_CipherUpdate()
2561 ADBG_Case_t *c, TEEC_Session *s, in Invoke_Crypto_CipherDoFinal() argument
2571 ALLOCATE_AND_FILL_SHARED_MEMORY(s->ctx, SHARE_MEM01, partd_length, in Invoke_Crypto_CipherDoFinal()
2576 ALLOCATE_SHARED_MEMORY(s->ctx, SHARE_MEM02, fulld_length, in Invoke_Crypto_CipherDoFinal()
2596 res = TEEC_InvokeCommand(s, cmd, &op, &ret_orig); in Invoke_Crypto_CipherDoFinal()
2622 cipher_do_final(c, s, in Invoke_Crypto_CipherDoFinal()
2649 static TEEC_Result Invoke_Crypto_FreeOperation(ADBG_Case_t *c, TEEC_Session *s, in Invoke_Crypto_FreeOperation() argument
2652 return Invoke_Simple_Function_v1(c, s, cmd, oph, 0); in Invoke_Crypto_FreeOperation()
2885 const BIGNUM *s = NULL; in dsa_sign_digest() local
2909 DSA_SIG_get0(sig, &r, &s); in dsa_sign_digest()
2911 BN_bn2bin(s, out_dgst->buffer + out_dgst->size - BN_num_bytes(s)); in dsa_sign_digest()
2928 BIGNUM *s = NULL; in dsa_verify_digest() local
2941 s = BN_bin2bn(in_sdgst->buffer + in_sdgst->size / 2, in dsa_verify_digest()
2943 if (!ADBG_EXPECT_NOT_NULL(c, s)) { in dsa_verify_digest()
2947 DSA_SIG_set0(sig, r, s); in dsa_verify_digest()
3012 const BIGNUM *s = NULL; in ecdsa_sign_digest() local
3027 ECDSA_SIG_get0(sig, &r, &s); in ecdsa_sign_digest()
3029 BN_bn2bin(s, out_dgst->buffer + out_dgst->size - BN_num_bytes(s)); in ecdsa_sign_digest()
3046 BIGNUM *s = NULL; in ecdsa_verify_digest() local
3059 s = BN_bin2bn(in_sdgst->buffer + in_sdgst->size / 2, in ecdsa_verify_digest()
3061 if (!ADBG_EXPECT_NOT_NULL(c, s)) { in ecdsa_verify_digest()
3065 ECDSA_SIG_set0(sig, r, s); in ecdsa_verify_digest()
3339 ADBG_Case_t *c, TEEC_Session *s, in mac_compute_final() argument
3348 res = Invoke_Crypto_AllocateOperation(c, s, CMD_Crypto_AllocateOperation, in mac_compute_final()
3356 res = Invoke_Crypto_SetOperationKey2(c, s, CMD_Crypto_SetOperationKey2, in mac_compute_final()
3364 res = Invoke_Crypto_SetOperationKey(c, s, CMD_Crypto_SetOperationKey, in mac_compute_final()
3371 res = Invoke_Crypto_MACInit(c, s, CMD_Crypto_MACInit, op1, in mac_compute_final()
3379 ALLOCATE_AND_FILL_SHARED_MEMORY(s->ctx, SHARE_MEM04, fdata_length, in mac_compute_final()
3382 ALLOCATE_SHARED_MEMORY(s->ctx, SHARE_MEM05, fdata_length, in mac_compute_final()
3395 res = TEEC_InvokeCommand(s, CMD_Crypto_MACComputeFinal, &op, &ret_orig); in mac_compute_final()
3407 Invoke_Crypto_FreeOperation(c, s, CMD_Crypto_FreeOperation, op1); in mac_compute_final()
3413 ADBG_Case_t *c, TEEC_Session *s, in cipher_do_final() argument
3422 res = Invoke_Crypto_AllocateOperation(c, s, CMD_Crypto_AllocateOperation, in cipher_do_final()
3431 res = Invoke_Crypto_SetOperationKey2(c, s, CMD_Crypto_SetOperationKey2, in cipher_do_final()
3439 res = Invoke_Crypto_SetOperationKey(c, s, CMD_Crypto_SetOperationKey, in cipher_do_final()
3447 ALLOCATE_AND_FILL_SHARED_MEMORY(s->ctx, SHARE_MEM04, fdata_length, in cipher_do_final()
3462 res = TEEC_InvokeCommand(s, CMD_Crypto_CipherInit, &op, &ret_orig); in cipher_do_final()
3471 ALLOCATE_AND_FILL_SHARED_MEMORY(s->ctx, SHARE_MEM04, fdata_length, in cipher_do_final()
3474 ALLOCATE_SHARED_MEMORY(s->ctx, SHARE_MEM05, fdata_length, in cipher_do_final()
3487 res = TEEC_InvokeCommand(s, CMD_Crypto_CipherDoFinal, &op, &ret_orig); in cipher_do_final()
3500 Invoke_Crypto_FreeOperation(c, s, CMD_Crypto_FreeOperation, op1); in cipher_do_final()
3506 TEEC_Session *s, in Invoke_Crypto_EnsureIntermediateBufferSize() argument
3510 return Invoke_Simple_Function_v1(c, s, cmd, oph, 0); in Invoke_Crypto_EnsureIntermediateBufferSize()
3514 TEEC_Session *s, uint32_t cmd, in Invoke_AllocateTransientObject() argument
3519 return Invoke_Simple_Function_v2(c, s, cmd, oph, 0, obj_type, in Invoke_AllocateTransientObject()
3523 static TEEC_Result Invoke_RestrictObjectUsage1(ADBG_Case_t *c, TEEC_Session *s, in Invoke_RestrictObjectUsage1() argument
3528 return Invoke_Simple_Function_v1(c, s, cmd, obj_handle, obj_usage); in Invoke_RestrictObjectUsage1()