Home
last modified time | relevance | path

Searched refs:skey (Results 1 – 25 of 36) sorted by relevance

12

/external/dropbear/libtomcrypt/src/ciphers/safer/
Dsaferp.c48 b[0] = (safer_ebox[(b[0] ^ skey->saferp.K[i][0]) & 255] + skey->saferp.K[i+1][0]) & 255; \
49 b[1] = safer_lbox[(b[1] + skey->saferp.K[i][1]) & 255] ^ skey->saferp.K[i+1][1]; \
50 b[2] = safer_lbox[(b[2] + skey->saferp.K[i][2]) & 255] ^ skey->saferp.K[i+1][2]; \
51 b[3] = (safer_ebox[(b[3] ^ skey->saferp.K[i][3]) & 255] + skey->saferp.K[i+1][3]) & 255; \
52 b[4] = (safer_ebox[(b[4] ^ skey->saferp.K[i][4]) & 255] + skey->saferp.K[i+1][4]) & 255; \
53 b[5] = safer_lbox[(b[5] + skey->saferp.K[i][5]) & 255] ^ skey->saferp.K[i+1][5]; \
54 b[6] = safer_lbox[(b[6] + skey->saferp.K[i][6]) & 255] ^ skey->saferp.K[i+1][6]; \
55 b[7] = (safer_ebox[(b[7] ^ skey->saferp.K[i][7]) & 255] + skey->saferp.K[i+1][7]) & 255; \
56 b[8] = (safer_ebox[(b[8] ^ skey->saferp.K[i][8]) & 255] + skey->saferp.K[i+1][8]) & 255; \
57 b[9] = safer_lbox[(b[9] + skey->saferp.K[i][9]) & 255] ^ skey->saferp.K[i+1][9]; \
[all …]
Dsafer.c180 int safer_k64_setup(const unsigned char *key, int keylen, int numrounds, symmetric_key *skey) in safer_k64_setup() argument
183 LTC_ARGCHK(skey != NULL); in safer_k64_setup()
193 …, key, (unsigned int)(numrounds != 0 ?numrounds:SAFER_K64_DEFAULT_NOF_ROUNDS), 0, skey->safer.key); in safer_k64_setup()
197 int safer_sk64_setup(const unsigned char *key, int keylen, int numrounds, symmetric_key *skey) in safer_sk64_setup() argument
200 LTC_ARGCHK(skey != NULL); in safer_sk64_setup()
210 … key, (unsigned int)(numrounds != 0 ?numrounds:SAFER_SK64_DEFAULT_NOF_ROUNDS), 1, skey->safer.key); in safer_sk64_setup()
214 int safer_k128_setup(const unsigned char *key, int keylen, int numrounds, symmetric_key *skey) in safer_k128_setup() argument
217 LTC_ARGCHK(skey != NULL); in safer_k128_setup()
227 …ey+8, (unsigned int)(numrounds != 0 ?numrounds:SAFER_K128_DEFAULT_NOF_ROUNDS), 0, skey->safer.key); in safer_k128_setup()
231 int safer_sk128_setup(const unsigned char *key, int keylen, int numrounds, symmetric_key *skey) in safer_sk128_setup() argument
[all …]
/external/dropbear/libtomcrypt/src/ciphers/
Dcast5.c409 static int _cast5_setup(const unsigned char *key, int keylen, int num_rounds, symmetric_key *skey) in _cast5_setup() argument
411 int cast5_setup(const unsigned char *key, int keylen, int num_rounds, symmetric_key *skey) in _cast5_setup()
419 LTC_ARGCHK(skey != NULL); in _cast5_setup()
447skey->cast5.K[i++] = S5[GB(z, 0x8)] ^ S6[GB(z, 0x9)] ^ S7[GB(z, 0x7)] ^ S8[GB(z, 0x6)] ^ S5[GB(z, … in _cast5_setup()
448skey->cast5.K[i++] = S5[GB(z, 0xA)] ^ S6[GB(z, 0xB)] ^ S7[GB(z, 0x5)] ^ S8[GB(z, 0x4)] ^ S6[GB(z, … in _cast5_setup()
449skey->cast5.K[i++] = S5[GB(z, 0xC)] ^ S6[GB(z, 0xd)] ^ S7[GB(z, 0x3)] ^ S8[GB(z, 0x2)] ^ S7[GB(z, … in _cast5_setup()
450skey->cast5.K[i++] = S5[GB(z, 0xE)] ^ S6[GB(z, 0xF)] ^ S7[GB(z, 0x1)] ^ S8[GB(z, 0x0)] ^ S8[GB(z, … in _cast5_setup()
456skey->cast5.K[i++] = S5[GB(x, 0x3)] ^ S6[GB(x, 0x2)] ^ S7[GB(x, 0xc)] ^ S8[GB(x, 0xd)] ^ S5[GB(x, … in _cast5_setup()
457skey->cast5.K[i++] = S5[GB(x, 0x1)] ^ S6[GB(x, 0x0)] ^ S7[GB(x, 0xe)] ^ S8[GB(x, 0xf)] ^ S6[GB(x, … in _cast5_setup()
458skey->cast5.K[i++] = S5[GB(x, 0x7)] ^ S6[GB(x, 0x6)] ^ S7[GB(x, 0x8)] ^ S8[GB(x, 0x9)] ^ S7[GB(x, … in _cast5_setup()
[all …]
Dblowfish.c309 symmetric_key *skey) in blowfish_setup() argument
315 LTC_ARGCHK(skey != NULL); in blowfish_setup()
336 skey->blowfish.K[x] = ORIG_P[x] ^ A; in blowfish_setup()
342 skey->blowfish.S[x][y] = ORIG_S[x][y]; in blowfish_setup()
353 blowfish_ecb_encrypt(B, B, skey); in blowfish_setup()
355 LOAD32H(skey->blowfish.K[x], &B[0]); in blowfish_setup()
356 LOAD32H(skey->blowfish.K[x+1], &B[4]); in blowfish_setup()
363 blowfish_ecb_encrypt(B, B, skey); in blowfish_setup()
365 LOAD32H(skey->blowfish.S[x][y], &B[0]); in blowfish_setup()
366 LOAD32H(skey->blowfish.S[x][y+1], &B[4]); in blowfish_setup()
[all …]
Dxtea.c34 int xtea_setup(const unsigned char *key, int keylen, int num_rounds, symmetric_key *skey) in xtea_setup() argument
39 LTC_ARGCHK(skey != NULL); in xtea_setup()
57 skey->xtea.A[x] = (sum + K[sum&3]) & 0xFFFFFFFFUL; in xtea_setup()
59 skey->xtea.B[x] = (sum + K[(sum>>11)&3]) & 0xFFFFFFFFUL; in xtea_setup()
76 int xtea_ecb_encrypt(const unsigned char *pt, unsigned char *ct, symmetric_key *skey) in xtea_ecb_encrypt() argument
83 LTC_ARGCHK(skey != NULL); in xtea_ecb_encrypt()
88 y = (y + ((((z<<4)^(z>>5)) + z) ^ skey->xtea.A[r])) & 0xFFFFFFFFUL; in xtea_ecb_encrypt()
89 z = (z + ((((y<<4)^(y>>5)) + y) ^ skey->xtea.B[r])) & 0xFFFFFFFFUL; in xtea_ecb_encrypt()
91 y = (y + ((((z<<4)^(z>>5)) + z) ^ skey->xtea.A[r+1])) & 0xFFFFFFFFUL; in xtea_ecb_encrypt()
92 z = (z + ((((y<<4)^(y>>5)) + y) ^ skey->xtea.B[r+1])) & 0xFFFFFFFFUL; in xtea_ecb_encrypt()
[all …]
Drc5.c54 static int _rc5_setup(const unsigned char *key, int keylen, int num_rounds, symmetric_key *skey) in _rc5_setup() argument
56 int rc5_setup(const unsigned char *key, int keylen, int num_rounds, symmetric_key *skey) in _rc5_setup()
61 LTC_ARGCHK(skey != NULL); in _rc5_setup()
78 skey->rc5.rounds = num_rounds; in _rc5_setup()
79 S = skey->rc5.K; in _rc5_setup()
112 int rc5_setup(const unsigned char *key, int keylen, int num_rounds, symmetric_key *skey) in rc5_setup() argument
115 x = _rc5_setup(key, keylen, num_rounds, skey); in rc5_setup()
129 static int _rc5_ecb_encrypt(const unsigned char *pt, unsigned char *ct, symmetric_key *skey) in _rc5_ecb_encrypt() argument
131 int rc5_ecb_encrypt(const unsigned char *pt, unsigned char *ct, symmetric_key *skey) in _rc5_ecb_encrypt()
136 LTC_ARGCHK(skey != NULL); in _rc5_ecb_encrypt()
[all …]
Danubis.c895 static int _anubis_setup(const unsigned char *key, int keylen, int num_rounds, symmetric_key *skey) in _anubis_setup() argument
897 int anubis_setup(const unsigned char *key, int keylen, int num_rounds, symmetric_key *skey) in _anubis_setup()
906 LTC_ARGCHK(skey != NULL); in _anubis_setup()
912 skey->anubis.keyBits = keylen*8; in _anubis_setup()
918 N = skey->anubis.keyBits >> 5; in _anubis_setup()
923 skey->anubis.R = R = 8 + N; in _anubis_setup()
925 if (num_rounds != 0 && num_rounds != skey->anubis.R) { in _anubis_setup()
983 skey->anubis.roundKeyEnc[r][0] = K0; in _anubis_setup()
984 skey->anubis.roundKeyEnc[r][1] = K1; in _anubis_setup()
985 skey->anubis.roundKeyEnc[r][2] = K2; in _anubis_setup()
[all …]
Dnoekeon.c75 int noekeon_setup(const unsigned char *key, int keylen, int num_rounds, symmetric_key *skey) in noekeon_setup() argument
80 LTC_ARGCHK(skey != NULL); in noekeon_setup()
90 LOAD32H(skey->noekeon.K[0],&key[0]); in noekeon_setup()
91 LOAD32H(skey->noekeon.K[1],&key[4]); in noekeon_setup()
92 LOAD32H(skey->noekeon.K[2],&key[8]); in noekeon_setup()
93 LOAD32H(skey->noekeon.K[3],&key[12]); in noekeon_setup()
95 LOAD32H(skey->noekeon.dK[0],&key[0]); in noekeon_setup()
96 LOAD32H(skey->noekeon.dK[1],&key[4]); in noekeon_setup()
97 LOAD32H(skey->noekeon.dK[2],&key[8]); in noekeon_setup()
98 LOAD32H(skey->noekeon.dK[3],&key[12]); in noekeon_setup()
[all …]
Drc6.c51 static int _rc6_setup(const unsigned char *key, int keylen, int num_rounds, symmetric_key *skey) in _rc6_setup() argument
53 int rc6_setup(const unsigned char *key, int keylen, int num_rounds, symmetric_key *skey) in _rc6_setup()
59 LTC_ARGCHK(skey != NULL); in _rc6_setup()
101 skey->rc6.K[i] = S[i]; in _rc6_setup()
107 int rc6_setup(const unsigned char *key, int keylen, int num_rounds, symmetric_key *skey) in rc6_setup() argument
110 x = _rc6_setup(key, keylen, num_rounds, skey); in rc6_setup()
123 static int _rc6_ecb_encrypt(const unsigned char *pt, unsigned char *ct, symmetric_key *skey) in _rc6_ecb_encrypt() argument
125 int rc6_ecb_encrypt(const unsigned char *pt, unsigned char *ct, symmetric_key *skey) in _rc6_ecb_encrypt()
131 LTC_ARGCHK(skey != NULL); in _rc6_ecb_encrypt()
136 b += skey->rc6.K[0]; in _rc6_ecb_encrypt()
[all …]
Dkasumi.c141 int kasumi_ecb_encrypt(const unsigned char *pt, unsigned char *ct, symmetric_key *skey) in kasumi_ecb_encrypt() argument
148 LTC_ARGCHK(skey != NULL); in kasumi_ecb_encrypt()
154 temp = FL(left, n, skey); in kasumi_ecb_encrypt()
155 temp = FO(temp, n++, skey); in kasumi_ecb_encrypt()
157 temp = FO(right, n, skey); in kasumi_ecb_encrypt()
158 temp = FL(temp, n++, skey); in kasumi_ecb_encrypt()
168 int kasumi_ecb_decrypt(const unsigned char *ct, unsigned char *pt, symmetric_key *skey) in kasumi_ecb_decrypt() argument
175 LTC_ARGCHK(skey != NULL); in kasumi_ecb_decrypt()
181 temp = FO(right, n, skey); in kasumi_ecb_decrypt()
182 temp = FL(temp, n--, skey); in kasumi_ecb_decrypt()
[all …]
Drc2.c70 int rc2_setup(const unsigned char *key, int keylen, int num_rounds, symmetric_key *skey) in rc2_setup() argument
72 unsigned *xkey = skey->rc2.xkey; in rc2_setup()
78 LTC_ARGCHK(skey != NULL); in rc2_setup()
133 symmetric_key *skey) in _rc2_ecb_encrypt() argument
137 symmetric_key *skey) in _rc2_ecb_encrypt()
145 LTC_ARGCHK(skey != NULL); in _rc2_ecb_encrypt()
147 xkey = skey->rc2.xkey; in _rc2_ecb_encrypt()
190 symmetric_key *skey) in rc2_ecb_encrypt() argument
192 int err = _rc2_ecb_encrypt(pt, ct, skey); in rc2_ecb_encrypt()
211 symmetric_key *skey) in _rc2_ecb_decrypt() argument
[all …]
Dkseed.c202 int kseed_setup(const unsigned char *key, int keylen, int num_rounds, symmetric_key *skey) in kseed_setup() argument
222 skey->kseed.K[2*i+0] = G(k1 + k3 - KCi[i]); in kseed_setup()
223 skey->kseed.K[2*i+1] = G(k2 - k4 + KCi[i]); in kseed_setup()
234 skey->kseed.dK[2*(15-i)+0] = skey->kseed.K[2*i+0]; in kseed_setup()
235 skey->kseed.dK[2*(15-i)+1] = skey->kseed.K[2*i+1]; in kseed_setup()
259 int kseed_ecb_encrypt(const unsigned char *pt, unsigned char *ct, symmetric_key *skey) in kseed_ecb_encrypt() argument
266 rounds(P, skey->kseed.K); in kseed_ecb_encrypt()
281 int kseed_ecb_decrypt(const unsigned char *ct, unsigned char *pt, symmetric_key *skey) in kseed_ecb_decrypt() argument
288 rounds(P, skey->kseed.dK); in kseed_ecb_decrypt()
299 void kseed_done(symmetric_key *skey) in kseed_done() argument
[all …]
Dskipjack.c67 int skipjack_setup(const unsigned char *key, int keylen, int num_rounds, symmetric_key *skey) in skipjack_setup() argument
72 LTC_ARGCHK(skey != NULL); in skipjack_setup()
84 skey->skipjack.key[x] = key[x] & 255; in skipjack_setup()
91 tmp = g_func(w1, &kp, skey->skipjack.key); \
97 tmp = g_func(w1, &kp, skey->skipjack.key); \
104 w1 = ig_func(w2, &kp, skey->skipjack.key); \
108 tmp = ig_func(w2, &kp, skey->skipjack.key); \
144 static int _skipjack_ecb_encrypt(const unsigned char *pt, unsigned char *ct, symmetric_key *skey) in _skipjack_ecb_encrypt() argument
146 int skipjack_ecb_encrypt(const unsigned char *pt, unsigned char *ct, symmetric_key *skey) in _skipjack_ecb_encrypt()
154 LTC_ARGCHK(skey != NULL); in _skipjack_ecb_encrypt()
[all …]
/external/dropbear/libtomcrypt/src/headers/
Dtomcrypt_cipher.h338 int (*setup)(const unsigned char *key, int keylen, int num_rounds, symmetric_key *skey);
345 int (*ecb_encrypt)(const unsigned char *pt, unsigned char *ct, symmetric_key *skey);
352 int (*ecb_decrypt)(const unsigned char *ct, unsigned char *pt, symmetric_key *skey);
361 void (*done)(symmetric_key *skey);
377 …cb_encrypt)(const unsigned char *pt, unsigned char *ct, unsigned long blocks, symmetric_key *skey);
386 …cb_decrypt)(const unsigned char *ct, unsigned char *pt, unsigned long blocks, symmetric_key *skey);
396 …nsigned char *pt, unsigned char *ct, unsigned long blocks, unsigned char *IV, symmetric_key *skey);
406 …nsigned char *ct, unsigned char *pt, unsigned long blocks, unsigned char *IV, symmetric_key *skey);
417 …ar *pt, unsigned char *ct, unsigned long blocks, unsigned char *IV, int mode, symmetric_key *skey);
428 …har *ct, unsigned long blocks, unsigned char *IV, const unsigned char *tweak, symmetric_key *skey);
[all …]
/external/dropbear/libtomcrypt/src/ciphers/twofish/
Dtwofish.c280 #define S1 skey->twofish.S[0]
281 #define S2 skey->twofish.S[1]
282 #define S3 skey->twofish.S[2]
283 #define S4 skey->twofish.S[3]
346 static int _twofish_setup(const unsigned char *key, int keylen, int num_rounds, symmetric_key *skey) in _twofish_setup() argument
348 int twofish_setup(const unsigned char *key, int keylen, int num_rounds, symmetric_key *skey) in _twofish_setup()
359 LTC_ARGCHK(skey != NULL); in _twofish_setup()
385 rs_mult(M+(x*8), skey->twofish.S+(x*4)); in _twofish_setup()
407 skey->twofish.K[x+x] = (A + B) & 0xFFFFFFFFUL; in _twofish_setup()
410 skey->twofish.K[x+x+1] = ROLc(B + B + A, 9); in _twofish_setup()
[all …]
/external/dropbear/libtomcrypt/notes/etc/
Dsaferp_optimizer.c21 b[0] = (safer_ebox[(b[0] ^ skey->saferp.K[i][0]) & 255] + skey->saferp.K[i+1][0]) & 255; \
22 b[1] = safer_lbox[(b[1] + skey->saferp.K[i][1]) & 255] ^ skey->saferp.K[i+1][1]; \
23 b[2] = safer_lbox[(b[2] + skey->saferp.K[i][2]) & 255] ^ skey->saferp.K[i+1][2]; \
24 b[3] = (safer_ebox[(b[3] ^ skey->saferp.K[i][3]) & 255] + skey->saferp.K[i+1][3]) & 255; \
25 b[4] = (safer_ebox[(b[4] ^ skey->saferp.K[i][4]) & 255] + skey->saferp.K[i+1][4]) & 255; \
26 b[5] = safer_lbox[(b[5] + skey->saferp.K[i][5]) & 255] ^ skey->saferp.K[i+1][5]; \
27 b[6] = safer_lbox[(b[6] + skey->saferp.K[i][6]) & 255] ^ skey->saferp.K[i+1][6]; \
28 b[7] = (safer_ebox[(b[7] ^ skey->saferp.K[i][7]) & 255] + skey->saferp.K[i+1][7]) & 255; \
29 b[8] = (safer_ebox[(b[8] ^ skey->saferp.K[i][8]) & 255] + skey->saferp.K[i+1][8]) & 255; \
30 b[9] = safer_lbox[(b[9] + skey->saferp.K[i][9]) & 255] ^ skey->saferp.K[i+1][9]; \
[all …]
/external/dropbear/libtomcrypt/src/encauth/ccm/
Dccm_memory.c49 symmetric_key *skey; in ccm_memory() local
127 skey = XMALLOC(sizeof(*skey)); in ccm_memory()
128 if (skey == NULL) { in ccm_memory()
133 if ((err = cipher_descriptor[cipher].setup(key, keylen, 0, skey)) != CRYPT_OK) { in ccm_memory()
134 XFREE(skey); in ccm_memory()
138 skey = uskey; in ccm_memory()
170 if ((err = cipher_descriptor[cipher].ecb_encrypt(PAD, PAD, skey)) != CRYPT_OK) { in ccm_memory()
195 if ((err = cipher_descriptor[cipher].ecb_encrypt(PAD, PAD, skey)) != CRYPT_OK) { in ccm_memory()
205 if ((err = cipher_descriptor[cipher].ecb_encrypt(PAD, PAD, skey)) != CRYPT_OK) { in ccm_memory()
241 if ((err = cipher_descriptor[cipher].ecb_encrypt(ctr, CTRPAD, skey)) != CRYPT_OK) { in ccm_memory()
[all …]
/external/dropbear/libtomcrypt/src/mac/xcbc/
Dxcbc_init.c30 symmetric_key *skey; in xcbc_init() local
47 skey = XCALLOC(1, sizeof(*skey)); in xcbc_init()
48 if (skey == NULL) { in xcbc_init()
52 if ((err = cipher_descriptor[cipher].setup(key, keylen, 0, skey)) != CRYPT_OK) { in xcbc_init()
61 cipher_descriptor[cipher].ecb_encrypt(xcbc->K[y], xcbc->K[y], skey); in xcbc_init()
73 cipher_descriptor[cipher].done(skey); in xcbc_init()
75 zeromem(skey, sizeof(*skey)); in xcbc_init()
77 XFREE(skey); in xcbc_init()
/external/dropbear/libtomcrypt/src/pk/ecc/
Decc_encrypt_key.c43 unsigned char *pub_expt, *ecc_shared, *skey; in ecc_encrypt_key() local
73 skey = XMALLOC(MAXBLOCKSIZE); in ecc_encrypt_key()
74 if (pub_expt == NULL || ecc_shared == NULL || skey == NULL) { in ecc_encrypt_key()
81 if (skey != NULL) { in ecc_encrypt_key()
82 XFREE(skey); in ecc_encrypt_key()
102 if ((err = hash_memory(hash, ecc_shared, x, skey, &y)) != CRYPT_OK) { in ecc_encrypt_key()
108 skey[x] ^= in[x]; in ecc_encrypt_key()
114 … LTC_ASN1_OCTET_STRING, inlen, skey, in ecc_encrypt_key()
122 zeromem(skey, MAXBLOCKSIZE); in ecc_encrypt_key()
125 XFREE(skey); in ecc_encrypt_key()
Decc_decrypt_key.c39 unsigned char *ecc_shared, *skey, *pub_expt; in ecc_decrypt_key() local
72 skey = XMALLOC(MAXBLOCKSIZE); in ecc_decrypt_key()
73 if (pub_expt == NULL || ecc_shared == NULL || skey == NULL) { in ecc_decrypt_key()
80 if (skey != NULL) { in ecc_decrypt_key()
81 XFREE(skey); in ecc_decrypt_key()
86 LTC_SET_ASN1(decode, 2, LTC_ASN1_OCTET_STRING, skey, MAXBLOCKSIZE); in ecc_decrypt_key()
126 out[x] = skey[x] ^ ecc_shared[x]; in ecc_decrypt_key()
135 zeromem(skey, MAXBLOCKSIZE); in ecc_decrypt_key()
140 XFREE(skey); in ecc_decrypt_key()
/external/dropbear/libtomcrypt/src/pk/dsa/
Ddsa_encrypt_key.c37 unsigned char *expt, *skey; in dsa_encrypt_key() local
66 skey = XMALLOC(MAXBLOCKSIZE); in dsa_encrypt_key()
67 if (expt == NULL || skey == NULL) { in dsa_encrypt_key()
71 if (skey != NULL) { in dsa_encrypt_key()
72 XFREE(skey); in dsa_encrypt_key()
102 if ((err = hash_memory(hash, expt, x, skey, &y)) != CRYPT_OK) { in dsa_encrypt_key()
108 skey[x] ^= in[x]; in dsa_encrypt_key()
114 … LTC_ASN1_OCTET_STRING, inlen, skey, in dsa_encrypt_key()
121 zeromem(skey, MAXBLOCKSIZE); in dsa_encrypt_key()
124 XFREE(skey); in dsa_encrypt_key()
Ddsa_decrypt_key.c33 unsigned char *skey, *expt; in dsa_decrypt_key() local
69 skey = XMALLOC(MAXBLOCKSIZE); in dsa_decrypt_key()
70 if (expt == NULL || skey == NULL) { in dsa_decrypt_key()
74 if (skey != NULL) { in dsa_decrypt_key()
75 XFREE(skey); in dsa_decrypt_key()
82 LTC_SET_ASN1(decode, 2, LTC_ASN1_OCTET_STRING, skey, MAXBLOCKSIZE); in dsa_decrypt_key()
115 out[x] = expt[x] ^ skey[x]; in dsa_decrypt_key()
123 zeromem(skey, MAXBLOCKSIZE); in dsa_decrypt_key()
127 XFREE(skey); in dsa_decrypt_key()
/external/wpa_supplicant/
Dcrypto_libtomcrypt.c48 symmetric_key skey; in des_encrypt() local
59 des_setup(pkey, 8, 0, &skey); in des_encrypt()
60 des_ecb_encrypt(clear, cypher, &skey); in des_encrypt()
61 des_done(&skey); in des_encrypt()
92 symmetric_key *skey; in aes_encrypt_init() local
93 skey = os_malloc(sizeof(*skey)); in aes_encrypt_init()
94 if (skey == NULL) in aes_encrypt_init()
96 if (aes_setup(key, len, 0, skey) != CRYPT_OK) { in aes_encrypt_init()
97 os_free(skey); in aes_encrypt_init()
100 return skey; in aes_encrypt_init()
[all …]
/external/dropbear/libtomcrypt/src/ciphers/aes/
Daes.c123 int SETUP(const unsigned char *key, int keylen, int num_rounds, symmetric_key *skey) in SETUP() argument
131 LTC_ARGCHK(skey != NULL); in SETUP()
141 skey->rijndael.Nr = 10 + ((keylen/8)-2)*2; in SETUP()
145 rk = skey->rijndael.eK; in SETUP()
169 temp = skey->rijndael.eK[rk - skey->rijndael.eK + 5]; in SETUP()
192 temp = skey->rijndael.eK[rk - skey->rijndael.eK + 7]; in SETUP()
217 rk = skey->rijndael.dK; in SETUP()
218 rrk = skey->rijndael.eK + j - 4; in SETUP()
228 for (i = 1; i < skey->rijndael.Nr; i++) { in SETUP()
289 static int _rijndael_ecb_encrypt(const unsigned char *pt, unsigned char *ct, symmetric_key *skey) in _rijndael_ecb_encrypt() argument
[all …]
/external/libxml2/
Ddict.c772 unsigned long skey; in xmlDictLookup() local
779 skey = xmlDictComputeKey(dict->subdict, name, len); in xmlDictLookup()
781 skey = okey; in xmlDictLookup()
783 key = skey % dict->subdict->size; in xmlDictLookup()
790 if ((tmp->okey == skey) && (tmp->len == len)) { in xmlDictLookup()
795 if ((tmp->okey == skey) && (tmp->len == len) && in xmlDictLookup()
802 if ((tmp->okey == skey) && (tmp->len == len)) { in xmlDictLookup()
807 if ((tmp->okey == skey) && (tmp->len == len) && in xmlDictLookup()
903 unsigned long skey; in xmlDictExists() local
910 skey = xmlDictComputeKey(dict->subdict, name, len); in xmlDictExists()
[all …]

12