| /crypto/ |
| A D | tcrypt.h | 47 static u8 speed_template_8[] = {8, 0}; 48 static u8 speed_template_16[] = {16, 0}; 49 static u8 speed_template_24[] = {24, 0}; 50 static u8 speed_template_8_16[] = {8, 16, 0}; 51 static u8 speed_template_8_32[] = {8, 32, 0}; 52 static u8 speed_template_16_32[] = {16, 32, 0}; 56 static u8 speed_template_32_48[] = {32, 48, 0}; 58 static u8 speed_template_32_64[] = {32, 64, 0}; 59 static u8 speed_template_32[] = {32, 0}; 64 static u8 aead_speed_template_19[] = {19, 0}; [all …]
|
| A D | cipher.c | 20 static int setkey_unaligned(struct crypto_cipher *tfm, const u8 *key, in setkey_unaligned() 26 u8 *buffer, *alignbuffer; in setkey_unaligned() 34 alignbuffer = (u8 *)ALIGN((unsigned long)buffer, alignmask + 1); in setkey_unaligned() 43 const u8 *key, unsigned int keylen) in crypto_cipher_setkey() 59 u8 *dst, const u8 *src, bool enc) in cipher_crypt_one() 63 void (*fn)(struct crypto_tfm *, u8 *, const u8 *) = in cipher_crypt_one() 68 u8 buffer[MAX_CIPHER_BLOCKSIZE + MAX_CIPHER_ALIGNMASK]; in cipher_crypt_one() 69 u8 *tmp = (u8 *)ALIGN((unsigned long)buffer, alignmask + 1); in cipher_crypt_one() 80 u8 *dst, const u8 *src) in crypto_cipher_encrypt_one() 87 u8 *dst, const u8 *src) in crypto_cipher_decrypt_one()
|
| A D | cbc.c | 16 const u8 *src, u8 *dst, unsigned nbytes, in crypto_cbc_encrypt_segment() 17 u8 *iv) in crypto_cbc_encrypt_segment() 31 u8 *src, unsigned nbytes, u8 *oiv) in crypto_cbc_encrypt_inplace() 34 u8 *iv = oiv; in crypto_cbc_encrypt_inplace() 54 u8 *dst, unsigned len, u8 *iv, u32 flags) in crypto_cbc_encrypt() 70 const u8 *src, u8 *dst, unsigned nbytes, in crypto_cbc_decrypt_segment() 71 u8 *oiv) in crypto_cbc_decrypt_segment() 74 const u8 *iv = oiv; in crypto_cbc_decrypt_segment() 95 u8 *src, unsigned nbytes, u8 *iv) in crypto_cbc_decrypt_inplace() 98 u8 last_iv[MAX_CIPHER_BLOCKSIZE]; in crypto_cbc_decrypt_inplace() [all …]
|
| A D | xctr.c | 37 u8 keystream[XCTR_BLOCKSIZE]; in crypto_xctr_crypt_final() 38 const u8 *src = walk->src.virt.addr; in crypto_xctr_crypt_final() 39 u8 *dst = walk->dst.virt.addr; in crypto_xctr_crypt_final() 43 crypto_xor(walk->iv, (u8 *)&ctr32, sizeof(ctr32)); in crypto_xctr_crypt_final() 46 crypto_xor(walk->iv, (u8 *)&ctr32, sizeof(ctr32)); in crypto_xctr_crypt_final() 52 void (*fn)(struct crypto_tfm *, u8 *, const u8 *) = in crypto_xctr_crypt_segment() 54 const u8 *src = walk->src.virt.addr; in crypto_xctr_crypt_segment() 55 u8 *dst = walk->dst.virt.addr; in crypto_xctr_crypt_segment() 77 void (*fn)(struct crypto_tfm *, u8 *, const u8 *) = in crypto_xctr_crypt_inplace() 81 u8 *data = walk->dst.virt.addr; in crypto_xctr_crypt_inplace() [all …]
|
| A D | aria_generic.c | 195 static void __aria_crypt(struct aria_ctx *ctx, u8 *out, const u8 *in, in __aria_crypt() 227 (u8)(s1[get_u8(reg0, 2)]), in __aria_crypt() 228 (u8)(s2[get_u8(reg0, 3)])); in __aria_crypt() 231 (u8)(s1[get_u8(reg1, 2)]), in __aria_crypt() 232 (u8)(s2[get_u8(reg1, 3)])); in __aria_crypt() 235 (u8)(s1[get_u8(reg2, 2)]), in __aria_crypt() 239 (u8)(s1[get_u8(reg3, 2)]), in __aria_crypt() 248 void aria_encrypt(void *_ctx, u8 *out, const u8 *in) in aria_encrypt() 256 void aria_decrypt(void *_ctx, u8 *out, const u8 *in) in aria_decrypt() 264 static void __aria_encrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in) in __aria_encrypt() [all …]
|
| A D | sha512.c | 33 u8 *p = out; in __crypto_sha512_export() 45 const u8 *p = in; in __crypto_sha512_import() 74 const u8 *data, unsigned int len) in crypto_sha384_update() 87 const u8 *data, unsigned int len, u8 *out) in crypto_sha384_digest() 126 const u8 *data, unsigned int len) in crypto_sha512_update() 139 const u8 *data, unsigned int len, u8 *out) in crypto_sha512_digest() 174 const u8 *data, unsigned int len) in crypto_hmac_sha384_update() 187 const u8 *data, unsigned int len, in crypto_hmac_sha384_digest() 188 u8 *out) in crypto_hmac_sha384_digest() 226 const u8 *data, unsigned int len) in crypto_hmac_sha512_update() [all …]
|
| A D | sha256.c | 33 u8 *p = out; in __crypto_sha256_export() 45 const u8 *p = in; in __crypto_sha256_import() 72 const u8 *data, unsigned int len) in crypto_sha224_update() 85 const u8 *data, unsigned int len, u8 *out) in crypto_sha224_digest() 120 const u8 *data, unsigned int len) in crypto_sha256_update() 133 const u8 *data, unsigned int len, u8 *out) in crypto_sha256_digest() 168 const u8 *data, unsigned int len) in crypto_hmac_sha224_update() 181 const u8 *data, unsigned int len, in crypto_hmac_sha224_digest() 182 u8 *out) in crypto_hmac_sha224_digest() 220 const u8 *data, unsigned int len) in crypto_hmac_sha256_update() [all …]
|
| A D | testmgr.h | 3803 .secret = (u8[32]){ 0x77, 0x07, 0x6d, 0x0a, 0x73, 0x18, 0xa5, 0x7d, 3821 .secret = (u8[32]){ 0x5d, 0xab, 0x08, 0x7e, 0x62, 0x4a, 0x8a, 0x4b, 3839 .secret = (u8[32]){ 1 }, 3854 .secret = (u8[32]){ 1 }, 3869 .secret = (u8[32]){ 0xa5, 0x46, 0xe3, 0x6b, 0xf0, 0x52, 0x7c, 0x9d, 6146 .digest = (u8 *)(u8 []) { 6154 .digest = (u8 *)(u8 []) { 6163 .digest = (u8 *)(u8 []) { 6171 .digest = (u8 *)(u8 []) { 6181 .digest = (u8 *)(u8 []) { [all …]
|
| A D | ctr.c | 20 u8 nonce[CTR_RFC3686_NONCE_SIZE]; 24 u8 iv[CTR_RFC3686_BLOCK_SIZE]; 33 u8 *ctrblk = walk->iv; in crypto_ctr_crypt_final() 37 u8 *dst = walk->dst.virt.addr; in crypto_ctr_crypt_final() 49 void (*fn)(struct crypto_tfm *, u8 *, const u8 *) = in crypto_ctr_crypt_segment() 52 u8 *ctrblk = walk->iv; in crypto_ctr_crypt_segment() 54 u8 *dst = walk->dst.virt.addr; in crypto_ctr_crypt_segment() 75 void (*fn)(struct crypto_tfm *, u8 *, const u8 *) = in crypto_ctr_crypt_inplace() 80 u8 *dst = walk->dst.virt.addr; in crypto_ctr_crypt_inplace() 81 u8 *ctrblk = walk->iv; in crypto_ctr_crypt_inplace() [all …]
|
| A D | des_generic.c | 19 static int des_setkey(struct crypto_tfm *tfm, const u8 *key, in des_setkey() 37 static void crypto_des_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in crypto_des_encrypt() 44 static void crypto_des_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in crypto_des_decrypt() 51 static int des3_ede_setkey(struct crypto_tfm *tfm, const u8 *key, in des3_ede_setkey() 69 static void crypto_des3_ede_encrypt(struct crypto_tfm *tfm, u8 *dst, in crypto_des3_ede_encrypt() 70 const u8 *src) in crypto_des3_ede_encrypt() 77 static void crypto_des3_ede_decrypt(struct crypto_tfm *tfm, u8 *dst, in crypto_des3_ede_decrypt() 78 const u8 *src) in crypto_des3_ede_decrypt()
|
| A D | crc32.c | 36 static int crc32_setkey(struct crypto_shash *hash, const u8 *key, in crc32_setkey() 57 static int crc32_update(struct shash_desc *desc, const u8 *data, in crc32_update() 67 static int __crc32_finup(u32 *crcp, const u8 *data, unsigned int len, u8 *out) in __crc32_finup() 73 static int crc32_finup(struct shash_desc *desc, const u8 *data, in crc32_finup() 74 unsigned int len, u8 *out) in crc32_finup() 79 static int crc32_final(struct shash_desc *desc, u8 *out) in crc32_final() 87 static int crc32_digest(struct shash_desc *desc, const u8 *data, in crc32_digest() 88 unsigned int len, u8 *out) in crc32_digest()
|
| A D | lz4.c | 31 static int __lz4_compress_crypto(const u8 *src, unsigned int slen, in __lz4_compress_crypto() 32 u8 *dst, unsigned int *dlen, void *ctx) in __lz4_compress_crypto() 44 static int lz4_scompress(struct crypto_scomp *tfm, const u8 *src, in lz4_scompress() 45 unsigned int slen, u8 *dst, unsigned int *dlen, in lz4_scompress() 51 static int __lz4_decompress_crypto(const u8 *src, unsigned int slen, in __lz4_decompress_crypto() 52 u8 *dst, unsigned int *dlen, void *ctx) in __lz4_decompress_crypto() 63 static int lz4_sdecompress(struct crypto_scomp *tfm, const u8 *src, in lz4_sdecompress() 64 unsigned int slen, u8 *dst, unsigned int *dlen, in lz4_sdecompress()
|
| A D | lz4hc.c | 29 static int __lz4hc_compress_crypto(const u8 *src, unsigned int slen, in __lz4hc_compress_crypto() 30 u8 *dst, unsigned int *dlen, void *ctx) in __lz4hc_compress_crypto() 42 static int lz4hc_scompress(struct crypto_scomp *tfm, const u8 *src, in lz4hc_scompress() 43 unsigned int slen, u8 *dst, unsigned int *dlen, in lz4hc_scompress() 49 static int __lz4hc_decompress_crypto(const u8 *src, unsigned int slen, in __lz4hc_decompress_crypto() 50 u8 *dst, unsigned int *dlen, void *ctx) in __lz4hc_decompress_crypto() 61 static int lz4hc_sdecompress(struct crypto_scomp *tfm, const u8 *src, in lz4hc_sdecompress() 62 unsigned int slen, u8 *dst, unsigned int *dlen, in lz4hc_sdecompress()
|
| A D | lzo-rle.c | 28 static int __lzorle_compress(const u8 *src, unsigned int slen, in __lzorle_compress() 29 u8 *dst, unsigned int *dlen, void *ctx) in __lzorle_compress() 43 static int lzorle_scompress(struct crypto_scomp *tfm, const u8 *src, in lzorle_scompress() 44 unsigned int slen, u8 *dst, unsigned int *dlen, in lzorle_scompress() 50 static int __lzorle_decompress(const u8 *src, unsigned int slen, in __lzorle_decompress() 51 u8 *dst, unsigned int *dlen) in __lzorle_decompress() 65 static int lzorle_sdecompress(struct crypto_scomp *tfm, const u8 *src, in lzorle_sdecompress() 66 unsigned int slen, u8 *dst, unsigned int *dlen, in lzorle_sdecompress()
|
| A D | lzo.c | 28 static int __lzo_compress(const u8 *src, unsigned int slen, in __lzo_compress() 29 u8 *dst, unsigned int *dlen, void *ctx) in __lzo_compress() 43 static int lzo_scompress(struct crypto_scomp *tfm, const u8 *src, in lzo_scompress() 44 unsigned int slen, u8 *dst, unsigned int *dlen, in lzo_scompress() 50 static int __lzo_decompress(const u8 *src, unsigned int slen, in __lzo_decompress() 51 u8 *dst, unsigned int *dlen) in __lzo_decompress() 65 static int lzo_sdecompress(struct crypto_scomp *tfm, const u8 *src, in lzo_sdecompress() 66 unsigned int slen, u8 *dst, unsigned int *dlen, in lzo_sdecompress()
|
| A D | crypto_null.c | 28 static int null_update(struct shash_desc *desc, const u8 *data, in null_update() 34 static int null_final(struct shash_desc *desc, u8 *out) in null_final() 39 static int null_digest(struct shash_desc *desc, const u8 *data, in null_digest() 40 unsigned int len, u8 *out) in null_digest() 45 static int null_hash_setkey(struct crypto_shash *tfm, const u8 *key, in null_hash_setkey() 49 static int null_skcipher_setkey(struct crypto_skcipher *tfm, const u8 *key, in null_skcipher_setkey() 53 static int null_setkey(struct crypto_tfm *tfm, const u8 *key, in null_setkey() 57 static void null_crypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in null_crypt()
|
| A D | xcbc.c | 33 u8 consts[]; 39 const u8 *inkey, unsigned int keylen) in crypto_xcbc_digest_setkey() 42 u8 *consts = ctx->consts; in crypto_xcbc_digest_setkey() 44 u8 key1[XCBC_BLOCKSIZE]; in crypto_xcbc_digest_setkey() 50 crypto_cipher_encrypt_one(ctx->child, consts, (u8 *)ks + bs); in crypto_xcbc_digest_setkey() 51 crypto_cipher_encrypt_one(ctx->child, consts + bs, (u8 *)ks + bs * 2); in crypto_xcbc_digest_setkey() 52 crypto_cipher_encrypt_one(ctx->child, key1, (u8 *)ks); in crypto_xcbc_digest_setkey() 61 u8 *prev = shash_desc_ctx(pdesc); in crypto_xcbc_digest_init() 74 u8 *prev = shash_desc_ctx(pdesc); in crypto_xcbc_digest_update() 86 unsigned int len, u8 *out) in crypto_xcbc_digest_finup() [all …]
|
| A D | lskcipher.c | 37 u8 *buffer, *alignbuffer; in lskcipher_setkey_unaligned() 70 struct crypto_lskcipher *tfm, const u8 *src, u8 *dst, unsigned len, in crypto_lskcipher_crypt_unaligned() 71 u8 *iv, int (*crypt)(struct crypto_lskcipher *tfm, const u8 *src, in crypto_lskcipher_crypt_unaligned() 72 u8 *dst, unsigned len, u8 *iv, u32 flags)) in crypto_lskcipher_crypt_unaligned() 79 u8 *tiv; in crypto_lskcipher_crypt_unaligned() 80 u8 *p; in crypto_lskcipher_crypt_unaligned() 124 u8 *dst, unsigned len, u8 *iv, in crypto_lskcipher_crypt() 126 const u8 *src, u8 *dst, in crypto_lskcipher_crypt() 141 u8 *dst, unsigned len, u8 *iv) in crypto_lskcipher_encrypt() 150 u8 *dst, unsigned len, u8 *iv) in crypto_lskcipher_decrypt() [all …]
|
| A D | sha1.c | 32 u8 *p = out; in __crypto_sha1_export() 44 const u8 *p = in; in __crypto_sha1_import() 52 const u8 sha1_zero_message_hash[SHA1_DIGEST_SIZE] = { 68 const u8 *data, unsigned int len) in crypto_sha1_update() 74 static int crypto_sha1_final(struct shash_desc *desc, u8 *out) in crypto_sha1_final() 81 const u8 *data, unsigned int len, u8 *out) in crypto_sha1_digest() 101 const u8 *raw_key, unsigned int keylen) in crypto_hmac_sha1_setkey() 114 const u8 *data, unsigned int len) in crypto_hmac_sha1_update() 120 static int crypto_hmac_sha1_final(struct shash_desc *desc, u8 *out) in crypto_hmac_sha1_final() 127 const u8 *data, unsigned int len, u8 *out) in crypto_hmac_sha1_digest()
|
| A D | crc32c.c | 72 static int chksum_setkey(struct crypto_shash *tfm, const u8 *key, in chksum_setkey() 83 static int chksum_update(struct shash_desc *desc, const u8 *data, in chksum_update() 92 static int chksum_final(struct shash_desc *desc, u8 *out) in chksum_final() 100 static int __chksum_finup(u32 *crcp, const u8 *data, unsigned int len, u8 *out) in __chksum_finup() 106 static int chksum_finup(struct shash_desc *desc, const u8 *data, in chksum_finup() 107 unsigned int len, u8 *out) in chksum_finup() 114 static int chksum_digest(struct shash_desc *desc, const u8 *data, in chksum_digest() 115 unsigned int length, u8 *out) in chksum_digest()
|
| A D | polyval-generic.c | 63 u8 buffer[POLYVAL_BLOCK_SIZE]; 68 static void copy_and_reverse(u8 dst[POLYVAL_BLOCK_SIZE], in copy_and_reverse() 69 const u8 src[POLYVAL_BLOCK_SIZE]) in copy_and_reverse() 79 const u8 *key, unsigned int keylen) in polyval_setkey() 90 copy_and_reverse((u8 *)&k, key); in polyval_setkey() 112 const u8 *src, unsigned int srclen) in polyval_update() 116 u8 tmp[POLYVAL_BLOCK_SIZE]; in polyval_update() 129 static int polyval_finup(struct shash_desc *desc, const u8 *src, in polyval_finup() 130 unsigned int len, u8 *dst) in polyval_finup() 135 u8 tmp[POLYVAL_BLOCK_SIZE] = {}; in polyval_finup()
|
| A D | bpf_crypto_skcipher.c | 23 static int bpf_crypto_lskcipher_setkey(void *tfm, const u8 *key, unsigned int keylen) in bpf_crypto_lskcipher_setkey() 43 static int bpf_crypto_lskcipher_encrypt(void *tfm, const u8 *src, u8 *dst, in bpf_crypto_lskcipher_encrypt() 44 unsigned int len, u8 *siv) in bpf_crypto_lskcipher_encrypt() 49 static int bpf_crypto_lskcipher_decrypt(void *tfm, const u8 *src, u8 *dst, in bpf_crypto_lskcipher_decrypt() 50 unsigned int len, u8 *siv) in bpf_crypto_lskcipher_decrypt()
|
| A D | pcbc.c | 25 const u8 *src = walk->src.virt.addr; in crypto_pcbc_encrypt_segment() 27 u8 *dst = walk->dst.virt.addr; in crypto_pcbc_encrypt_segment() 28 u8 * const iv = walk->iv; in crypto_pcbc_encrypt_segment() 48 u8 *dst = walk->dst.virt.addr; in crypto_pcbc_encrypt_inplace() 49 u8 * const iv = walk->iv; in crypto_pcbc_encrypt_inplace() 50 u8 tmpbuf[MAX_CIPHER_BLOCKSIZE]; in crypto_pcbc_encrypt_inplace() 92 const u8 *src = walk->src.virt.addr; in crypto_pcbc_decrypt_segment() 94 u8 *dst = walk->dst.virt.addr; in crypto_pcbc_decrypt_segment() 95 u8 * const iv = walk->iv; in crypto_pcbc_decrypt_segment() 115 u8 *dst = walk->dst.virt.addr; in crypto_pcbc_decrypt_inplace() [all …]
|
| A D | tea.c | 42 static int tea_setkey(struct crypto_tfm *tfm, const u8 *in_key, in tea_setkey() 56 static void tea_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in tea_encrypt() 82 static void tea_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in tea_decrypt() 110 static int xtea_setkey(struct crypto_tfm *tfm, const u8 *in_key, in xtea_setkey() 124 static void xtea_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in xtea_encrypt() 143 static void xtea_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in xtea_decrypt() 164 static void xeta_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in xeta_encrypt() 183 static void xeta_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in xeta_decrypt()
|
| A D | ghash-generic.c | 56 const u8 *key, unsigned int keylen) in ghash_setkey() 79 const u8 *src, unsigned int srclen) in ghash_update() 83 u8 *dst = dctx->buffer; in ghash_update() 95 static void ghash_flush(struct shash_desc *desc, const u8 *src, in ghash_flush() 100 u8 *dst = dctx->buffer; in ghash_flush() 108 static int ghash_finup(struct shash_desc *desc, const u8 *src, in ghash_finup() 109 unsigned int len, u8 *dst) in ghash_finup() 112 u8 *buf = dctx->buffer; in ghash_finup()
|