Searched defs:pmac (Results 1 - 5 of 5) sorted by relevance

/external/dropbear/libtomcrypt/src/mac/pmac/
H A Dpmac_shift_xor.c22 @param pmac The PMAC state.
24 void pmac_shift_xor(pmac_state *pmac) argument
27 y = pmac_ntz(pmac->block_index++);
29 for (x = 0; x < pmac->block_len; x += sizeof(LTC_FAST_TYPE)) {
30 *((LTC_FAST_TYPE*)((unsigned char *)pmac->Li + x)) ^=
31 *((LTC_FAST_TYPE*)((unsigned char *)pmac->Ls[y] + x));
34 for (x = 0; x < pmac->block_len; x++) {
35 pmac->Li[x] ^= pmac->Ls[y][x];
42 /* $Source: /cvs/libtom/libtomcrypt/src/mac/pmac/pmac_shift_xo
[all...]
H A Dpmac_memory.c37 pmac_state *pmac; local
44 /* allocate ram for pmac state */
45 pmac = XMALLOC(sizeof(pmac_state));
46 if (pmac == NULL) {
50 if ((err = pmac_init(pmac, cipher, key, keylen)) != CRYPT_OK) {
53 if ((err = pmac_process(pmac, in, inlen)) != CRYPT_OK) {
56 if ((err = pmac_done(pmac, out, outlen)) != CRYPT_OK) {
63 zeromem(pmac, sizeof(pmac_state));
66 XFREE(pmac);
72 /* $Source: /cvs/libtom/libtomcrypt/src/mac/pmac/pmac_memor
[all...]
H A Dpmac_process.c23 @param pmac The PMAC state
28 int pmac_process(pmac_state *pmac, const unsigned char *in, unsigned long inlen) argument
34 LTC_ARGCHK(pmac != NULL);
36 if ((err = cipher_is_valid(pmac->cipher_idx)) != CRYPT_OK) {
40 if ((pmac->buflen > (int)sizeof(pmac->block)) || (pmac->buflen < 0) ||
41 (pmac->block_len > (int)sizeof(pmac->block)) || (pmac
[all...]
H A Dpmac_init.c40 @param pmac The PMAC state to initialize
46 int pmac_init(pmac_state *pmac, int cipher, const unsigned char *key, unsigned long keylen) argument
51 LTC_ARGCHK(pmac != NULL);
60 pmac->block_len = cipher_descriptor[cipher].block_length;
62 if (polys[poly].len == pmac->block_len) {
66 if (polys[poly].len != pmac->block_len) {
71 if (pmac->block_len % sizeof(LTC_FAST_TYPE)) {
78 if ((err = cipher_descriptor[cipher].setup(key, keylen, 0, &pmac->key)) != CRYPT_OK) {
83 L = XMALLOC(pmac->block_len);
89 zeromem(L, pmac
[all...]
H A Dpmac_memory_multi.c39 pmac_state *pmac; local
49 /* allocate ram for pmac state */
50 pmac = XMALLOC(sizeof(pmac_state));
51 if (pmac == NULL) {
55 if ((err = pmac_init(pmac, cipher, key, keylen)) != CRYPT_OK) {
63 if ((err = pmac_process(pmac, curptr, curlen)) != CRYPT_OK) {
73 if ((err = pmac_done(pmac, out, outlen)) != CRYPT_OK) {
78 zeromem(pmac, sizeof(pmac_state));
80 XFREE(pmac);
87 /* $Source: /cvs/libtom/libtomcrypt/src/mac/pmac/pmac_memory_mult
[all...]

Completed in 200 milliseconds