summaryrefslogtreecommitdiff
path: root/drivers/staging/skein/threefish256Block.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/skein/threefish256Block.c')
-rw-r--r--drivers/staging/skein/threefish256Block.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/drivers/staging/skein/threefish256Block.c b/drivers/staging/skein/threefish256Block.c
index ee21aef24573..1329c71697ed 100644
--- a/drivers/staging/skein/threefish256Block.c
+++ b/drivers/staging/skein/threefish256Block.c
@@ -2,16 +2,16 @@
#include <threefishApi.h>
-void threefish_encrypt_256(struct threefish_key *keyCtx, u64 *input,
+void threefish_encrypt_256(struct threefish_key *key_ctx, u64 *input,
u64 *output)
{
u64 b0 = input[0], b1 = input[1],
- b2 = input[2], b3 = input[3];
- u64 k0 = keyCtx->key[0], k1 = keyCtx->key[1],
- k2 = keyCtx->key[2], k3 = keyCtx->key[3],
- k4 = keyCtx->key[4];
- u64 t0 = keyCtx->tweak[0], t1 = keyCtx->tweak[1],
- t2 = keyCtx->tweak[2];
+ b2 = input[2], b3 = input[3];
+ u64 k0 = key_ctx->key[0], k1 = key_ctx->key[1],
+ k2 = key_ctx->key[2], k3 = key_ctx->key[3],
+ k4 = key_ctx->key[4];
+ u64 t0 = key_ctx->tweak[0], t1 = key_ctx->tweak[1],
+ t2 = key_ctx->tweak[2];
b1 += k1 + t0;
b0 += b1 + k0;
@@ -495,16 +495,16 @@ void threefish_encrypt_256(struct threefish_key *keyCtx, u64 *input,
output[3] = b3 + k1 + 18;
}
-void threefish_decrypt_256(struct threefish_key *keyCtx, u64 *input,
+void threefish_decrypt_256(struct threefish_key *key_ctx, u64 *input,
u64 *output)
{
u64 b0 = input[0], b1 = input[1],
- b2 = input[2], b3 = input[3];
- u64 k0 = keyCtx->key[0], k1 = keyCtx->key[1],
- k2 = keyCtx->key[2], k3 = keyCtx->key[3],
- k4 = keyCtx->key[4];
- u64 t0 = keyCtx->tweak[0], t1 = keyCtx->tweak[1],
- t2 = keyCtx->tweak[2];
+ b2 = input[2], b3 = input[3];
+ u64 k0 = key_ctx->key[0], k1 = key_ctx->key[1],
+ k2 = key_ctx->key[2], k3 = key_ctx->key[3],
+ k4 = key_ctx->key[4];
+ u64 t0 = key_ctx->tweak[0], t1 = key_ctx->tweak[1],
+ t2 = key_ctx->tweak[2];
u64 tmp;