Home
last modified time | relevance | path

Searched refs:pt (Results 1 – 25 of 90) sorted by relevance

1234

/optee_os-3.20.0/core/lib/libtomcrypt/
A Daes_accel.c101 LTC_ARGCHK(pt); in aes_ecb_encrypt_nblocks()
114 LTC_ARGCHK(pt); in aes_ecb_decrypt_nblocks()
127 return aes_ecb_encrypt_nblocks(pt, ct, 1, skey); in rijndael_ecb_encrypt()
133 return aes_ecb_decrypt_nblocks(ct, pt, 1, skey); in rijndael_ecb_decrypt()
140 LTC_ARGCHK(pt); in aes_cbc_encrypt_nblocks()
155 LTC_ARGCHK(pt); in aes_cbc_decrypt_nblocks()
170 LTC_ARGCHK(pt); in aes_ctr_encrypt_nblocks()
191 LTC_ARGCHK(pt); in aes_xts_encrypt_nblocks()
199 crypto_accel_aes_xts_enc(ct, pt, skey1->rijndael.eK, in aes_xts_encrypt_nblocks()
211 LTC_ARGCHK(pt); in aes_xts_decrypt_nblocks()
[all …]
/optee_os-3.20.0/core/lib/libtomcrypt/src/ciphers/
A Dskipjack.c144 LTC_ARGCHK(pt != NULL); in s_skipjack_ecb_encrypt()
149 w1 = ((unsigned)pt[0]<<8)|pt[1]; in s_skipjack_ecb_encrypt()
150 w2 = ((unsigned)pt[2]<<8)|pt[3]; in s_skipjack_ecb_encrypt()
151 w3 = ((unsigned)pt[4]<<8)|pt[5]; in s_skipjack_ecb_encrypt()
152 w4 = ((unsigned)pt[6]<<8)|pt[7]; in s_skipjack_ecb_encrypt()
208 LTC_ARGCHK(pt != NULL); in s_skipjack_ecb_decrypt()
243 pt[0] = (w1>>8)&255; pt[1] = w1&255; in s_skipjack_ecb_decrypt()
244 pt[2] = (w2>>8)&255; pt[3] = w2&255; in s_skipjack_ecb_decrypt()
245 pt[4] = (w3>>8)&255; pt[5] = w3&255; in s_skipjack_ecb_decrypt()
246 pt[6] = (w4>>8)&255; pt[7] = w4&255; in s_skipjack_ecb_decrypt()
[all …]
A Drc2.c154 LTC_ARGCHK(pt != NULL); in s_rc2_ecb_encrypt()
160 x76 = ((unsigned)pt[7] << 8) + (unsigned)pt[6]; in s_rc2_ecb_encrypt()
161 x54 = ((unsigned)pt[5] << 8) + (unsigned)pt[4]; in s_rc2_ecb_encrypt()
162 x32 = ((unsigned)pt[3] << 8) + (unsigned)pt[2]; in s_rc2_ecb_encrypt()
163 x10 = ((unsigned)pt[1] << 8) + (unsigned)pt[0]; in s_rc2_ecb_encrypt()
233 LTC_ARGCHK(pt != NULL); in s_rc2_ecb_decrypt()
265 pt[0] = (unsigned char)x10; in s_rc2_ecb_decrypt()
266 pt[1] = (unsigned char)(x10 >> 8); in s_rc2_ecb_decrypt()
267 pt[2] = (unsigned char)x32; in s_rc2_ecb_decrypt()
269 pt[4] = (unsigned char)x54; in s_rc2_ecb_decrypt()
[all …]
A Dnoekeon.c114 LTC_ARGCHK(pt != NULL); in s_noekeon_ecb_encrypt()
117 LOAD32H(a,&pt[0]); LOAD32H(b,&pt[4]); in s_noekeon_ecb_encrypt()
118 LOAD32H(c,&pt[8]); LOAD32H(d,&pt[12]); in s_noekeon_ecb_encrypt()
145 int err = s_noekeon_ecb_encrypt(pt, ct, skey); in noekeon_ecb_encrypt()
168 LTC_ARGCHK(pt != NULL); in s_noekeon_ecb_decrypt()
190 STORE32H(a,&pt[0]); STORE32H(b, &pt[4]); in s_noekeon_ecb_decrypt()
191 STORE32H(c,&pt[8]); STORE32H(d, &pt[12]); in s_noekeon_ecb_decrypt()
198 int err = s_noekeon_ecb_decrypt(ct, pt, skey); in noekeon_ecb_decrypt()
215 unsigned char key[16], pt[16], ct[16]; in noekeon_test()
276 noekeon_ecb_encrypt(tests[i].pt, tmp[0], &key); in noekeon_test()
[all …]
A Drc6.c117 int rc6_ecb_encrypt(const unsigned char *pt, unsigned char *ct, const symmetric_key *skey) in s_rc6_ecb_encrypt()
125 LTC_ARGCHK(pt != NULL); in s_rc6_ecb_encrypt()
127 LOAD32L(a,&pt[0]);LOAD32L(b,&pt[4]);LOAD32L(c,&pt[8]);LOAD32L(d,&pt[12]); in s_rc6_ecb_encrypt()
155 int rc6_ecb_encrypt(const unsigned char *pt, unsigned char *ct, const symmetric_key *skey) in rc6_ecb_encrypt() argument
157 int err = s_rc6_ecb_encrypt(pt, ct, skey); in rc6_ecb_encrypt()
180 LTC_ARGCHK(pt != NULL); in s_rc6_ecb_decrypt()
206 STORE32L(a,&pt[0]);STORE32L(b,&pt[4]);STORE32L(c,&pt[8]);STORE32L(d,&pt[12]); in s_rc6_ecb_decrypt()
214 int err = s_rc6_ecb_decrypt(ct, pt, skey); in rc6_ecb_decrypt()
231 unsigned char key[32], pt[16], ct[16]; in rc6_test()
278 rc6_ecb_encrypt(tests[x].pt, tmp[0], &key); in rc6_test()
[all …]
A Dkseed.c254 LOAD32H(P[0], pt); in kseed_ecb_encrypt()
255 LOAD32H(P[1], pt+4); in kseed_ecb_encrypt()
256 LOAD32H(P[2], pt+8); in kseed_ecb_encrypt()
257 LOAD32H(P[3], pt+12); in kseed_ecb_encrypt()
281 STORE32H(P[2], pt); in kseed_ecb_decrypt()
282 STORE32H(P[3], pt+4); in kseed_ecb_decrypt()
283 STORE32H(P[0], pt+8); in kseed_ecb_decrypt()
284 STORE32H(P[1], pt+12); in kseed_ecb_decrypt()
306 unsigned char pt[16], ct[16], key[16]; in kseed_test()
339 kseed_ecb_encrypt(tests[x].pt, buf[0], &skey); in kseed_test()
[all …]
A Drc5.c130 LTC_ARGCHK(pt != NULL); in s_rc5_ecb_encrypt()
137 LOAD32L(A, &pt[0]); in s_rc5_ecb_encrypt()
138 LOAD32L(B, &pt[4]); in s_rc5_ecb_encrypt()
167 int err = s_rc5_ecb_encrypt(pt, ct, skey); in rc5_ecb_encrypt()
190 LTC_ARGCHK(pt != NULL); in s_rc5_ecb_decrypt()
219 STORE32L(A, &pt[0]); in s_rc5_ecb_decrypt()
220 STORE32L(B, &pt[4]); in s_rc5_ecb_decrypt()
228 int err = s_rc5_ecb_decrypt(ct, pt, skey); in rc5_ecb_decrypt()
244 unsigned char key[16], pt[8], ct[8]; in rc5_test()
276 rc5_ecb_encrypt(tests[x].pt, tmp[0], &key); in rc5_test()
[all …]
/optee_os-3.20.0/core/lib/libtomcrypt/src/headers/
A Dtomcrypt_cipher.h520 unsigned char *pt, unsigned long ptlen,
544 unsigned char *pt, unsigned long ptlen,
603 int (*accel_xts_encrypt)(const unsigned char *pt, unsigned char *ct,
618 int (*accel_xts_decrypt)(const unsigned char *ct, unsigned char *pt,
635 int rc5_ecb_encrypt(const unsigned char *pt, unsigned char *ct, const symmetric_key *skey);
636 int rc5_ecb_decrypt(const unsigned char *ct, unsigned char *pt, const symmetric_key *skey);
645 int rc6_ecb_encrypt(const unsigned char *pt, unsigned char *ct, const symmetric_key *skey);
646 int rc6_ecb_decrypt(const unsigned char *ct, unsigned char *pt, const symmetric_key *skey);
656 int rc2_ecb_encrypt(const unsigned char *pt, unsigned char *ct, const symmetric_key *skey);
981 const unsigned char *pt, unsigned long ptlen,
[all …]
/optee_os-3.20.0/core/lib/libtomcrypt/src/stream/chacha/
A Dchacha_test.c32 …char pt[] = "Ladies and Gentlemen of the class of '99: If I could offer you only one tip for the f… in chacha_test()
36 len = XSTRLEN(pt); in chacha_test()
41 …if ((err = chacha_crypt(&st, (unsigned char*)pt, 35, out )) != CRYPT_OK) return err; in chacha_test()
42 …if ((err = chacha_crypt(&st, (unsigned char*)pt + 35, 35, out + 35)) != CRYPT_OK) return err; in chacha_test()
43 …if ((err = chacha_crypt(&st, (unsigned char*)pt + 70, 5, out + 70)) != CRYPT_OK) return err; in chacha_test()
44 …if ((err = chacha_crypt(&st, (unsigned char*)pt + 75, 5, out + 75)) != CRYPT_OK) return err; in chacha_test()
45 …if ((err = chacha_crypt(&st, (unsigned char*)pt + 80, len - 80, out + 80)) != CRYPT_OK) return err; in chacha_test()
51 …if ((err = chacha_crypt(&st, (unsigned char*)pt, len, out)) != CRYPT_OK) return err; in chacha_test()
57 …if ((err = chacha_crypt(&st, (unsigned char*)pt, len, out)) != CRYPT_OK) return err; in chacha_test()
62 … n, sizeof(n), 1, (unsigned char*)pt, len, out)) != CRYPT_OK) return err; in chacha_test()
[all …]
/optee_os-3.20.0/core/lib/libtomcrypt/src/modes/ctr/
A Dctr_encrypt.c41 static int s_ctr_encrypt(const unsigned char *pt, unsigned char *ct, unsigned long len, symmetric_C… in s_ctr_encrypt() argument
57 …FAST_TYPE_PTR_CAST((unsigned char *)ct + x)) = *(LTC_FAST_TYPE_PTR_CAST((unsigned char *)pt + x)) ^ in s_ctr_encrypt()
60 pt += ctr->blocklen; in s_ctr_encrypt()
67 *ct++ = *pt++ ^ ctr->pad[ctr->padlen++]; in s_ctr_encrypt()
86 int ctr_encrypt(const unsigned char *pt, unsigned char *ct, unsigned long len, symmetric_CTR *ctr) in ctr_encrypt() argument
91 LTC_ARGCHK(pt != NULL); in ctr_encrypt()
117 pt += (len / ctr->blocklen) * ctr->blocklen; in ctr_encrypt()
127 if ((err = s_ctr_encrypt(pt, ct, incr, ctr)) != CRYPT_OK) { in ctr_encrypt()
130 pt += incr; in ctr_encrypt()
133 return ctr_encrypt(pt, ct, len, ctr); in ctr_encrypt()
[all …]
/optee_os-3.20.0/core/lib/libtomcrypt/src/stream/rc4/
A Drc4_test.c16 const unsigned char pt[] = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef }; in rc4_stream_test()
21 if ((err = rc4_stream_crypt(&st, pt, sizeof(pt), buf)) != CRYPT_OK) return err; in rc4_stream_test()
26 if ((err = rc4_stream_memory(key, sizeof(key), pt, sizeof(pt), buf)) != CRYPT_OK) return err; in rc4_stream_test()
/optee_os-3.20.0/core/lib/libtomcrypt/src/stream/sosemanuk/
A Dsosemanuk_test.c23 … char pt[] = "Kilroy was here, and there. ...and everywhere!"; /* len = 46 bytes */ in sosemanuk_test()
25 len = XSTRLEN(pt); in sosemanuk_test()
29 …if ((err = sosemanuk_crypt(&st, (unsigned char*)pt, 5, out)) != CRYPT_OK) return … in sosemanuk_test()
30 …if ((err = sosemanuk_crypt(&st, (unsigned char*)pt + 5, 25, out + 5)) != CRYPT_OK) return … in sosemanuk_test()
31 …if ((err = sosemanuk_crypt(&st, (unsigned char*)pt + 30, 10, out + 30)) != CRYPT_OK) return … in sosemanuk_test()
32 …if ((err = sosemanuk_crypt(&st, (unsigned char*)pt + 40, len - 40, out + 40)) != CRYPT_OK) return … in sosemanuk_test()
38 if ((err = sosemanuk_crypt(&st, (unsigned char*)pt, len, out)) != CRYPT_OK) return err; in sosemanuk_test()
43 (unsigned char*)pt, len, out)) != CRYPT_OK) return err; in sosemanuk_test()
/optee_os-3.20.0/core/lib/libtomcrypt/src/stream/salsa20/
A Dsalsa20_test.c29 char pt[] = "Kilroy was here, and there. ...and everywhere!"; /* len = 46 bytes */ in salsa20_test()
35 len = XSTRLEN(pt); in salsa20_test()
42 …if ((err = salsa20_crypt(&st, (unsigned char*)pt, 5, out)) != CRYPT_OK) return er… in salsa20_test()
43 …if ((err = salsa20_crypt(&st, (unsigned char*)pt + 5, 25, out + 5)) != CRYPT_OK) return er… in salsa20_test()
44 …if ((err = salsa20_crypt(&st, (unsigned char*)pt + 30, 10, out + 30)) != CRYPT_OK) return er… in salsa20_test()
45 …if ((err = salsa20_crypt(&st, (unsigned char*)pt + 40, len - 40, out + 40)) != CRYPT_OK) return er… in salsa20_test()
53 if ((err = salsa20_crypt(&st, (unsigned char*)pt, len, out)) != CRYPT_OK) return err; in salsa20_test()
58 (unsigned char*)pt, len, out)) != CRYPT_OK) return err; in salsa20_test()
/optee_os-3.20.0/core/lib/libtomcrypt/src/modes/ecb/
A Decb_decrypt.c20 int ecb_decrypt(const unsigned char *ct, unsigned char *pt, unsigned long len, symmetric_ECB *ecb) in ecb_decrypt() argument
23 LTC_ARGCHK(pt != NULL); in ecb_decrypt()
35 …return cipher_descriptor[ecb->cipher]->accel_ecb_decrypt(ct, pt, len / cipher_descriptor[ecb->ciph… in ecb_decrypt()
38 if ((err = cipher_descriptor[ecb->cipher]->ecb_decrypt(ct, pt, &ecb->key)) != CRYPT_OK) { in ecb_decrypt()
41 pt += cipher_descriptor[ecb->cipher]->block_length; in ecb_decrypt()
A Decb_encrypt.c20 int ecb_encrypt(const unsigned char *pt, unsigned char *ct, unsigned long len, symmetric_ECB *ecb) in ecb_encrypt() argument
23 LTC_ARGCHK(pt != NULL); in ecb_encrypt()
35 …return cipher_descriptor[ecb->cipher]->accel_ecb_encrypt(pt, ct, len / cipher_descriptor[ecb->ciph… in ecb_encrypt()
38 if ((err = cipher_descriptor[ecb->cipher]->ecb_encrypt(pt, ct, &ecb->key)) != CRYPT_OK) { in ecb_encrypt()
41 pt += cipher_descriptor[ecb->cipher]->block_length; in ecb_encrypt()
/optee_os-3.20.0/core/lib/libtomcrypt/src/encauth/ocb/
A Docb_encrypt_authenticate_memory.c28 const unsigned char *pt, unsigned long ptlen, in ocb_encrypt_authenticate_memory() argument
37 LTC_ARGCHK(pt != NULL); in ocb_encrypt_authenticate_memory()
53 if ((err = ocb_encrypt(ocb, pt, ct)) != CRYPT_OK) { in ocb_encrypt_authenticate_memory()
57 pt += ocb->block_len; in ocb_encrypt_authenticate_memory()
61 err = ocb_done_encrypt(ocb, pt, ptlen, ct, tag, taglen); in ocb_encrypt_authenticate_memory()
A Docb_decrypt_verify_memory.c30 unsigned char *pt, in ocb_decrypt_verify_memory() argument
39 LTC_ARGCHK(pt != NULL); in ocb_decrypt_verify_memory()
55 if ((err = ocb_decrypt(ocb, ct, pt)) != CRYPT_OK) { in ocb_decrypt_verify_memory()
59 pt += ocb->block_len; in ocb_decrypt_verify_memory()
63 err = ocb_done_decrypt(ocb, ct, ctlen, pt, tag, taglen, stat); in ocb_decrypt_verify_memory()
A Docb_decrypt.c19 int ocb_decrypt(ocb_state *ocb, const unsigned char *ct, unsigned char *pt) in ocb_decrypt() argument
25 LTC_ARGCHK(pt != NULL); in ocb_decrypt()
46 if ((err = cipher_descriptor[ocb->cipher]->ecb_decrypt(tmp, pt, &ocb->key)) != CRYPT_OK) { in ocb_decrypt()
50 pt[x] ^= Z[x]; in ocb_decrypt()
55 ocb->checksum[x] ^= pt[x]; in ocb_decrypt()
/optee_os-3.20.0/core/lib/libtomcrypt/src/modes/lrw/
A Dlrw_decrypt.c19 int lrw_decrypt(const unsigned char *ct, unsigned char *pt, unsigned long len, symmetric_LRW *lrw) in lrw_decrypt() argument
23 LTC_ARGCHK(pt != NULL); in lrw_decrypt()
32 …return cipher_descriptor[lrw->cipher]->accel_lrw_decrypt(ct, pt, len, lrw->IV, lrw->tweak, &lrw->k… in lrw_decrypt()
35 return lrw_process(ct, pt, len, LRW_DECRYPT, lrw); in lrw_decrypt()
A Dlrw_encrypt.c19 int lrw_encrypt(const unsigned char *pt, unsigned char *ct, unsigned long len, symmetric_LRW *lrw) in lrw_encrypt() argument
23 LTC_ARGCHK(pt != NULL); in lrw_encrypt()
32 …return cipher_descriptor[lrw->cipher]->accel_lrw_encrypt(pt, ct, len, lrw->IV, lrw->tweak, &lrw->k… in lrw_encrypt()
35 return lrw_process(pt, ct, len, LRW_ENCRYPT, lrw); in lrw_encrypt()
/optee_os-3.20.0/ta/avb/
A Dentry.c85 if (pt != exp_pt) in read_rb_idx()
141 if (pt != exp_pt) in write_rb_idx()
189 if (pt != exp_pt) in read_lock_state()
227 if (pt != exp_pt) in write_lock_state()
267 if (pt != exp_pt) in write_persist_value()
317 if (pt != exp_pt) in read_persist_value()
378 uint32_t pt, in TA_InvokeCommandEntryPoint() argument
383 return read_rb_idx(pt, params); in TA_InvokeCommandEntryPoint()
385 return write_rb_idx(pt, params); in TA_InvokeCommandEntryPoint()
387 return read_lock_state(pt, params); in TA_InvokeCommandEntryPoint()
[all …]
/optee_os-3.20.0/core/lib/libtomcrypt/src/modes/xts/
A Dxts_decrypt.c53 int xts_decrypt(const unsigned char *ct, unsigned long ptlen, unsigned char *pt, unsigned char *twe… in xts_decrypt() argument
61 LTC_ARGCHK(pt != NULL); in xts_decrypt()
89 …if ((err = cipher_descriptor[xts->cipher]->accel_xts_decrypt(ct, pt, lim, tweak, &xts->key1, &xts-… in xts_decrypt()
94 pt += lim * 16; in xts_decrypt()
105 if ((err = s_tweak_uncrypt(ct, pt, T, xts)) != CRYPT_OK) { in xts_decrypt()
109 pt += 16; in xts_decrypt()
126 pt[16 + i] = PP[i]; in xts_decrypt()
133 if ((err = s_tweak_uncrypt(CC, pt, T, xts)) != CRYPT_OK) { in xts_decrypt()
A Dxts_encrypt.c55 int xts_encrypt(const unsigned char *pt, unsigned long ptlen, unsigned char *ct, unsigned char *twe… in xts_encrypt() argument
63 LTC_ARGCHK(pt != NULL); in xts_encrypt()
91 …if ((err = cipher_descriptor[xts->cipher]->accel_xts_encrypt(pt, ct, lim, tweak, &xts->key1, &xts-… in xts_encrypt()
96 pt += lim * 16; in xts_encrypt()
108 if ((err = s_tweak_crypt(pt, ct, T, xts)) != CRYPT_OK) { in xts_encrypt()
112 pt += 16; in xts_encrypt()
119 if ((err = s_tweak_crypt(pt, CC, T, xts)) != CRYPT_OK) { in xts_encrypt()
125 PP[i] = pt[16 + i]; in xts_encrypt()
/optee_os-3.20.0/core/lib/libtomcrypt/src/modes/cbc/
A Dcbc_decrypt.c21 int cbc_decrypt(const unsigned char *ct, unsigned char *pt, unsigned long len, symmetric_CBC *cbc) in cbc_decrypt() argument
31 LTC_ARGCHK(pt != NULL); in cbc_decrypt()
54 …return cipher_descriptor[cbc->cipher]->accel_cbc_decrypt(ct, pt, len / cbc->blocklen, cbc->IV, &cb… in cbc_decrypt()
67 *(LTC_FAST_TYPE_PTR_CAST((unsigned char *)pt + x)) = tmpy; in cbc_decrypt()
73 pt[x] = tmpy; in cbc_decrypt()
78 pt += cbc->blocklen; in cbc_decrypt()
A Dcbc_encrypt.c21 int cbc_encrypt(const unsigned char *pt, unsigned char *ct, unsigned long len, symmetric_CBC *cbc) in cbc_encrypt() argument
25 LTC_ARGCHK(pt != NULL); in cbc_encrypt()
48 …return cipher_descriptor[cbc->cipher]->accel_cbc_encrypt(pt, ct, len / cbc->blocklen, cbc->IV, &cb… in cbc_encrypt()
54 …TYPE_PTR_CAST((unsigned char *)cbc->IV + x)) ^= *(LTC_FAST_TYPE_PTR_CAST((unsigned char *)pt + x)); in cbc_encrypt()
58 cbc->IV[x] ^= pt[x]; in cbc_encrypt()
79 pt += cbc->blocklen; in cbc_encrypt()

Completed in 24 milliseconds

1234