Searched refs:key_ctx (Results 1 - 3 of 3) sorted by relevance

/linux-4.1.27/drivers/staging/skein/
H A Dthreefish_api.c4 void threefish_set_key(struct threefish_key *key_ctx, threefish_set_key() argument
12 key_ctx->tweak[0] = tweak[0]; threefish_set_key()
13 key_ctx->tweak[1] = tweak[1]; threefish_set_key()
14 key_ctx->tweak[2] = tweak[0] ^ tweak[1]; threefish_set_key()
17 key_ctx->key[i] = key_data[i]; threefish_set_key()
20 key_ctx->key[i] = parity; threefish_set_key()
21 key_ctx->state_size = state_size; threefish_set_key()
24 void threefish_encrypt_block_bytes(struct threefish_key *key_ctx, u8 *in, threefish_encrypt_block_bytes() argument
30 skein_get64_lsb_first(plain, in, key_ctx->state_size / 64); threefish_encrypt_block_bytes()
31 threefish_encrypt_block_words(key_ctx, plain, cipher); threefish_encrypt_block_bytes()
32 skein_put64_lsb_first(out, cipher, key_ctx->state_size / 8); threefish_encrypt_block_bytes()
35 void threefish_encrypt_block_words(struct threefish_key *key_ctx, u64 *in, threefish_encrypt_block_words() argument
38 switch (key_ctx->state_size) { threefish_encrypt_block_words()
40 threefish_encrypt_256(key_ctx, in, out); threefish_encrypt_block_words()
43 threefish_encrypt_512(key_ctx, in, out); threefish_encrypt_block_words()
46 threefish_encrypt_1024(key_ctx, in, out); threefish_encrypt_block_words()
51 void threefish_decrypt_block_bytes(struct threefish_key *key_ctx, u8 *in, threefish_decrypt_block_bytes() argument
57 skein_get64_lsb_first(cipher, in, key_ctx->state_size / 64); threefish_decrypt_block_bytes()
58 threefish_decrypt_block_words(key_ctx, cipher, plain); threefish_decrypt_block_bytes()
59 skein_put64_lsb_first(out, plain, key_ctx->state_size / 8); threefish_decrypt_block_bytes()
62 void threefish_decrypt_block_words(struct threefish_key *key_ctx, u64 *in, threefish_decrypt_block_words() argument
65 switch (key_ctx->state_size) { threefish_decrypt_block_words()
67 threefish_decrypt_256(key_ctx, in, out); threefish_decrypt_block_words()
70 threefish_decrypt_512(key_ctx, in, out); threefish_decrypt_block_words()
73 threefish_decrypt_1024(key_ctx, in, out); threefish_decrypt_block_words()
H A Dthreefish_api.h21 struct threefish_key key_ctx;
24 threefish_set_key(&key_ctx, THREEFISH_512, key, tweak);
27 threefish_encrypt_block_bytes(&key_ctx, input, cipher);
66 * @param key_ctx
75 void threefish_set_key(struct threefish_key *key_ctx,
87 * @param key_ctx
94 void threefish_encrypt_block_bytes(struct threefish_key *key_ctx, u8 *in,
107 * @param key_ctx
114 void threefish_encrypt_block_words(struct threefish_key *key_ctx, u64 *in,
125 * @param key_ctx
132 void threefish_decrypt_block_bytes(struct threefish_key *key_ctx, u8 *in,
145 * @param key_ctx
152 void threefish_decrypt_block_words(struct threefish_key *key_ctx, u64 *in,
155 void threefish_encrypt_256(struct threefish_key *key_ctx, u64 *input,
157 void threefish_encrypt_512(struct threefish_key *key_ctx, u64 *input,
159 void threefish_encrypt_1024(struct threefish_key *key_ctx, u64 *input,
161 void threefish_decrypt_256(struct threefish_key *key_ctx, u64 *input,
163 void threefish_decrypt_512(struct threefish_key *key_ctx, u64 *input,
165 void threefish_decrypt_1024(struct threefish_key *key_ctx, u64 *input,
H A Dthreefish_block.c3 void threefish_encrypt_256(struct threefish_key *key_ctx, u64 *input, threefish_encrypt_256() argument
8 u64 k0 = key_ctx->key[0], k1 = key_ctx->key[1], threefish_encrypt_256()
9 k2 = key_ctx->key[2], k3 = key_ctx->key[3], threefish_encrypt_256()
10 k4 = key_ctx->key[4]; threefish_encrypt_256()
11 u64 t0 = key_ctx->tweak[0], t1 = key_ctx->tweak[1], threefish_encrypt_256()
12 t2 = key_ctx->tweak[2]; threefish_encrypt_256()
496 void threefish_decrypt_256(struct threefish_key *key_ctx, u64 *input, threefish_decrypt_256() argument
501 u64 k0 = key_ctx->key[0], k1 = key_ctx->key[1], threefish_decrypt_256()
502 k2 = key_ctx->key[2], k3 = key_ctx->key[3], threefish_decrypt_256()
503 k4 = key_ctx->key[4]; threefish_decrypt_256()
504 u64 t0 = key_ctx->tweak[0], t1 = key_ctx->tweak[1], threefish_decrypt_256()
505 t2 = key_ctx->tweak[2]; threefish_decrypt_256()
1139 void threefish_encrypt_512(struct threefish_key *key_ctx, u64 *input, threefish_encrypt_512() argument
1146 u64 k0 = key_ctx->key[0], k1 = key_ctx->key[1], threefish_encrypt_512()
1147 k2 = key_ctx->key[2], k3 = key_ctx->key[3], threefish_encrypt_512()
1148 k4 = key_ctx->key[4], k5 = key_ctx->key[5], threefish_encrypt_512()
1149 k6 = key_ctx->key[6], k7 = key_ctx->key[7], threefish_encrypt_512()
1150 k8 = key_ctx->key[8]; threefish_encrypt_512()
1151 u64 t0 = key_ctx->tweak[0], t1 = key_ctx->tweak[1], threefish_encrypt_512()
1152 t2 = key_ctx->tweak[2]; threefish_encrypt_512()
2100 void threefish_decrypt_512(struct threefish_key *key_ctx, u64 *input, threefish_decrypt_512() argument
2107 u64 k0 = key_ctx->key[0], k1 = key_ctx->key[1], threefish_decrypt_512()
2108 k2 = key_ctx->key[2], k3 = key_ctx->key[3], threefish_decrypt_512()
2109 k4 = key_ctx->key[4], k5 = key_ctx->key[5], threefish_decrypt_512()
2110 k6 = key_ctx->key[6], k7 = key_ctx->key[7], threefish_decrypt_512()
2111 k8 = key_ctx->key[8]; threefish_decrypt_512()
2112 u64 t0 = key_ctx->tweak[0], t1 = key_ctx->tweak[1], threefish_decrypt_512()
2113 t2 = key_ctx->tweak[2]; threefish_decrypt_512()
3361 void threefish_encrypt_1024(struct threefish_key *key_ctx, u64 *input, threefish_encrypt_1024() argument
3372 u64 k0 = key_ctx->key[0], k1 = key_ctx->key[1], threefish_encrypt_1024()
3373 k2 = key_ctx->key[2], k3 = key_ctx->key[3], threefish_encrypt_1024()
3374 k4 = key_ctx->key[4], k5 = key_ctx->key[5], threefish_encrypt_1024()
3375 k6 = key_ctx->key[6], k7 = key_ctx->key[7], threefish_encrypt_1024()
3376 k8 = key_ctx->key[8], k9 = key_ctx->key[9], threefish_encrypt_1024()
3377 k10 = key_ctx->key[10], k11 = key_ctx->key[11], threefish_encrypt_1024()
3378 k12 = key_ctx->key[12], k13 = key_ctx->key[13], threefish_encrypt_1024()
3379 k14 = key_ctx->key[14], k15 = key_ctx->key[15], threefish_encrypt_1024()
3380 k16 = key_ctx->key[16]; threefish_encrypt_1024()
3381 u64 t0 = key_ctx->tweak[0], t1 = key_ctx->tweak[1], threefish_encrypt_1024()
3382 t2 = key_ctx->tweak[2]; threefish_encrypt_1024()
5482 void threefish_decrypt_1024(struct threefish_key *key_ctx, u64 *input, threefish_decrypt_1024() argument
5493 u64 k0 = key_ctx->key[0], k1 = key_ctx->key[1], threefish_decrypt_1024()
5494 k2 = key_ctx->key[2], k3 = key_ctx->key[3], threefish_decrypt_1024()
5495 k4 = key_ctx->key[4], k5 = key_ctx->key[5], threefish_decrypt_1024()
5496 k6 = key_ctx->key[6], k7 = key_ctx->key[7], threefish_decrypt_1024()
5497 k8 = key_ctx->key[8], k9 = key_ctx->key[9], threefish_decrypt_1024()
5498 k10 = key_ctx->key[10], k11 = key_ctx->key[11], threefish_decrypt_1024()
5499 k12 = key_ctx->key[12], k13 = key_ctx->key[13], threefish_decrypt_1024()
5500 k14 = key_ctx->key[14], k15 = key_ctx->key[15], threefish_decrypt_1024()
5501 k16 = key_ctx->key[16]; threefish_decrypt_1024()
5502 u64 t0 = key_ctx->tweak[0], t1 = key_ctx->tweak[1], threefish_decrypt_1024()
5503 t2 = key_ctx->tweak[2]; threefish_decrypt_1024()

Completed in 83 milliseconds