Home
last modified time | relevance | path

Searched refs:cbc (Results 1 – 25 of 38) sorted by relevance

12

/optee_os/core/lib/libtomcrypt/src/modes/cbc/
A Dcbc_encrypt.c34 LTC_ARGCHK(cbc != NULL); in cbc_encrypt()
41 if (cbc->blocklen < 1 || cbc->blocklen > (int)sizeof(cbc->IV)) { in cbc_encrypt()
45 if (len % cbc->blocklen) { in cbc_encrypt()
55 …return cipher_descriptor[cbc->cipher]->accel_cbc_encrypt(pt, ct, len / cbc->blocklen, cbc->IV, &cb… in cbc_encrypt()
64 for (x = 0; x < cbc->blocklen; x++) { in cbc_encrypt()
65 cbc->IV[x] ^= pt[x]; in cbc_encrypt()
70 if ((err = cipher_descriptor[cbc->cipher]->ecb_encrypt(cbc->IV, ct, &cbc->key)) != CRYPT_OK) { in cbc_encrypt()
81 cbc->IV[x] = ct[x]; in cbc_encrypt()
85 ct += cbc->blocklen; in cbc_encrypt()
86 pt += cbc->blocklen; in cbc_encrypt()
[all …]
A Dcbc_decrypt.c40 LTC_ARGCHK(cbc != NULL); in cbc_decrypt()
47 …if (cbc->blocklen < 1 || cbc->blocklen > (int)sizeof(cbc->IV) || cbc->blocklen > (int)sizeof(tmp))… in cbc_decrypt()
51 if (len % cbc->blocklen) { in cbc_decrypt()
61 …return cipher_descriptor[cbc->cipher]->accel_cbc_decrypt(ct, pt, len / cbc->blocklen, cbc->IV, &cb… in cbc_decrypt()
65 if ((err = cipher_descriptor[cbc->cipher]->ecb_decrypt(ct, tmp, &cbc->key)) != CRYPT_OK) { in cbc_decrypt()
77 for (x = 0; x < cbc->blocklen; x++) { in cbc_decrypt()
78 tmpy = tmp[x] ^ cbc->IV[x]; in cbc_decrypt()
79 cbc->IV[x] = ct[x]; in cbc_decrypt()
84 ct += cbc->blocklen; in cbc_decrypt()
85 pt += cbc->blocklen; in cbc_decrypt()
[all …]
A Dcbc_getiv.c26 int cbc_getiv(unsigned char *IV, unsigned long *len, const symmetric_CBC *cbc) in cbc_getiv() argument
30 LTC_ARGCHK(cbc != NULL); in cbc_getiv()
31 if ((unsigned long)cbc->blocklen > *len) { in cbc_getiv()
32 *len = cbc->blocklen; in cbc_getiv()
35 XMEMCPY(IV, cbc->IV, cbc->blocklen); in cbc_getiv()
36 *len = cbc->blocklen; in cbc_getiv()
A Dcbc_start.c30 int keylen, int num_rounds, symmetric_CBC *cbc) in cbc_start() argument
36 LTC_ARGCHK(cbc != NULL); in cbc_start()
44 if ((err = cipher_descriptor[cipher]->setup(key, keylen, num_rounds, &cbc->key)) != CRYPT_OK) { in cbc_start()
49 cbc->blocklen = cipher_descriptor[cipher]->block_length; in cbc_start()
50 cbc->cipher = cipher; in cbc_start()
51 for (x = 0; x < cbc->blocklen; x++) { in cbc_start()
52 cbc->IV[x] = IV[x]; in cbc_start()
A Dcbc_done.c23 int cbc_done(symmetric_CBC *cbc) in cbc_done() argument
26 LTC_ARGCHK(cbc != NULL); in cbc_done()
28 if ((err = cipher_is_valid(cbc->cipher)) != CRYPT_OK) { in cbc_done()
31 cipher_descriptor[cbc->cipher]->done(&cbc->key); in cbc_done()
A Dcbc_setiv.c27 int cbc_setiv(const unsigned char *IV, unsigned long len, symmetric_CBC *cbc) in cbc_setiv() argument
30 LTC_ARGCHK(cbc != NULL); in cbc_setiv()
31 if (len != (unsigned long)cbc->blocklen) { in cbc_setiv()
34 XMEMCPY(cbc->IV, IV, len); in cbc_setiv()
/optee_os/core/crypto/
A Daes-cts.c36 struct crypto_cipher_ctx *cbc; member
64 return crypto_cipher_init(c->cbc, mode, key1, key1_len, key2, key2_len, in cts_init()
194 return cbc_cts_update(c->cbc, c->ecb, c->mode, last_block, data, len, in cts_update()
202 crypto_cipher_final(c->cbc); in cts_final()
210 crypto_cipher_free_ctx(c->cbc); in cts_free_ctx()
221 crypto_cipher_copy_state(dst->cbc, src->cbc); in cts_copy_state()
245 res = crypto_aes_cbc_alloc_ctx(&c->cbc); in crypto_aes_cts_alloc_ctx()
A Dsub.mk22 srcs-$(CFG_CRYPTO_CBC_MAC) += cbc-mac.c
38 srcs-$(CFG_CRYPTO_CBC) += sm4-cbc.c
/optee_os/out/arm/core/lib/libtomcrypt/src/modes/cbc/
A D.cbc_decrypt.o.cmd1cbc/cbc_decrypt.o := /usr/bin/ccache /home/test/workspace/code/optee_3.16/build/../toolchains/aarc…
A D.cbc_done.o.cmd1cbc/cbc_done.o := /usr/bin/ccache /home/test/workspace/code/optee_3.16/build/../toolchains/aarch64…
A D.cbc_encrypt.o.cmd1cbc/cbc_encrypt.o := /usr/bin/ccache /home/test/workspace/code/optee_3.16/build/../toolchains/aarc…
A D.cbc_getiv.o.cmd1cbc/cbc_getiv.o := /usr/bin/ccache /home/test/workspace/code/optee_3.16/build/../toolchains/aarch6…
A D.cbc_setiv.o.cmd1cbc/cbc_setiv.o := /usr/bin/ccache /home/test/workspace/code/optee_3.16/build/../toolchains/aarch6…
A D.cbc_start.o.cmd1cbc/cbc_start.o := /usr/bin/ccache /home/test/workspace/code/optee_3.16/build/../toolchains/aarch6…
A D.cbc_decrypt.o.d1 out/arm/core/lib/libtomcrypt/src/modes/cbc/cbc_decrypt.o: \
2 core/lib/libtomcrypt/src/modes/cbc/cbc_decrypt.c \
A D.cbc_done.o.d1 out/arm/core/lib/libtomcrypt/src/modes/cbc/cbc_done.o: \
2 core/lib/libtomcrypt/src/modes/cbc/cbc_done.c \
A D.cbc_encrypt.o.d1 out/arm/core/lib/libtomcrypt/src/modes/cbc/cbc_encrypt.o: \
2 core/lib/libtomcrypt/src/modes/cbc/cbc_encrypt.c \
A D.cbc_getiv.o.d1 out/arm/core/lib/libtomcrypt/src/modes/cbc/cbc_getiv.o: \
2 core/lib/libtomcrypt/src/modes/cbc/cbc_getiv.c \
/optee_os/out/arm/core/crypto/
A D.cbc-mac.o.cmd1cbc-mac.o := /usr/bin/ccache /home/test/workspace/code/optee_3.16/build/../toolchains/aarch64/bin/…
A D.sm4-cbc.o.cmd1cbc.o := /usr/bin/ccache /home/test/workspace/code/optee_3.16/build/../toolchains/aarch64/bin/aarc…
A D.cbc-mac.o.d1 out/arm/core/crypto/cbc-mac.o: core/crypto/cbc-mac.c \
A D.sm4-cbc.o.d1 out/arm/core/crypto/sm4-cbc.o: core/crypto/sm4-cbc.c \
/optee_os/core/lib/libtomcrypt/src/misc/pbes/
A Dpbes.c28 symmetric_CBC cbc; in pbes_decrypt() local
61 if ((err = cbc_start(cid, iv, k, keylen, 0, &cbc)) != CRYPT_OK) goto LBL_ERROR; in pbes_decrypt()
62 …if ((err = cbc_decrypt(arg->enc_data->data, dec_data, arg->enc_data->size, &cbc)) != CRYPT_OK) got… in pbes_decrypt()
63 if ((err = cbc_done(&cbc)) != CRYPT_OK) goto LBL_ERROR; in pbes_decrypt()
/optee_os/out/arm/core/lib/libtomcrypt/
A D.cbc.o.cmd1cbc.o := /usr/bin/ccache /home/test/workspace/code/optee_3.16/build/../toolchains/aarch64/bin/aarc…
/optee_os/core/lib/libtomcrypt/src/modes/
A Dsub.mk1 subdirs-$(_CFG_CORE_LTC_CBC) += cbc

Completed in 25 milliseconds

12