Home
last modified time | relevance | path

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

/optee_os/core/lib/libtomcrypt/
H A Dsha3_accel.c120 unsigned int digest_size = 0; in sha3_process() local
132 digest_size = md->sha3.capacity_words * 8 / 2; in sha3_process()
143 digest_size); in sha3_process()
154 digest_size); in sha3_process()
165 static void copy_out_digest(ulong64 *s, unsigned int digest_size, in copy_out_digest() argument
170 for (n = 0; n < digest_size / sizeof(uint64_t); n++) { in copy_out_digest()
175 if (digest_size % sizeof(uint64_t)) in copy_out_digest()
181 unsigned int digest_size = 0; in sha3_done() local
190 digest_size = md->sha3.capacity_words * 8 / 2; in sha3_done()
197 crypto_accel_sha3_compress(state, buf, 1, digest_size); in sha3_done()
[all …]
/optee_os/core/drivers/crypto/crypto_api/acipher/
H A Drsamgf.c29 lastBlock_size = mgf_data->mask.length % mgf_data->digest_size; in drvcrypt_rsa_mgf1()
32 tmpdigest = calloc(1, mgf_data->digest_size); in drvcrypt_rsa_mgf1()
43 mgf_data->digest_size; in drvcrypt_rsa_mgf1()
46 mgf_data->digest_size, nbBlock, lastBlock_size); in drvcrypt_rsa_mgf1()
49 counter++, cur_mask += mgf_data->digest_size) { in drvcrypt_rsa_mgf1()
66 ret = crypto_hash_final(ctx, cur_mask, mgf_data->digest_size); in drvcrypt_rsa_mgf1()
90 ret = crypto_hash_final(ctx, tmpdigest, mgf_data->digest_size); in drvcrypt_rsa_mgf1()
H A Drsassa.c49 ps_size -= ssa_data->digest_size; in emsa_pkcs1_v1_5_encode()
92 *buf++ = 0x08 + hash_oid->asn1_length + ssa_data->digest_size; in emsa_pkcs1_v1_5_encode()
106 *buf++ = ssa_data->digest_size; in emsa_pkcs1_v1_5_encode()
109 memcpy(buf, ssa_data->message.data, ssa_data->digest_size); in emsa_pkcs1_v1_5_encode()
356 ps_size = EM->length - ssa_data->digest_size - ssa_data->salt_len - 2; in emsa_pss_encode()
357 db_size = EM->length - ssa_data->digest_size - 1; in emsa_pss_encode()
358 msg_size = 8 + ssa_data->digest_size + ssa_data->salt_len; in emsa_pss_encode()
409 hash.length = ssa_data->digest_size; in emsa_pss_encode()
450 mgf_data.digest_size = ssa_data->digest_size; in emsa_pss_encode()
547 ps_size = EM->length - ssa_data->digest_size - ssa_data->salt_len - 2; in emsa_pss_verify()
[all …]
H A Drsa.c231 &rsa_data.digest_size); in crypto_acipher_rsaes_decrypt()
322 &rsa_data.digest_size); in crypto_acipher_rsaes_encrypt()
326 if (2 * rsa_data.digest_size >= rsa_data.key.n_size - 2) in crypto_acipher_rsaes_encrypt()
330 rsa_data.key.n_size - 2 * rsa_data.digest_size - 2) in crypto_acipher_rsaes_encrypt()
381 &rsa_ssa.digest_size); in crypto_acipher_rsassa_sign()
385 if (msg_len != rsa_ssa.digest_size) { in crypto_acipher_rsassa_sign()
387 rsa_ssa.digest_size); in crypto_acipher_rsassa_sign()
392 rsa_ssa.digest_size = 0; in crypto_acipher_rsassa_sign()
463 &rsa_ssa.digest_size); in crypto_acipher_rsassa_verify()
467 if (msg_len != rsa_ssa.digest_size) { in crypto_acipher_rsassa_verify()
[all …]
/optee_os/core/arch/arm/crypto/
H A Dsha3_armv8a_ce.c11 unsigned int block_count, unsigned int digest_size);
15 unsigned int digest_size) in crypto_accel_sha3_compress() argument
21 res = sha3_ce_transform(state, src, block_count, digest_size); in crypto_accel_sha3_compress()
/optee_os/core/tee/
H A Dtee_cryp_utl.c21 size_t digest_size = TEE_ALG_GET_DIGEST_SIZE(algo); in tee_alg_get_digest_size() local
23 if (!digest_size) in tee_alg_get_digest_size()
26 *size = digest_size; in tee_alg_get_digest_size()
/optee_os/core/drivers/crypto/crypto_api/include/
H A Ddrvcrypt_acipher.h38 size_t digest_size; /* Hash Digest Size */ member
49 size_t digest_size; /* Hash Digest Size */ member
66 size_t digest_size; /* Hash Digest Size */ member
/optee_os/core/drivers/crypto/hisilicon/
H A Dhpre_rsa.c110 static TEE_Result mgf_process(size_t digest_size, uint8_t *seed, in mgf_process() argument
122 mgf.digest_size = digest_size; in mgf_process()
386 size_t lhash_len = rsa_data->digest_size; in rsa_oaep_fill_db()
412 size_t lhash_len = rsa_data->digest_size; in rsa_oaep_fill_maskdb()
432 size_t lhash_len = rsa_data->digest_size; in rsa_oaep_fill_maskseed()
452 size_t lhash_len = rsa_data->digest_size; in rsa_oaep_encode()
841 size_t db_len = rsa_data->key.n_size - rsa_data->digest_size - 1; in rsa_oaep_get_seed()
843 size_t lhash_len = rsa_data->digest_size; in rsa_oaep_get_seed()
862 size_t db_len = rsa_data->key.n_size - rsa_data->digest_size - 1; in rsa_oaep_get_db()
863 size_t lhash_len = rsa_data->digest_size; in rsa_oaep_get_db()
[all …]
/optee_os/core/drivers/crypto/caam/acipher/
H A Dcaam_rsa.c817 db_size = rsa_data->key.n_size - rsa_data->digest_size - 1; in do_oaep_decoding()
832 retstatus = caam_calloc_align_buf(&lHash, rsa_data->digest_size); in do_oaep_decoding()
849 retstatus = caam_calloc_align_buf(&seed, rsa_data->digest_size); in do_oaep_decoding()
879 maskedSeed.length = rsa_data->digest_size; in do_oaep_decoding()
882 maskedDB.data = &EM.data[1 + rsa_data->digest_size]; in do_oaep_decoding()
884 maskedDB.paddr = EM.paddr + sizeof(uint8_t) + rsa_data->digest_size; in do_oaep_decoding()
894 mgf_data.digest_size = rsa_data->mgf_size; in do_oaep_decoding()
977 for (b01_idx = rsa_data->digest_size; in do_oaep_decoding()
1049 db_size = rsa_data->key.n_size - rsa_data->digest_size - 1; in do_oaep_encoding()
1063 lHash.length = rsa_data->digest_size; in do_oaep_encoding()
[all …]
/optee_os/core/include/crypto/
H A Dcrypto_accel.h51 unsigned int digest_size);
/optee_os/core/include/drivers/imx/
H A Ddcp.h178 size_t digest_size);
/optee_os/core/drivers/imx/dcp/
H A Ddcp.c584 size_t digest_size) in dcp_sha_do_final() argument
599 if (digest_size < hash_alg[hashdata->alg].size) { in dcp_sha_do_final()
/optee_os/scripts/
H A Dsign_rproc_fw.py222 self.size = (h.digest_size + 32) * self._num_segments
H A Dsign_encrypt.py363 self.hash_size = self.chosen_hash.digest_size