Release 4.11 drivers/staging/skein/threefish_api.c
#include <linux/string.h>
#include "threefish_api.h"
void threefish_set_key(struct threefish_key *key_ctx,
enum threefish_size state_size,
u64 *key_data, u64 *tweak)
{
int key_words = state_size / 64;
int i;
u64 parity = KEY_SCHEDULE_CONST;
key_ctx->tweak[0] = tweak[0];
key_ctx->tweak[1] = tweak[1];
key_ctx->tweak[2] = tweak[0] ^ tweak[1];
for (i = 0; i < key_words; i++) {
key_ctx->key[i] = key_data[i];
parity ^= key_data[i];
}
key_ctx->key[i] = parity;
key_ctx->state_size = state_size;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Jason Cooper | 109 | 85.83% | 3 | 50.00% |
Anton Saraev | 18 | 14.17% | 3 | 50.00% |
Total | 127 | 100.00% | 6 | 100.00% |
void threefish_encrypt_block_bytes(struct threefish_key *key_ctx, u8 *in,
u8 *out)
{
u64 plain[SKEIN_MAX_STATE_WORDS]; /* max number of words*/
u64 cipher[SKEIN_MAX_STATE_WORDS];
skein_get64_lsb_first(plain, in, key_ctx->state_size / 64);
threefish_encrypt_block_words(key_ctx, plain, cipher);
skein_put64_lsb_first(out, cipher, key_ctx->state_size / 8);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Jason Cooper | 56 | 84.85% | 4 | 57.14% |
Anton Saraev | 10 | 15.15% | 3 | 42.86% |
Total | 66 | 100.00% | 7 | 100.00% |
void threefish_encrypt_block_words(struct threefish_key *key_ctx, u64 *in,
u64 *out)
{
switch (key_ctx->state_size) {
case THREEFISH_256:
threefish_encrypt_256(key_ctx, in, out);
break;
case THREEFISH_512:
threefish_encrypt_512(key_ctx, in, out);
break;
case THREEFISH_1024:
threefish_encrypt_1024(key_ctx, in, out);
break;
}
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Jason Cooper | 52 | 80.00% | 3 | 50.00% |
Anton Saraev | 13 | 20.00% | 3 | 50.00% |
Total | 65 | 100.00% | 6 | 100.00% |
void threefish_decrypt_block_bytes(struct threefish_key *key_ctx, u8 *in,
u8 *out)
{
u64 plain[SKEIN_MAX_STATE_WORDS]; /* max number of words*/
u64 cipher[SKEIN_MAX_STATE_WORDS];
skein_get64_lsb_first(cipher, in, key_ctx->state_size / 64);
threefish_decrypt_block_words(key_ctx, cipher, plain);
skein_put64_lsb_first(out, plain, key_ctx->state_size / 8);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Jason Cooper | 56 | 84.85% | 4 | 57.14% |
Anton Saraev | 10 | 15.15% | 3 | 42.86% |
Total | 66 | 100.00% | 7 | 100.00% |
void threefish_decrypt_block_words(struct threefish_key *key_ctx, u64 *in,
u64 *out)
{
switch (key_ctx->state_size) {
case THREEFISH_256:
threefish_decrypt_256(key_ctx, in, out);
break;
case THREEFISH_512:
threefish_decrypt_512(key_ctx, in, out);
break;
case THREEFISH_1024:
threefish_decrypt_1024(key_ctx, in, out);
break;
}
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Jason Cooper | 52 | 80.00% | 3 | 50.00% |
Anton Saraev | 13 | 20.00% | 3 | 50.00% |
Total | 65 | 100.00% | 6 | 100.00% |
Overall Contributors
Person | Tokens | Prop | Commits | CommitProp |
Jason Cooper | 330 | 83.54% | 5 | 50.00% |
Anton Saraev | 64 | 16.20% | 4 | 40.00% |
Jake Edge | 1 | 0.25% | 1 | 10.00% |
Total | 395 | 100.00% | 10 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.