Commit c1e83849 authored by Niels Möller's avatar Niels Möller
Browse files

(CAMELLIA_F_HALF_INV): Deleted macro.

(camellia_set_encrypt_key): Deleted the CAMELLIA_F_HALF_INV
operations intended for moving the key xor into the middle of the
round.

Rev: nettle/camellia-set-encrypt-key.c:1.5
parent 6a9060e4
......@@ -74,14 +74,6 @@
(y) = ((uint64_t) __yl << 32) | __yr; \
} while (0)
#define CAMELLIA_F_HALF_INV(x) do { \
uint32_t __t, __w; \
__t = (x) >> 32; \
__w = __t ^(x); \
__w = ROL32(8, __w); \
(x) = ((uint64_t) __w << 32) | (__t ^ __w); \
} while (0)
void
camellia_set_encrypt_key(struct camellia_ctx *ctx,
unsigned length, const uint8_t *key)
......@@ -317,15 +309,4 @@ camellia_set_encrypt_key(struct camellia_ctx *ctx,
}
ctx->keys[i-2] = subkey[i-2];
ctx->keys[i-1] = subkey[i] ^ subkey[i-1];
for (i = 0; i < ctx->nkeys; i += 8)
{
/* apply the inverse of the last half of F-function */
CAMELLIA_F_HALF_INV(ctx->keys[i+1]);
CAMELLIA_F_HALF_INV(ctx->keys[i+2]);
CAMELLIA_F_HALF_INV(ctx->keys[i+3]);
CAMELLIA_F_HALF_INV(ctx->keys[i+4]);
CAMELLIA_F_HALF_INV(ctx->keys[i+5]);
CAMELLIA_F_HALF_INV(ctx->keys[i+6]);
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment