Home
last modified time | relevance | path

Searched refs:f9 (Results 1 – 7 of 7) sorted by relevance

/optee_os-3.20.0/core/lib/libtomcrypt/src/mac/f9/
A Df9_process.c22 LTC_ARGCHK(f9 != NULL); in f9_process()
30 if ((f9->blocksize > cipher_descriptor[f9->cipher]->block_length) || (f9->blocksize < 0) || in f9_process()
31 (f9->buflen > f9->blocksize) || (f9->buflen < 0)) { in f9_process()
36 if (f9->buflen == 0) { in f9_process()
41 cipher_descriptor[f9->cipher]->ecb_encrypt(f9->IV, f9->IV, &f9->key); in f9_process()
43 *(LTC_FAST_TYPE_PTR_CAST(&(f9->ACC[x]))) ^= *(LTC_FAST_TYPE_PTR_CAST(&(f9->IV[x]))); in f9_process()
52 if (f9->buflen == f9->blocksize) { in f9_process()
53 cipher_descriptor[f9->cipher]->ecb_encrypt(f9->IV, f9->IV, &f9->key); in f9_process()
55 f9->ACC[x] ^= f9->IV[x]; in f9_process()
57 f9->buflen = 0; in f9_process()
[all …]
A Df9_done.c21 LTC_ARGCHK(f9 != NULL); in f9_done()
29 if ((f9->blocksize > cipher_descriptor[f9->cipher]->block_length) || (f9->blocksize < 0) || in f9_done()
30 (f9->buflen > f9->blocksize) || (f9->buflen < 0)) { in f9_done()
34 if (f9->buflen != 0) { in f9_done()
36 cipher_descriptor[f9->cipher]->ecb_encrypt(f9->IV, f9->IV, &f9->key); in f9_done()
37 f9->buflen = 0; in f9_done()
39 f9->ACC[x] ^= f9->IV[x]; in f9_done()
44 … if ((err = cipher_descriptor[f9->cipher]->setup(f9->akey, f9->keylen, 0, &f9->key)) != CRYPT_OK) { in f9_done()
49 cipher_descriptor[f9->cipher]->ecb_encrypt(f9->ACC, f9->ACC, &f9->key); in f9_done()
50 cipher_descriptor[f9->cipher]->done(&f9->key); in f9_done()
[all …]
A Df9_init.c19 int f9_init(f9_state *f9, int cipher, const unsigned char *key, unsigned long keylen) in f9_init() argument
23 LTC_ARGCHK(f9 != NULL); in f9_init()
37 if ((err = cipher_descriptor[cipher]->setup(key, keylen, 0, &f9->key)) != CRYPT_OK) { in f9_init()
43 f9->akey[x] = key[x] ^ 0xAA; in f9_init()
47 zeromem(f9->IV, cipher_descriptor[cipher]->block_length); in f9_init()
48 zeromem(f9->ACC, cipher_descriptor[cipher]->block_length); in f9_init()
49 f9->blocksize = cipher_descriptor[cipher]->block_length; in f9_init()
50 f9->cipher = cipher; in f9_init()
51 f9->buflen = 0; in f9_init()
52 f9->keylen = keylen; in f9_init()
A Df9_memory.c27 f9_state *f9; in f9_memory() local
40 f9 = XCALLOC(1, sizeof(*f9)); in f9_memory()
41 if (f9 == NULL) { in f9_memory()
45 if ((err = f9_init(f9, cipher, key, keylen)) != CRYPT_OK) { in f9_memory()
49 if ((err = f9_process(f9, in, inlen)) != CRYPT_OK) { in f9_memory()
53 err = f9_done(f9, out, outlen); in f9_memory()
55 XFREE(f9); in f9_memory()
A Df9_memory_multi.c31 f9_state *f9; in f9_memory_multi() local
42 f9 = XMALLOC(sizeof(f9_state)); in f9_memory_multi()
43 if (f9 == NULL) { in f9_memory_multi()
48 if ((err = f9_init(f9, cipher, key, keylen)) != CRYPT_OK) { in f9_memory_multi()
56 if ((err = f9_process(f9, curptr, curlen)) != CRYPT_OK) { in f9_memory_multi()
66 if ((err = f9_done(f9, out, outlen)) != CRYPT_OK) { in f9_memory_multi()
71 zeromem(f9, sizeof(f9_state)); in f9_memory_multi()
73 XFREE(f9); in f9_memory_multi()
A Df9_file.c38 f9_state f9; in f9_file()
51 if ((err = f9_init(&f9, cipher, key, keylen)) != CRYPT_OK) { in f9_file()
63 if ((err = f9_process(&f9, buf, (unsigned long)x)) != CRYPT_OK) { in f9_file()
74 err = f9_done(&f9, out, outlen); in f9_file()
80 zeromem(&f9, sizeof(f9_state)); in f9_file()
/optee_os-3.20.0/core/lib/libtomcrypt/src/headers/
A Dtomcrypt_mac.h226 int f9_init(f9_state *f9, int cipher, const unsigned char *key, unsigned long keylen);
227 int f9_process(f9_state *f9, const unsigned char *in, unsigned long inlen);
228 int f9_done(f9_state *f9, unsigned char *out, unsigned long *outlen);

Completed in 22 milliseconds