Home
last modified time | relevance | path

Searched refs:omac (Results 1 – 20 of 20) sorted by relevance

/optee_os/core/lib/libtomcrypt/src/mac/omac/
A Domac_done.c31 LTC_ARGCHK(omac != NULL); in omac_done()
38 if ((omac->buflen > (int)sizeof(omac->block)) || (omac->buflen < 0) || in omac_done()
39 (omac->blklen > (int)sizeof(omac->block)) || (omac->buflen > omac->blklen)) { in omac_done()
44 if (omac->buflen != omac->blklen) { in omac_done()
46 omac->block[omac->buflen++] = 0x80; in omac_done()
49 while (omac->buflen < omac->blklen) { in omac_done()
50 omac->block[omac->buflen++] = 0x00; in omac_done()
59 omac->block[x] ^= omac->prev[x] ^ omac->Lu[mode][x]; in omac_done()
63 …if ((err = cipher_descriptor[omac->cipher_idx]->ecb_encrypt(omac->block, omac->block, &omac->key))… in omac_done()
66 cipher_descriptor[omac->cipher_idx]->done(&omac->key); in omac_done()
[all …]
A Domac_process.c32 LTC_ARGCHK(omac != NULL); in omac_process()
38 if ((omac->buflen > (int)sizeof(omac->block)) || (omac->buflen < 0) || in omac_process()
39 (omac->blklen > (int)sizeof(omac->block)) || (omac->buflen > omac->blklen)) { in omac_process()
54 …if ((err = cipher_descriptor[omac->cipher_idx]->ecb_encrypt(omac->prev, omac->prev, &omac->key)) !… in omac_process()
65 if (omac->buflen == omac->blklen) { in omac_process()
67 omac->block[x] ^= omac->prev[x]; in omac_process()
69 …if ((err = cipher_descriptor[omac->cipher_idx]->ecb_encrypt(omac->block, omac->prev, &omac->key)) … in omac_process()
72 omac->buflen = 0; in omac_process()
76 n = MIN(inlen, (unsigned long)(omac->blklen - omac->buflen)); in omac_process()
77 XMEMCPY(omac->block + omac->buflen, in, n); in omac_process()
[all …]
A Domac_init.c32 LTC_ARGCHK(omac != NULL); in omac_init()
65 …if ((err = cipher_descriptor[cipher]->ecb_encrypt(omac->Lu[0], omac->Lu[0], &omac->key)) != CRYPT_… in omac_init()
72 msb = omac->Lu[x][0] >> 7; in omac_init()
76 omac->Lu[x][y] = ((omac->Lu[x][y] << 1) | (omac->Lu[x][y+1] >> 7)) & 255; in omac_init()
78 omac->Lu[x][len - 1] = ((omac->Lu[x][len - 1] << 1) ^ (msb ? mask : 0)) & 255; in omac_init()
82 XMEMCPY(omac->Lu[1], omac->Lu[0], sizeof(omac->Lu[0])); in omac_init()
87 omac->cipher_idx = cipher; in omac_init()
88 omac->buflen = 0; in omac_init()
89 omac->blklen = len; in omac_init()
90 zeromem(omac->prev, sizeof(omac->prev)); in omac_init()
[all …]
A Domac_memory.c36 omac_state *omac; in omac_memory() local
54 omac = XMALLOC(sizeof(omac_state)); in omac_memory()
55 if (omac == NULL) { in omac_memory()
60 if ((err = omac_init(omac, cipher, key, keylen)) != CRYPT_OK) { in omac_memory()
63 if ((err = omac_process(omac, in, inlen)) != CRYPT_OK) { in omac_memory()
66 if ((err = omac_done(omac, out, outlen)) != CRYPT_OK) { in omac_memory()
73 zeromem(omac, sizeof(omac_state)); in omac_memory()
76 XFREE(omac); in omac_memory()
A Domac_memory_multi.c38 omac_state *omac; in omac_memory_multi() local
49 omac = XMALLOC(sizeof(omac_state)); in omac_memory_multi()
50 if (omac == NULL) { in omac_memory_multi()
55 if ((err = omac_init(omac, cipher, key, keylen)) != CRYPT_OK) { in omac_memory_multi()
63 if ((err = omac_process(omac, curptr, curlen)) != CRYPT_OK) { in omac_memory_multi()
73 if ((err = omac_done(omac, out, outlen)) != CRYPT_OK) { in omac_memory_multi()
78 zeromem(omac, sizeof(omac_state)); in omac_memory_multi()
80 XFREE(omac); in omac_memory_multi()
A Domac_file.c45 omac_state omac; in omac_file()
58 if ((err = omac_init(&omac, cipher, key, keylen)) != CRYPT_OK) { in omac_file()
70 if ((err = omac_process(&omac, buf, (unsigned long)x)) != CRYPT_OK) { in omac_file()
81 err = omac_done(&omac, out, outlen); in omac_file()
87 zeromem(&omac, sizeof(omac_state)); in omac_file()
/optee_os/core/lib/libtomcrypt/src/encauth/eax/
A Deax_init.c38 omac_state *omac; in eax_init() local
56 omac = XMALLOC(sizeof(*omac)); in eax_init()
58 if (buf == NULL || omac == NULL) { in eax_init()
62 if (omac != NULL) { in eax_init()
63 XFREE(omac); in eax_init()
70 if ((err = omac_init(omac, cipher, key, keylen)) != CRYPT_OK) { in eax_init()
75 if ((err = omac_process(omac, buf, blklen)) != CRYPT_OK) { in eax_init()
79 if ((err = omac_process(omac, nonce, noncelen)) != CRYPT_OK) { in eax_init()
84 if ((err = omac_done(omac, eax->N, &len)) != CRYPT_OK) { in eax_init()
130 zeromem(omac, sizeof(*omac)); in eax_init()
[all …]
/optee_os/out/arm/core/lib/libtomcrypt/src/mac/omac/
A D.omac_done.o.cmd1omac/omac_done.o := /usr/bin/ccache /home/test/workspace/code/optee_3.16/build/../toolchains/aarch…
A D.omac_init.o.cmd1omac/omac_init.o := /usr/bin/ccache /home/test/workspace/code/optee_3.16/build/../toolchains/aarch…
A D.omac_memory.o.cmd1omac/omac_memory.o := /usr/bin/ccache /home/test/workspace/code/optee_3.16/build/../toolchains/aar…
A D.omac_memory_multi.o.cmd1omac/omac_memory_multi.o := /usr/bin/ccache /home/test/workspace/code/optee_3.16/build/../toolchai…
A D.omac_process.o.cmd1omac/omac_process.o := /usr/bin/ccache /home/test/workspace/code/optee_3.16/build/../toolchains/aa…
A D.omac_done.o.d1 out/arm/core/lib/libtomcrypt/src/mac/omac/omac_done.o: \
2 core/lib/libtomcrypt/src/mac/omac/omac_done.c \
A D.omac_init.o.d1 out/arm/core/lib/libtomcrypt/src/mac/omac/omac_init.o: \
2 core/lib/libtomcrypt/src/mac/omac/omac_init.c \
A D.omac_memory.o.d1 out/arm/core/lib/libtomcrypt/src/mac/omac/omac_memory.o: \
2 core/lib/libtomcrypt/src/mac/omac/omac_memory.c \
A D.omac_memory_multi.o.d1 out/arm/core/lib/libtomcrypt/src/mac/omac/omac_memory_multi.o: \
2 core/lib/libtomcrypt/src/mac/omac/omac_memory_multi.c \
A D.omac_process.o.d1 out/arm/core/lib/libtomcrypt/src/mac/omac/omac_process.o: \
2 core/lib/libtomcrypt/src/mac/omac/omac_process.c \
/optee_os/core/lib/libtomcrypt/src/mac/
A Dsub.mk2 subdirs-$(_CFG_CORE_LTC_CMAC) += omac
/optee_os/core/lib/libtomcrypt/src/headers/
A Dtomcrypt_mac.h48 int omac_init(omac_state *omac, int cipher, const unsigned char *key, unsigned long keylen);
49 int omac_process(omac_state *omac, const unsigned char *in, unsigned long inlen);
50 int omac_done(omac_state *omac, unsigned char *out, unsigned long *outlen);
/optee_os/out/arm/core/
A Dtee.dmp88309 /home/test/workspace/code/optee_3.16/optee_os/core/lib/libtomcrypt/src/mac/omac/omac_done.c:27
88316 /home/test/workspace/code/optee_3.16/optee_os/core/lib/libtomcrypt/src/mac/omac/omac_done.c:31
88319 /home/test/workspace/code/optee_3.16/optee_os/core/lib/libtomcrypt/src/mac/omac/omac_done.c:78
88339 /home/test/workspace/code/optee_3.16/optee_os/core/lib/libtomcrypt/src/mac/omac/omac_done.c:38
88348 /home/test/workspace/code/optee_3.16/optee_os/core/lib/libtomcrypt/src/mac/omac/omac_done.c:39
88351 /home/test/workspace/code/optee_3.16/optee_os/core/lib/libtomcrypt/src/mac/omac/omac_done.c:44
88353 /home/test/workspace/code/optee_3.16/optee_os/core/lib/libtomcrypt/src/mac/omac/omac_done.c:46
88359 /home/test/workspace/code/optee_3.16/optee_os/core/lib/libtomcrypt/src/mac/omac/omac_done.c:49
88363 /home/test/workspace/code/optee_3.16/optee_os/core/lib/libtomcrypt/src/mac/omac/omac_done.c:52
88365 /home/test/workspace/code/optee_3.16/optee_os/core/lib/libtomcrypt/src/mac/omac/omac_done.c:58
[all …]

Completed in 192 milliseconds