HomeSort by relevance Sort by last modified time
    Searched refs:lrw (Results 1 - 13 of 13) sorted by null

  /external/dropbear/libtomcrypt/src/modes/lrw/
lrw_decrypt.c 21 LRW decrypt blocks
25 @param lrw The LRW state
27 int lrw_decrypt(const unsigned char *ct, unsigned char *pt, unsigned long len, symmetric_LRW *lrw)
33 LTC_ARGCHK(lrw != NULL);
35 if ((err = cipher_is_valid(lrw->cipher)) != CRYPT_OK) {
39 if (cipher_descriptor[lrw->cipher].accel_lrw_decrypt != NULL) {
40 return cipher_descriptor[lrw->cipher].accel_lrw_decrypt(ct, pt, len, lrw->IV, lrw->tweak, &lrw->key)
    [all...]
lrw_encrypt.c 21 LRW encrypt blocks
25 @param lrw The LRW state
27 int lrw_encrypt(const unsigned char *pt, unsigned char *ct, unsigned long len, symmetric_LRW *lrw)
33 LTC_ARGCHK(lrw != NULL);
35 if ((err = cipher_is_valid(lrw->cipher)) != CRYPT_OK) {
39 if (cipher_descriptor[lrw->cipher].accel_lrw_encrypt != NULL) {
40 return cipher_descriptor[lrw->cipher].accel_lrw_encrypt(pt, ct, len, lrw->IV, lrw->tweak, &lrw->key)
    [all...]
lrw_done.c 21 Terminate a LRW state
22 @param lrw The state to terminate
25 int lrw_done(symmetric_LRW *lrw)
29 LTC_ARGCHK(lrw != NULL);
31 if ((err = cipher_is_valid(lrw->cipher)) != CRYPT_OK) {
34 cipher_descriptor[lrw->cipher].done(&lrw->key);
40 /* $Source: /cvs/libtom/libtomcrypt/src/modes/lrw/lrw_done.c,v $ */
lrw_process.c 21 Process blocks with LRW, since decrypt/encrypt are largely the same they share this code.
26 @param lrw The LRW state
29 int lrw_process(const unsigned char *pt, unsigned char *ct, unsigned long len, int mode, symmetric_LRW *lrw)
39 LTC_ARGCHK(lrw != NULL);
47 XMEMCPY(prod, lrw->pad, 16);
51 lrw->IV[x] = (lrw->IV[x] + 1) & 255;
52 if (lrw->IV[x]) {
63 *((LTC_FAST_TYPE *)(lrw->pad + y)) ^= *((LTC_FAST_TYPE *)(&lrw->PC[x][lrw->IV[x]][y])) ^ *((LTC_FAST_TYPE *)(&lrw->PC[x][( (…)
    [all...]
lrw_getiv.c 21 Get the IV for LRW
24 @param lrw The LRW state to read
27 int lrw_getiv(unsigned char *IV, unsigned long *len, symmetric_LRW *lrw)
31 LTC_ARGCHK(lrw != NULL);
37 XMEMCPY(IV, lrw->IV, 16);
43 /* $Source: /cvs/libtom/libtomcrypt/src/modes/lrw/lrw_getiv.c,v $ */
lrw_setiv.c 21 Set the IV for LRW
24 @param lrw The LRW state to update
27 int lrw_setiv(const unsigned char *IV, unsigned long len, symmetric_LRW *lrw)
35 LTC_ARGCHK(lrw != NULL);
41 if ((err = cipher_is_valid(lrw->cipher)) != CRYPT_OK) {
46 XMEMCPY(lrw->IV, IV, 16);
49 if (cipher_descriptor[lrw->cipher].accel_lrw_encrypt != NULL && cipher_descriptor[lrw->cipher].accel_lrw_decrypt != NULL) {
50 /* we have accelerators, let's bail since they don't use lrw->pad anyways *
    [all...]
lrw_start.c 21 Initialize the LRW context
28 @param lrw [out] The LRW state
36 symmetric_LRW *lrw)
47 LTC_ARGCHK(lrw != NULL);
64 if ((err = cipher_descriptor[cipher].setup(key, keylen, num_rounds, &lrw->key)) != CRYPT_OK) {
67 lrw->cipher = cipher;
70 XMEMCPY(lrw->tweak, tweak, 16);
78 gcm_gf_mult(tweak, B, &lrw->PC[0][y][0]);
85 t = lrw->PC[x-1][y][15]
    [all...]
lrw_test.c 15 LRW_MODE implementation, test LRW, Tom St Denis
21 Test LRW against specs
73 symmetric_LRW lrw;
86 if ((err = lrw_start(idx, tests[x].IV, tests[x].key, 16, tests[x].tweak, 0, &lrw)) != CRYPT_OK) {
91 if (XMEMCMP(tests[x].expected_tweak, lrw.pad, 16)) {
92 lrw_done(&lrw);
97 if ((err = lrw_encrypt(tests[x].P, buf[0], 16, &lrw)) != CRYPT_OK) {
98 lrw_done(&lrw);
103 lrw_done(&lrw);
108 if ((err = lrw_setiv(tests[x].IV, 16, &lrw)) != CRYPT_OK) {
    [all...]
  /external/dropbear/libtomcrypt/
Android.mk 65 src/modes/lrw/lrw_decrypt.c src/modes/lrw/lrw_done.c src/modes/lrw/lrw_encrypt.c \
66 src/modes/lrw/lrw_getiv.c src/modes/lrw/lrw_process.c src/modes/lrw/lrw_setiv.c \
67 src/modes/lrw/lrw_start.c src/modes/lrw/lrw_test.c src/modes/ofb/ofb_decrypt.c src/modes/ofb/ofb_done.c \
crypt.tex     [all...]
  /external/dropbear/libtomcrypt/src/headers/
tomcrypt_cipher.h 273 /** A LRW structure */
419 /** Accelerated LRW
424 @param tweak The LRW tweak
430 /** Accelerated LRW
435 @param tweak The LRW tweak
802 symmetric_LRW *lrw);
803 int lrw_encrypt(const unsigned char *pt, unsigned char *ct, unsigned long len, symmetric_LRW *lrw);
804 int lrw_decrypt(const unsigned char *ct, unsigned char *pt, unsigned long len, symmetric_LRW *lrw);
805 int lrw_getiv(unsigned char *IV, unsigned long *len, symmetric_LRW *lrw);
806 int lrw_setiv(const unsigned char *IV, unsigned long len, symmetric_LRW *lrw);
    [all...]
  /external/dropbear/libtomcrypt/demos/
tv_gen.c 705 symmetric_LRW lrw; local
714 if ((err = lrw_start(find_cipher("aes"), iv, key, 16, tweak, 0, &lrw)) != CRYPT_OK) {
715 fprintf(stderr, "Error starting LRW-AES: %s\n", error_to_string(err));
724 if ((err = lrw_encrypt(buf, buf, x, &lrw)) != CRYPT_OK) {
725 fprintf(stderr, "Error encrypting with LRW-AES: %s\n", error_to_string(err));
737 if ((err = lrw_setiv(iv, 16, &lrw)) != CRYPT_OK) {
749 if ((err = lrw_decrypt(buf, buf, x, &lrw)) != CRYPT_OK) {
750 fprintf(stderr, "Error decrypting with LRW-AES: %s\n", error_to_string(err));
760 lrw_done(&lrw);
780 printf("Generating LRW vectors..."); fflush(stdout); lrw_gen(); printf("done\n")
    [all...]
  /external/dropbear/libtomcrypt/testprof/
x86_prof.c 517 symmetric_LRW lrw; local
525 lrw_start(x, pt, key, cipher_descriptor[x].min_key_length, key, 0, &lrw);
533 #define DO1 lrw_encrypt(pt, pt, sizeof(pt), &lrw);
552 #define DO1 lrw_decrypt(pt, pt, sizeof(pt), &lrw);
569 lrw_done(&lrw);
586 int time_cipher4(void) { fprintf(stderr, "NO LRW\n"); return 0; }
    [all...]

Completed in 74 milliseconds