Home
last modified time | relevance | path

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

/external/dropbear/libtomcrypt/src/mac/omac/
Domac_done.c27 int omac_done(omac_state *omac, unsigned char *out, unsigned long *outlen) in omac_done() argument
32 LTC_ARGCHK(omac != NULL); in omac_done()
35 if ((err = cipher_is_valid(omac->cipher_idx)) != CRYPT_OK) { in omac_done()
39 if ((omac->buflen > (int)sizeof(omac->block)) || (omac->buflen < 0) || in omac_done()
40 (omac->blklen > (int)sizeof(omac->block)) || (omac->buflen > omac->blklen)) { in omac_done()
45 if (omac->buflen != omac->blklen) { in omac_done()
47 omac->block[omac->buflen++] = 0x80; in omac_done()
50 while (omac->buflen < omac->blklen) { in omac_done()
51 omac->block[omac->buflen++] = 0x00; in omac_done()
59 for (x = 0; x < (unsigned)omac->blklen; x++) { in omac_done()
[all …]
Domac_process.c28 int omac_process(omac_state *omac, const unsigned char *in, unsigned long inlen) in omac_process() argument
33 LTC_ARGCHK(omac != NULL); in omac_process()
35 if ((err = cipher_is_valid(omac->cipher_idx)) != CRYPT_OK) { in omac_process()
39 if ((omac->buflen > (int)sizeof(omac->block)) || (omac->buflen < 0) || in omac_process()
40 (omac->blklen > (int)sizeof(omac->block)) || (omac->buflen > omac->blklen)) { in omac_process()
45 if (omac->buflen == 0 && inlen > 16) { in omac_process()
49 *((LTC_FAST_TYPE*)(&omac->prev[y])) ^= *((LTC_FAST_TYPE*)(&in[y])); in omac_process()
52 …if ((err = cipher_descriptor[omac->cipher_idx].ecb_encrypt(omac->prev, omac->prev, &omac->key)) !=… in omac_process()
62 if (omac->buflen == omac->blklen) { in omac_process()
63 for (x = 0; x < (unsigned long)omac->blklen; x++) { in omac_process()
[all …]
Domac_init.c29 int omac_init(omac_state *omac, int cipher, const unsigned char *key, unsigned long keylen) in omac_init() argument
33 LTC_ARGCHK(omac != NULL); in omac_init()
58 if ((err = cipher_descriptor[cipher].setup(key, keylen, 0, &omac->key)) != CRYPT_OK) { in omac_init()
65 zeromem(omac->Lu[0], cipher_descriptor[cipher].block_length); in omac_init()
66 …if ((err = cipher_descriptor[cipher].ecb_encrypt(omac->Lu[0], omac->Lu[0], &omac->key)) != CRYPT_O… in omac_init()
73 msb = omac->Lu[x][0] >> 7; in omac_init()
77 omac->Lu[x][y] = ((omac->Lu[x][y] << 1) | (omac->Lu[x][y+1] >> 7)) & 255; in omac_init()
79 omac->Lu[x][len - 1] = ((omac->Lu[x][len - 1] << 1) ^ (msb ? mask : 0)) & 255; in omac_init()
83 XMEMCPY(omac->Lu[1], omac->Lu[0], sizeof(omac->Lu[0])); in omac_init()
88 omac->cipher_idx = cipher; in omac_init()
[all …]
Domac_memory_multi.c39 omac_state *omac; in omac_memory_multi() local
50 omac = XMALLOC(sizeof(omac_state)); in omac_memory_multi()
51 if (omac == NULL) { in omac_memory_multi()
56 if ((err = omac_init(omac, cipher, key, keylen)) != CRYPT_OK) { in omac_memory_multi()
64 if ((err = omac_process(omac, curptr, curlen)) != CRYPT_OK) { in omac_memory_multi()
74 if ((err = omac_done(omac, out, outlen)) != CRYPT_OK) { in omac_memory_multi()
79 zeromem(omac, sizeof(omac_state)); in omac_memory_multi()
81 XFREE(omac); in omac_memory_multi()
Domac_memory.c37 omac_state *omac; in omac_memory() local
55 omac = XMALLOC(sizeof(omac_state)); in omac_memory()
56 if (omac == NULL) { in omac_memory()
61 if ((err = omac_init(omac, cipher, key, keylen)) != CRYPT_OK) { in omac_memory()
64 if ((err = omac_process(omac, in, inlen)) != CRYPT_OK) { in omac_memory()
67 if ((err = omac_done(omac, out, outlen)) != CRYPT_OK) { in omac_memory()
74 zeromem(omac, sizeof(omac_state)); in omac_memory()
77 XFREE(omac); in omac_memory()
Domac_file.c39 omac_state omac; in omac_file()
53 if ((err = omac_init(&omac, cipher, key, keylen)) != CRYPT_OK) { in omac_file()
60 if ((err = omac_process(&omac, buf, x)) != CRYPT_OK) { in omac_file()
67 if ((err = omac_done(&omac, out, outlen)) != CRYPT_OK) { in omac_file()
/external/dropbear/libtomcrypt/src/encauth/eax/
Deax_init.c39 omac_state *omac; in eax_init() local
57 omac = XMALLOC(sizeof(*omac)); in eax_init()
59 if (buf == NULL || omac == NULL) { in eax_init()
63 if (omac != NULL) { in eax_init()
64 XFREE(omac); in eax_init()
71 if ((err = omac_init(omac, cipher, key, keylen)) != CRYPT_OK) { in eax_init()
76 if ((err = omac_process(omac, buf, blklen)) != CRYPT_OK) { in eax_init()
80 if ((err = omac_process(omac, nonce, noncelen)) != CRYPT_OK) { in eax_init()
85 if ((err = omac_done(omac, eax->N, &len)) != CRYPT_OK) { in eax_init()
131 zeromem(omac, sizeof(*omac)); in eax_init()
[all …]
/external/dropbear/libtomcrypt/
DAndroid.mk33 src/mac/omac/omac_done.c src/mac/omac/omac_file.c src/mac/omac/omac_init.c src/mac/omac/omac_memory…
34 src/mac/omac/omac_memory_multi.c src/mac/omac/omac_process.c src/mac/omac/omac_test.c \
DMakefile.in124 src/mac/omac/omac_done.o src/mac/omac/omac_file.o src/mac/omac/omac_init.o src/mac/omac/omac_memory…
125 src/mac/omac/omac_memory_multi.o src/mac/omac/omac_process.o src/mac/omac/omac_test.o \
Dmakefile.msvc31 src/mac/omac/omac_done.obj src/mac/omac/omac_file.obj src/mac/omac/omac_init.obj src/mac/omac/omac_…
32 src/mac/omac/omac_memory_multi.obj src/mac/omac/omac_process.obj src/mac/omac/omac_test.obj \
Dmakefile.icc121 src/mac/omac/omac_done.o src/mac/omac/omac_file.o src/mac/omac/omac_init.o src/mac/omac/omac_memory…
122 src/mac/omac/omac_memory_multi.o src/mac/omac/omac_process.o src/mac/omac/omac_test.o \
Dmakefile.unix67 src/mac/omac/omac_done.o src/mac/omac/omac_file.o src/mac/omac/omac_init.o src/mac/omac/omac_memory…
68 src/mac/omac/omac_memory_multi.o src/mac/omac/omac_process.o src/mac/omac/omac_test.o \
Dmakefile.shared126 src/mac/omac/omac_done.o src/mac/omac/omac_file.o src/mac/omac/omac_init.o src/mac/omac/omac_memory…
127 src/mac/omac/omac_memory_multi.o src/mac/omac/omac_process.o src/mac/omac/omac_test.o \
Dcrypt.tex2200 OMAC\footnote{\url{http://crypt.cis.ibaraki.ac.jp/omac/omac.html}}, which stands for \textit{One-Ke…
2206 \index{omac\_init()}
2208 int omac_init( omac_state *omac,
2213 The \textit{omac} parameter is the state for the OMAC algorithm. The \textit{cipher} parameter is …
2218 \index{omac\_process()}
2240 \index{omac\_done()}
2255 \index{omac\_memory()}
2265 rules as omac\_done.
2268 \index{omac\_file()}
2279 the same rules as omac\_done.
[all …]
Dchanges364 … -- Added "done" function to ciphers and the five chaining modes [and things like omac/pmac/etc]
387 …-- Added "multi block" helpers for hash, hmac, pmac and omac routines so you can process multiple …
/external/dropbear/libtomcrypt/src/headers/
Dtomcrypt_mac.h38 int omac_init(omac_state *omac, int cipher, const unsigned char *key, unsigned long keylen);
39 int omac_process(omac_state *omac, const unsigned char *in, unsigned long inlen);
40 int omac_done(omac_state *omac, unsigned char *out, unsigned long *outlen);
/external/dropbear/
Dconfigure.in635 AS_MKDIR_P(libtomcrypt/src/mac/omac)
Dconfigure11047 mkdir -p libtomcrypt/src/mac/omac
11049 as_dir=libtomcrypt/src/mac/omac