summaryrefslogtreecommitdiffstats
path: root/include/crypto/speck.h
blob: 73cfc952d4055bb3d4aefdc51d482dc148e713cc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
// SPDX-License-Identifier: GPL-2.0
/*
 * Common values for the Speck algorithm
 */

#ifndef _CRYPTO_SPECK_H
#define _CRYPTO_SPECK_H

#include <linux/types.h>

/* Speck128 */

#define SPECK128_BLOCK_SIZE	16

#define SPECK128_128_KEY_SIZE	16
#define SPECK128_128_NROUNDS	32

#define SPECK128_192_KEY_SIZE	24
#define SPECK128_192_NROUNDS	33

#define SPECK128_256_KEY_SIZE	32
#define SPECK128_256_NROUNDS	34

struct speck128_tfm_ctx {
	u64 round_keys[SPECK128_256_NROUNDS];
	int nrounds;
};

void crypto_speck128_encrypt(const struct speck128_tfm_ctx *ctx,
			     u8 *out, const u8 *in);

void crypto_speck128_decrypt(const struct speck128_tfm_ctx *ctx,
			     u8 *out, const u8 *in);

int crypto_speck128_setkey(struct speck128_tfm_ctx *ctx, const u8 *key,
			   unsigned int keysize);

/* Speck64 */

#define SPECK64_BLOCK_SIZE	8

#define SPECK64_96_KEY_SIZE	12
#define SPECK64_96_NROUNDS	26

#define SPECK64_128_KEY_SIZE	16
#define SPECK64_128_NROUNDS	27

struct speck64_tfm_ctx {
	u32 round_keys[SPECK64_128_NROUNDS];
	int nrounds;
};

void crypto_speck64_encrypt(const struct speck64_tfm_ctx *ctx,
			    u8 *out, const u8 *in);

void crypto_speck64_decrypt(const struct speck64_tfm_ctx *ctx,
			    u8 *out, const u8 *in);

int crypto_speck64_setkey(struct speck64_tfm_ctx *ctx, const u8 *key,
			  unsigned int keysize);

#endif /* _CRYPTO_SPECK_H */
it/commit/block/blk-mq.c?id=bd166ef183c263c5ced656d49ef19c7da4adc774'>bd166ef183c2 ^
c1c80384c8f4 ^
320ae51feed5 ^
ea435e1b9392 ^
34dbad5d26e2 ^


720b8ccc4500 ^



99c749a4c4f4 ^
720b8ccc4500 ^











320ae51feed5 ^


79f720a751ca ^
320ae51feed5 ^
79f720a751ca ^

bd166ef183c2 ^
1429d7c9467e ^

320ae51feed5 ^





88459642cba4 ^

1429d7c9467e ^




88459642cba4 ^
320ae51feed5 ^

f299b7c7a9de ^










6131837b1de6 ^








f299b7c7a9de ^






b8d62b3a9c25 ^
f299b7c7a9de ^


bf0ddaba65dd ^


















1671d522cdd9 ^
43a5e4e21964 ^
4ecd4fef3a07 ^
cddd5d17642c ^
4ecd4fef3a07 ^

3ef28e83ab15 ^