Home
last modified time | relevance | path

Searched refs:ptlen (Results 1 – 24 of 24) sorted by relevance

/optee_os/core/lib/libtomcrypt/src/encauth/ccm/
A Dccm_test.c31 int ptlen; in ccm_test()
144 (unsigned char*)tests[x].pt, tests[x].ptlen, in ccm_test()
155 (unsigned char*)tests[x].pt, tests[x].ptlen, in ccm_test()
161 …if ((err = ccm_init(&ccm, idx, tests[x].key, 16, tests[x].ptlen, tests[x].taglen, tests[x].headerl… in ccm_test()
170 …if ((err = ccm_process(&ccm, (unsigned char*)tests[x].pt, tests[x].ptlen, buf, CCM_ENCRYPT)) != CR… in ccm_test()
178 … if (compare_testvector(buf, tests[x].ptlen, tests[x].ct, tests[x].ptlen, "CCM encrypt data", x)) { in ccm_test()
193 buf2, tests[x].ptlen, in ccm_test()
208 if ((err = ccm_process(&ccm, buf2, tests[x].ptlen, buf, CCM_DECRYPT)) != CRYPT_OK) { in ccm_test()
217 …if (compare_testvector(buf2, tests[x].ptlen, tests[x].pt, tests[x].ptlen, "CCM decrypt data", x)) { in ccm_test()
230 buf2, tests[x].ptlen, in ccm_test()
[all …]
A Dccm_memory.c96 pt, ptlen, in ccm_memory()
103 len = ptlen; in ccm_memory()
136 if (direction == CCM_DECRYPT && ptlen > 0) { in ccm_memory()
137 pt_work = XMALLOC(ptlen); in ccm_memory()
156 len = ptlen; in ccm_memory()
231 if (ptlen > 0) { in ccm_memory()
234 if (ptlen & ~15) { in ccm_memory()
236 for (; y < (ptlen & ~15); y += 16) { in ccm_memory()
279 for (; y < ptlen; y++) { in ccm_memory()
353 if (ptlen > 0) { in ccm_memory()
[all …]
A Dccm_process.c24 unsigned char *pt, unsigned long ptlen, in ccm_process() argument
40 if (ccm->ptlen < ccm->current_ptlen + ptlen) { in ccm_process()
43 ccm->current_ptlen += ptlen; in ccm_process()
46 if (ptlen > 0) { in ccm_process()
50 for (y = 0; y < ptlen; y++) { in ccm_process()
A Dccm_init.c27 const unsigned char *key, int keylen, int ptlen, int taglen, int aadlen) in ccm_init() argument
57 ccm->ptlen = ptlen; in ccm_init()
59 while (ptlen) { in ccm_init()
61 ptlen >>= 8; in ccm_init()
A Dccm_done.c30 if (ccm->ptlen != ccm->current_ptlen) { in ccm_done()
A Dccm_add_nonce.c53 len = ccm->ptlen; in ccm_add_nonce()
/optee_os/core/lib/libtomcrypt/src/encauth/ocb/
A Docb_test.c29 int ptlen; in ocb_test()
180 tests[x].nonce, tests[x].pt, tests[x].ptlen, outct, outtag, &len)) != CRYPT_OK) { in ocb_test()
185 compare_testvector(outct, tests[x].ptlen, tests[x].ct, tests[x].ptlen, "OCB CT", x)) { in ocb_test()
189 … if ((err = ocb_decrypt_verify_memory(idx, tests[x].key, 16, tests[x].nonce, outct, tests[x].ptlen, in ocb_test()
193 …if ((res != 1) || compare_testvector(outct, tests[x].ptlen, tests[x].pt, tests[x].ptlen, "OCB", x)… in ocb_test()
A Ds_ocb_done.c38 int s_ocb_done(ocb_state *ocb, const unsigned char *pt, unsigned long ptlen, in s_ocb_done() argument
54 (int)ptlen > ocb->block_len || (int)ptlen < 0) { in s_ocb_done()
79 X[ocb->block_len-1] ^= (ptlen*8)&255; in s_ocb_done()
80 X[ocb->block_len-2] ^= ((ptlen*8)>>8)&255; in s_ocb_done()
93 for (x = 0; x < (int)ptlen; x++) { in s_ocb_done()
99 for (x = 0; x < (int)ptlen; x++) { in s_ocb_done()
106 for (x = 0; x < (int)ptlen; x++) { in s_ocb_done()
A Docb_encrypt_authenticate_memory.c35 const unsigned char *pt, unsigned long ptlen, in ocb_encrypt_authenticate_memory() argument
59 while (ptlen > (unsigned long)ocb->block_len) { in ocb_encrypt_authenticate_memory()
63 ptlen -= ocb->block_len; in ocb_encrypt_authenticate_memory()
68 err = ocb_done_encrypt(ocb, pt, ptlen, ct, tag, taglen); in ocb_encrypt_authenticate_memory()
A Docb_done_encrypt.c29 int ocb_done_encrypt(ocb_state *ocb, const unsigned char *pt, unsigned long ptlen, in ocb_done_encrypt() argument
37 return s_ocb_done(ocb, pt, ptlen, ct, tag, taglen, 0); in ocb_done_encrypt()
/optee_os/core/lib/libtomcrypt/src/encauth/ocb3/
A Docb3_test.c32 int ptlen; in ocb3_test()
225 … tests[x].ptlen != 0 ? tests[x].pt : NULL, tests[x].ptlen, in ocb3_test()
226 … tests[x].ptlen != 0 ? outct : NULL, outtag, &len)) != CRYPT_OK) { in ocb3_test()
231 … compare_testvector(outct, tests[x].ptlen, tests[x].ct, tests[x].ptlen, "OCB3 CT", x)) { in ocb3_test()
239 tests[x].ptlen != 0 ? outct : NULL, tests[x].ptlen, in ocb3_test()
240 … tests[x].ptlen != 0 ? outct : NULL, tests[x].tag, len, &res)) != CRYPT_OK) { in ocb3_test()
243 …if ((res != 1) || compare_testvector(outct, tests[x].ptlen, tests[x].pt, tests[x].ptlen, "OCB3", x… in ocb3_test()
A Docb3_encrypt_last.c27 int ocb3_encrypt_last(ocb3_state *ocb, const unsigned char *pt, unsigned long ptlen, unsigned char … in ocb3_encrypt_last() argument
34 if (pt == NULL) LTC_ARGCHK(ptlen == 0); in ocb3_encrypt_last()
35 if (ptlen != 0) { in ocb3_encrypt_last()
44 full_blocks = ptlen/ocb->block_len; in ocb3_encrypt_last()
46 last_block_len = ptlen - full_blocks_len; in ocb3_encrypt_last()
A Docb3_encrypt.c27 int ocb3_encrypt(ocb3_state *ocb, const unsigned char *pt, unsigned long ptlen, unsigned char *ct) in ocb3_encrypt() argument
34 if (ptlen == 0) return CRYPT_OK; /* no data, nothing to do */ in ocb3_encrypt()
45 if (ptlen % ocb->block_len) { /* ptlen has to bu multiple of block_len */ in ocb3_encrypt()
49 full_blocks = ptlen/ocb->block_len; in ocb3_encrypt()
A Docb3_encrypt_authenticate_memory.c39 const unsigned char *pt, unsigned long ptlen, in ocb3_encrypt_authenticate_memory() argument
64 if ((err = ocb3_encrypt_last(ocb, pt, ptlen, ct)) != CRYPT_OK) { in ocb3_encrypt_authenticate_memory()
/optee_os/core/lib/libtomcrypt/src/encauth/gcm/
A Dgcm_test.c32 unsigned long ptlen; in gcm_test()
353 (unsigned char*)tests[x].P, tests[x].ptlen, in gcm_test()
358 if (compare_testvector(out[0], tests[x].ptlen, tests[x].C, tests[x].ptlen, "GCM CT", x)) { in gcm_test()
371 out[1], tests[x].ptlen, in gcm_test()
376 if (compare_testvector(out[1], tests[x].ptlen, tests[x].P, tests[x].ptlen, "GCM PT", x)) { in gcm_test()
A Dgcm_process.c29 unsigned char *pt, unsigned long ptlen, in gcm_process() argument
38 if (ptlen > 0) { in gcm_process()
52 if (gcm->pttotlen / 8 + (ulong64)gcm->buflen + (ulong64)ptlen >= CONST64(0xFFFFFFFE0)) { in gcm_process()
90 for (x = 0; x < (ptlen & ~15); x += 16) { in gcm_process()
108 for (x = 0; x < (ptlen & ~15); x += 16) { in gcm_process()
130 for (; x < ptlen; x++) { in gcm_process()
A Dgcm_memory.c40 unsigned char *pt, unsigned long ptlen, in gcm_memory() argument
58 pt, ptlen, in gcm_memory()
94 if ((err = gcm_process(gcm, pt, ptlen, ct, direction)) != CRYPT_OK) { in gcm_memory()
/optee_os/core/lib/libtomcrypt/src/stream/rabbit/
A Drabbit.c368 unsigned long ptlen = sizeof(pt); in rabbit_test()
373 if ((err = rabbit_crypt(&st, (unsigned char*)pt, ptlen, out)) != CRYPT_OK) return err; in rabbit_test()
374 … if (compare_testvector(out, ptlen, ct, ptlen, "RABBIT-TV1", 1)) return CRYPT_FAIL_TESTVECTOR; in rabbit_test()
389 unsigned long ptlen = sizeof(pt); in rabbit_test()
399 … if (compare_testvector(out, ptlen, ct, ptlen, "RABBIT-TV2", 1)) return CRYPT_FAIL_TESTVECTOR; in rabbit_test()
414 unsigned long ptlen = strlen(pt); in rabbit_test()
424 … if (compare_testvector(out, ptlen, ct, ptlen, "RABBIT-TV3", 1)) return CRYPT_FAIL_TESTVECTOR; in rabbit_test()
430 … if (compare_testvector(out, ptlen, ct, ptlen, "RABBIT-TV4", 1)) return CRYPT_FAIL_TESTVECTOR; in rabbit_test()
437 … if ((err = rabbit_crypt(&st, out, ptlen, out2)) != CRYPT_OK) return err; in rabbit_test()
438 … if (compare_testvector(out2, ptlen, pt, ptlen, "RABBIT-TV5", 1)) return CRYPT_FAIL_TESTVECTOR; in rabbit_test()
/optee_os/core/lib/libtomcrypt/src/headers/
A Dtomcrypt_mac.h269 const unsigned char *pt, unsigned long ptlen,
307 const unsigned char *pt, unsigned long ptlen,
319 const unsigned char *pt, unsigned long ptlen,
336 int s_ocb_done(ocb_state *ocb, const unsigned char *pt, unsigned long ptlen,
381 const unsigned char *pt, unsigned long ptlen,
410 ptlen, /* length that will be enc / dec */ member
423 const unsigned char *key, int keylen, int ptlen, int taglen, int aadlen);
434 unsigned char *pt, unsigned long ptlen,
446 unsigned char *pt, unsigned long ptlen,
513 unsigned char *pt, unsigned long ptlen,
[all …]
A Dtomcrypt_cipher.h518 unsigned char *pt, unsigned long ptlen,
542 unsigned char *pt, unsigned long ptlen,
969 const unsigned char *pt, unsigned long ptlen,
974 const unsigned char *ct, unsigned long ptlen,
/optee_os/core/lib/libtomcrypt/src/mac/pelican/
A Dpelican_test.c26 int keylen, ptlen; in pelican_test()
94 if ((err = pelican_process(&pel, tests[x].MSG, tests[x].ptlen)) != CRYPT_OK) { in pelican_test()
/optee_os/core/lib/libtomcrypt/src/modes/xts/
A Dxts_decrypt.c60 int xts_decrypt(const unsigned char *ct, unsigned long ptlen, unsigned char *pt, unsigned char *twe… in xts_decrypt() argument
79 m = ptlen >> 4; in xts_decrypt()
80 mo = ptlen & 15; in xts_decrypt()
A Dxts_encrypt.c62 int xts_encrypt(const unsigned char *pt, unsigned long ptlen, unsigned char *ct, unsigned char *twe… in xts_encrypt() argument
81 m = ptlen >> 4; in xts_encrypt()
82 mo = ptlen & 15; in xts_encrypt()
/optee_os/core/lib/libtomcrypt/src/encauth/eax/
A Deax_encrypt_authenticate_memory.c39 const unsigned char *pt, unsigned long ptlen, in eax_encrypt_authenticate_memory() argument
58 if ((err = eax_encrypt(eax, pt, ct, ptlen)) != CRYPT_OK) { in eax_encrypt_authenticate_memory()

Completed in 22 milliseconds