Home
last modified time | relevance | path

Searched refs:st (Results 1 – 25 of 103) sorted by relevance

12345

/optee_os-3.20.0/core/lib/libtomcrypt/src/mac/poly1305/
A Dpoly1305.c24 r0 = st->r[0]; in s_poly1305_block()
25 r1 = st->r[1]; in s_poly1305_block()
26 r2 = st->r[2]; in s_poly1305_block()
27 r3 = st->r[3]; in s_poly1305_block()
90 LOAD32L(st->r[0], key + 0); st->r[0] = (st->r[0] ) & 0x3ffffff; in poly1305_init()
91 LOAD32L(st->r[1], key + 3); st->r[1] = (st->r[1] >> 2) & 0x3ffff03; in poly1305_init()
92 LOAD32L(st->r[2], key + 6); st->r[2] = (st->r[2] >> 4) & 0x3ffc0ff; in poly1305_init()
93 LOAD32L(st->r[3], key + 9); st->r[3] = (st->r[3] >> 6) & 0x3f03fff; in poly1305_init()
94 LOAD32L(st->r[4], key + 12); st->r[4] = (st->r[4] >> 8) & 0x00fffff; in poly1305_init()
138 s_poly1305_block(st, st->buffer, 16); in poly1305_process()
[all …]
A Dpoly1305_test.c24 poly1305_state st; in poly1305_test()
28 if ((err = poly1305_init(&st, k, 32)) != CRYPT_OK) return err; in poly1305_test()
29 if ((err = poly1305_process(&st, (unsigned char*)m, 5)) != CRYPT_OK) return err; in poly1305_test()
30 if ((err = poly1305_process(&st, (unsigned char*)m + 5, 4)) != CRYPT_OK) return err; in poly1305_test()
31 if ((err = poly1305_process(&st, (unsigned char*)m + 9, 3)) != CRYPT_OK) return err; in poly1305_test()
32 if ((err = poly1305_process(&st, (unsigned char*)m + 12, 2)) != CRYPT_OK) return err; in poly1305_test()
33 if ((err = poly1305_process(&st, (unsigned char*)m + 14, 1)) != CRYPT_OK) return err; in poly1305_test()
34 if ((err = poly1305_process(&st, (unsigned char*)m + 15, mlen - 15)) != CRYPT_OK) return err; in poly1305_test()
35 if ((err = poly1305_done(&st, out, &len)) != CRYPT_OK) return err; in poly1305_test()
38 if ((err = poly1305_init(&st, k, 32)) != CRYPT_OK) return err; in poly1305_test()
[all …]
/optee_os-3.20.0/core/lib/libtomcrypt/src/stream/sober128/
A Dsober128_stream.c64 t = st->R[OFF(z,0)] + st->R[OFF(z,16)]; \
67 t = ((t + st->R[OFF(z,1)]) ^ st->konst) + st->R[OFF(z,6)]; \
85 st->initR[i] = st->R[i]; in s128_savestate()
96 st->R[i] = st->initR[i]; in s128_reloadstate()
122 #define DROUND(z) STEP(st->R,z); NLFUNC(st,(z+1)); st->R[OFF((z+1),FOLDP)] ^= t;
167 st->R[0] = 1; in sober128_stream_setup()
168 st->R[1] = 1; in sober128_stream_setup()
170 st->R[i] = st->R[i-1] + st->R[i-2]; in sober128_stream_setup()
188 st->nbuf = 0; in sober128_stream_setup()
228 st->nbuf = 0; in sober128_stream_setiv()
[all …]
/optee_os-3.20.0/core/lib/libtomcrypt/src/stream/rabbit/
A Drabbit.c208 st->work_ctx.x[i] = st->master_ctx.x[i]; in rabbit_setup()
209 st->work_ctx.c[i] = st->master_ctx.c[i]; in rabbit_setup()
211 st->work_ctx.carry = st->master_ctx.carry; in rabbit_setup()
213 XMEMSET(&(st->block), 0, sizeof(st->block)); in rabbit_setup()
241 st->work_ctx.c[0] = st->master_ctx.c[0] ^ i0; in rabbit_setiv()
242 st->work_ctx.c[1] = st->master_ctx.c[1] ^ i1; in rabbit_setiv()
243 st->work_ctx.c[2] = st->master_ctx.c[2] ^ i2; in rabbit_setiv()
244 st->work_ctx.c[3] = st->master_ctx.c[3] ^ i3; in rabbit_setiv()
252 st->work_ctx.x[i] = st->master_ctx.x[i]; in rabbit_setiv()
254 st->work_ctx.carry = st->master_ctx.carry; in rabbit_setiv()
[all …]
/optee_os-3.20.0/core/lib/libtomcrypt/src/stream/chacha/
A Dchacha_setup.c28 LTC_ARGCHK(st != NULL); in chacha_setup()
34 LOAD32L(st->input[4], key + 0); in chacha_setup()
35 LOAD32L(st->input[5], key + 4); in chacha_setup()
36 LOAD32L(st->input[6], key + 8); in chacha_setup()
37 LOAD32L(st->input[7], key + 12); in chacha_setup()
44 LOAD32L(st->input[8], key + 0); in chacha_setup()
45 LOAD32L(st->input[9], key + 4); in chacha_setup()
46 LOAD32L(st->input[10], key + 8); in chacha_setup()
47 LOAD32L(st->input[11], key + 12); in chacha_setup()
48 LOAD32L(st->input[0], constants + 0); in chacha_setup()
[all …]
A Dchacha_ivctr32.c21 int chacha_ivctr32(chacha_state *st, const unsigned char *iv, unsigned long ivlen, ulong32 counter) in chacha_ivctr32() argument
23 LTC_ARGCHK(st != NULL); in chacha_ivctr32()
28 st->input[12] = counter; in chacha_ivctr32()
29 LOAD32L(st->input[13], iv + 0); in chacha_ivctr32()
30 LOAD32L(st->input[14], iv + 4); in chacha_ivctr32()
31 LOAD32L(st->input[15], iv + 8); in chacha_ivctr32()
32 st->ksleft = 0; in chacha_ivctr32()
33 st->ivlen = ivlen; in chacha_ivctr32()
A Dchacha_ivctr64.c21 int chacha_ivctr64(chacha_state *st, const unsigned char *iv, unsigned long ivlen, ulong64 counter) in chacha_ivctr64() argument
23 LTC_ARGCHK(st != NULL); in chacha_ivctr64()
28 st->input[12] = (ulong32)(counter & 0xFFFFFFFF); in chacha_ivctr64()
29 st->input[13] = (ulong32)(counter >> 32); in chacha_ivctr64()
30 LOAD32L(st->input[14], iv + 0); in chacha_ivctr64()
31 LOAD32L(st->input[15], iv + 4); in chacha_ivctr64()
32 st->ksleft = 0; in chacha_ivctr64()
33 st->ivlen = ivlen; in chacha_ivctr64()
A Dchacha_crypt.c55 LTC_ARGCHK(st != NULL); in chacha_crypt()
58 LTC_ARGCHK(st->ivlen != 0); in chacha_crypt()
60 if (st->ksleft > 0) { in chacha_crypt()
61 j = MIN(st->ksleft, inlen); in chacha_crypt()
62 for (i = 0; i < j; ++i, st->ksleft--) out[i] = in[i] ^ st->kstream[64 - st->ksleft]; in chacha_crypt()
69 s_chacha_block(buf, st->input, st->rounds); in chacha_crypt()
70 if (st->ivlen == 8) { in chacha_crypt()
72 if (0 == ++st->input[12] && 0 == ++st->input[13]) return CRYPT_OVERFLOW; in chacha_crypt()
76 if (0 == ++st->input[12]) return CRYPT_OVERFLOW; in chacha_crypt()
80 st->ksleft = 64 - inlen; in chacha_crypt()
[all …]
A Dchacha_test.c33 chacha_state st; in chacha_test()
39 …if ((err = chacha_setup(&st, k, sizeof(k), 20)) != CRYPT_OK) return err; in chacha_test()
40 …if ((err = chacha_ivctr32(&st, n, sizeof(n), 1)) != CRYPT_OK) return err; 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()
49 …if ((err = chacha_setup(&st, k, sizeof(k), 20)) != CRYPT_OK) return err; in chacha_test()
50 …if ((err = chacha_ivctr32(&st, n, sizeof(n), 1)) != CRYPT_OK) return err; in chacha_test()
[all …]
/optee_os-3.20.0/core/lib/libtomcrypt/src/stream/salsa20/
A Dsalsa20_setup.c29 LTC_ARGCHK(st != NULL); in salsa20_setup()
36 LOAD32L(st->input[1], key + 0); in salsa20_setup()
37 LOAD32L(st->input[2], key + 4); in salsa20_setup()
38 LOAD32L(st->input[3], key + 8); in salsa20_setup()
39 LOAD32L(st->input[4], key + 12); in salsa20_setup()
46 LOAD32L(st->input[11], key + 0); in salsa20_setup()
47 LOAD32L(st->input[12], key + 4); in salsa20_setup()
48 LOAD32L(st->input[13], key + 8); in salsa20_setup()
49 LOAD32L(st->input[14], key + 12); in salsa20_setup()
50 LOAD32L(st->input[ 0], constants + 0); in salsa20_setup()
[all …]
A Dxsalsa20_setup.c63 LTC_ARGCHK(st != NULL); in xsalsa20_setup()
102 LOAD32L(st->input[ 1], subkey + 0); in xsalsa20_setup()
103 LOAD32L(st->input[ 2], subkey + 4); in xsalsa20_setup()
104 LOAD32L(st->input[ 3], subkey + 8); in xsalsa20_setup()
105 LOAD32L(st->input[ 4], subkey + 12); in xsalsa20_setup()
106 LOAD32L(st->input[11], subkey + 16); in xsalsa20_setup()
107 LOAD32L(st->input[12], subkey + 20); in xsalsa20_setup()
112 st->input[ 8] = 0; in xsalsa20_setup()
113 st->input[ 9] = 0; in xsalsa20_setup()
114 st->rounds = rounds; in xsalsa20_setup()
[all …]
A Dsalsa20_ivctr64.c22 int salsa20_ivctr64(salsa20_state *st, const unsigned char *iv, unsigned long ivlen, ulong64 counte… in salsa20_ivctr64() argument
24 LTC_ARGCHK(st != NULL); in salsa20_ivctr64()
29 LOAD32L(st->input[6], iv + 0); in salsa20_ivctr64()
30 LOAD32L(st->input[7], iv + 4); in salsa20_ivctr64()
31 st->input[8] = (ulong32)(counter & 0xFFFFFFFF); in salsa20_ivctr64()
32 st->input[9] = (ulong32)(counter >> 32); in salsa20_ivctr64()
33 st->ksleft = 0; in salsa20_ivctr64()
34 st->ivlen = ivlen; in salsa20_ivctr64()
A Dsalsa20_crypt.c49 int salsa20_crypt(salsa20_state *st, const unsigned char *in, unsigned long inlen, unsigned char *o… in salsa20_crypt() argument
56 LTC_ARGCHK(st != NULL); in salsa20_crypt()
59 LTC_ARGCHK(st->ivlen == 8 || st->ivlen == 24); in salsa20_crypt()
61 if (st->ksleft > 0) { in salsa20_crypt()
62 j = MIN(st->ksleft, inlen); in salsa20_crypt()
63 for (i = 0; i < j; ++i, st->ksleft--) out[i] = in[i] ^ st->kstream[64 - st->ksleft]; in salsa20_crypt()
70 s_salsa20_block(buf, st->input, st->rounds); in salsa20_crypt()
72 if (0 == ++st->input[8] && 0 == ++st->input[9]) return CRYPT_OVERFLOW; in salsa20_crypt()
75 st->ksleft = 64 - inlen; in salsa20_crypt()
76 for (i = inlen; i < 64; ++i) st->kstream[i] = buf[i]; in salsa20_crypt()
A Dsalsa20_test.c19 salsa20_state st; in salsa20_test()
40 …if ((err = salsa20_setup(&st, k, sizeof(k), rounds)) != CRYPT_OK) return er… in salsa20_test()
41 …if ((err = salsa20_ivctr64(&st, n, sizeof(n), counter)) != CRYPT_OK) return er… in salsa20_test()
42 …if ((err = salsa20_crypt(&st, (unsigned char*)pt, 5, out)) != CRYPT_OK) return er… in salsa20_test()
51 if ((err = salsa20_setup(&st, k, sizeof(k), rounds)) != CRYPT_OK) return err; in salsa20_test()
52 if ((err = salsa20_ivctr64(&st, n, sizeof(n), counter)) != CRYPT_OK) return err; in salsa20_test()
53 if ((err = salsa20_crypt(&st, (unsigned char*)pt, len, out)) != CRYPT_OK) return err; in salsa20_test()
75 if ((err = salsa20_setup(&st, k3, sizeof(k3), rounds3)) != CRYPT_OK) return err; in salsa20_test()
76 if ((err = salsa20_ivctr64(&st, n3, sizeof(n3), counter3)) != CRYPT_OK) return err; in salsa20_test()
77 if ((err = salsa20_keystream(&st, out, 64)) != CRYPT_OK) return err; in salsa20_test()
[all …]
/optee_os-3.20.0/core/arch/arm/dts/
A Dstm32mp135f-dk.dts16 compatible = "st,stm32mp135f-dk", "st,stm32mp135";
64 st,non-secure-otp;
75 st,clksrc = <
105 st,clkdiv = <
120 st,pll_vco {
152 pll1: st,pll@0 {
170 pll2: st,pll@1 {
183 pll3: st,pll@2 {
196 pll4: st,pll@3 {
207 st,clk_opp {
[all …]
/optee_os-3.20.0/core/lib/libtomcrypt/src/encauth/chachapoly/
A Dchacha20poly1305_decrypt.c16 int chacha20poly1305_decrypt(chacha20poly1305_state *st, const unsigned char *in, unsigned long inl… in chacha20poly1305_decrypt() argument
22 LTC_ARGCHK(st != NULL); in chacha20poly1305_decrypt()
24 if (st->aadflg) { in chacha20poly1305_decrypt()
25 padlen = 16 - (unsigned long)(st->aadlen % 16); in chacha20poly1305_decrypt()
27 if ((err = poly1305_process(&st->poly, padzero, padlen)) != CRYPT_OK) return err; in chacha20poly1305_decrypt()
29 st->aadflg = 0; /* no more AAD */ in chacha20poly1305_decrypt()
31 if (st->aadflg) st->aadflg = 0; /* no more AAD */ in chacha20poly1305_decrypt()
32 if ((err = poly1305_process(&st->poly, in, inlen)) != CRYPT_OK) return err; in chacha20poly1305_decrypt()
33 if ((err = chacha_crypt(&st->chacha, in, inlen, out)) != CRYPT_OK) return err; in chacha20poly1305_decrypt()
34 st->ctlen += (ulong64)inlen; in chacha20poly1305_decrypt()
A Dchacha20poly1305_encrypt.c16 int chacha20poly1305_encrypt(chacha20poly1305_state *st, const unsigned char *in, unsigned long inl… in chacha20poly1305_encrypt() argument
22 LTC_ARGCHK(st != NULL); in chacha20poly1305_encrypt()
24 if ((err = chacha_crypt(&st->chacha, in, inlen, out)) != CRYPT_OK) return err; in chacha20poly1305_encrypt()
25 if (st->aadflg) { in chacha20poly1305_encrypt()
26 padlen = 16 - (unsigned long)(st->aadlen % 16); in chacha20poly1305_encrypt()
28 if ((err = poly1305_process(&st->poly, padzero, padlen)) != CRYPT_OK) return err; in chacha20poly1305_encrypt()
30 st->aadflg = 0; /* no more AAD */ in chacha20poly1305_encrypt()
32 if ((err = poly1305_process(&st->poly, out, inlen)) != CRYPT_OK) return err; in chacha20poly1305_encrypt()
33 st->ctlen += (ulong64)inlen; in chacha20poly1305_encrypt()
A Dchacha20poly1305_done.c15 int chacha20poly1305_done(chacha20poly1305_state *st, unsigned char *tag, unsigned long *taglen) in chacha20poly1305_done() argument
22 LTC_ARGCHK(st != NULL); in chacha20poly1305_done()
24 padlen = 16 - (unsigned long)(st->ctlen % 16); in chacha20poly1305_done()
26 if ((err = poly1305_process(&st->poly, padzero, padlen)) != CRYPT_OK) return err; in chacha20poly1305_done()
28 STORE64L(st->aadlen, buf); in chacha20poly1305_done()
29 STORE64L(st->ctlen, buf + 8); in chacha20poly1305_done()
30 if ((err = poly1305_process(&st->poly, buf, 16)) != CRYPT_OK) return err; in chacha20poly1305_done()
31 if ((err = poly1305_done(&st->poly, tag, taglen)) != CRYPT_OK) return err; in chacha20poly1305_done()
32 if ((err = chacha_done(&st->chacha)) != CRYPT_OK) return err; in chacha20poly1305_done()
/optee_os-3.20.0/core/lib/libtomcrypt/src/mac/blake2/
A Dblake2bmac.c16 int blake2bmac_init(blake2bmac_state *st, unsigned long outlen, const unsigned char *key, unsigned … in blake2bmac_init() argument
18 LTC_ARGCHK(st != NULL); in blake2bmac_init()
20 return blake2b_init(st, outlen, key, keylen); in blake2bmac_init()
30 int blake2bmac_process(blake2bmac_state *st, const unsigned char *in, unsigned long inlen) in blake2bmac_process() argument
33 LTC_ARGCHK(st != NULL); in blake2bmac_process()
35 return blake2b_process(st, in, inlen); in blake2bmac_process()
45 int blake2bmac_done(blake2bmac_state *st, unsigned char *mac, unsigned long *maclen) in blake2bmac_done() argument
47 LTC_ARGCHK(st != NULL); in blake2bmac_done()
50 LTC_ARGCHK(*maclen >= st->blake2b.outlen); in blake2bmac_done()
52 *maclen = st->blake2b.outlen; in blake2bmac_done()
[all …]
A Dblake2smac.c16 int blake2smac_init(blake2smac_state *st, unsigned long outlen, const unsigned char *key, unsigned … in blake2smac_init() argument
18 LTC_ARGCHK(st != NULL); in blake2smac_init()
20 return blake2s_init(st, outlen, key, keylen); in blake2smac_init()
30 int blake2smac_process(blake2smac_state *st, const unsigned char *in, unsigned long inlen) in blake2smac_process() argument
33 LTC_ARGCHK(st != NULL); in blake2smac_process()
35 return blake2s_process(st, in, inlen); in blake2smac_process()
45 int blake2smac_done(blake2smac_state *st, unsigned char *mac, unsigned long *maclen) in blake2smac_done() argument
47 LTC_ARGCHK(st != NULL); in blake2smac_done()
50 LTC_ARGCHK(*maclen >= st->blake2s.outlen); in blake2smac_done()
52 *maclen = st->blake2s.outlen; in blake2smac_done()
[all …]
A Dblake2bmac_test.c275 blake2bmac_state st; in blake2bmac_test()
284 blake2bmac_init(&st, olen, key, klen); in blake2bmac_test()
285 blake2bmac_process(&st, (unsigned char*)inp, 5); in blake2bmac_test()
286 blake2bmac_process(&st, (unsigned char*)inp + 5, 4); in blake2bmac_test()
287 blake2bmac_process(&st, (unsigned char*)inp + 9, 3); in blake2bmac_test()
288 blake2bmac_process(&st, (unsigned char*)inp + 12, 2); in blake2bmac_test()
289 blake2bmac_process(&st, (unsigned char*)inp + 14, 1); in blake2bmac_test()
291 blake2bmac_done(&st, out, &olen); in blake2bmac_test()
295 blake2bmac_init(&st, olen, key, klen); in blake2bmac_test()
296 blake2bmac_process(&st, (unsigned char*)inp, ilen); in blake2bmac_test()
[all …]
A Dblake2smac_test.c275 blake2smac_state st; in blake2smac_test()
284 blake2smac_init(&st, olen, key, klen); in blake2smac_test()
285 blake2smac_process(&st, (unsigned char*)inp, 5); in blake2smac_test()
286 blake2smac_process(&st, (unsigned char*)inp + 5, 4); in blake2smac_test()
287 blake2smac_process(&st, (unsigned char*)inp + 9, 3); in blake2smac_test()
288 blake2smac_process(&st, (unsigned char*)inp + 12, 2); in blake2smac_test()
289 blake2smac_process(&st, (unsigned char*)inp + 14, 1); in blake2smac_test()
291 blake2smac_done(&st, out, &olen); in blake2smac_test()
295 blake2smac_init(&st, olen, key, klen); in blake2smac_test()
296 blake2smac_process(&st, (unsigned char*)inp, ilen); in blake2smac_test()
[all …]
/optee_os-3.20.0/core/lib/libtomcrypt/src/stream/rc4/
A Drc4_stream.c21 LTC_ARGCHK(st != NULL); in rc4_stream_setup()
25 s = st->buf; in rc4_stream_setup()
37 st->x = 0; in rc4_stream_setup()
38 st->y = 0; in rc4_stream_setup()
55 LTC_ARGCHK(st != NULL); in rc4_stream_crypt()
59 x = st->x; in rc4_stream_crypt()
60 y = st->y; in rc4_stream_crypt()
61 s = st->buf; in rc4_stream_crypt()
69 st->x = x; in rc4_stream_crypt()
70 st->y = y; in rc4_stream_crypt()
[all …]
/optee_os-3.20.0/core/lib/libtomcrypt/src/stream/sosemanuk/
A Dsosemanuk_test.c12 sosemanuk_state st; in sosemanuk_test()
27 …if ((err = sosemanuk_setup(&st, k, sizeof(k))) != CRYPT_OK) return … in sosemanuk_test()
28 …if ((err = sosemanuk_setiv(&st, n, sizeof(n))) != CRYPT_OK) return … in sosemanuk_test()
29 …if ((err = sosemanuk_crypt(&st, (unsigned char*)pt, 5, out)) != CRYPT_OK) return … in sosemanuk_test()
36 if ((err = sosemanuk_setup(&st, k, sizeof(k))) != CRYPT_OK) return err; in sosemanuk_test()
37 if ((err = sosemanuk_setiv(&st, n, sizeof(n))) != CRYPT_OK) return err; in sosemanuk_test()
38 if ((err = sosemanuk_crypt(&st, (unsigned char*)pt, len, out)) != CRYPT_OK) return err; in sosemanuk_test()
68 if ((err = sosemanuk_setup(&st, k3, sizeof(k3))) != CRYPT_OK) return err; in sosemanuk_test()
69 if ((err = sosemanuk_setiv(&st, n3, sizeof(n3))) != CRYPT_OK) return err; in sosemanuk_test()
70 if ((err = sosemanuk_keystream(&st, out, 64)) != CRYPT_OK) return err; in sosemanuk_test()
[all …]
A Dsosemanuk.c401 st->s09 = r3; in sosemanuk_setiv()
402 st->s08 = r1; in sosemanuk_setiv()
403 st->s07 = r0; in sosemanuk_setiv()
404 st->s06 = r2; in sosemanuk_setiv()
428 st->ptr = sizeof(st->buf); in sosemanuk_setiv()
710 st->r1 = r1; in s_sosemanuk_internal()
711 st->r2 = r2; in s_sosemanuk_internal()
747 if (st->ptr < (sizeof(st->buf))) { in sosemanuk_crypt()
748 unsigned long rlen = (sizeof(st->buf)) - st->ptr; in sosemanuk_crypt()
753 s_xorbuf(st->buf + st->ptr, in, out, rlen); in sosemanuk_crypt()
[all …]

Completed in 38 milliseconds

12345