| /arch/s390/crypto/ |
| A D | ghash_s390.c | 32 struct s390_ghash_desc_ctx *dctx = shash_desc_ctx(desc); in ghash_init() local 34 memset(dctx, 0, sizeof(*dctx)); in ghash_init() 35 memcpy(dctx->key, ctx->key, GHASH_BLOCK_SIZE); in ghash_init() 56 struct s390_ghash_desc_ctx *dctx = shash_desc_ctx(desc); in ghash_update() local 60 cpacf_kimd(CPACF_KIMD_GHASH, dctx, src, n); in ghash_update() 79 struct s390_ghash_desc_ctx *dctx = shash_desc_ctx(desc); in ghash_finup() local 81 ghash_flush(dctx, src, len); in ghash_finup() 82 memcpy(dst, dctx->icv, GHASH_BLOCK_SIZE); in ghash_finup() 90 memcpy(out, dctx->icv, GHASH_DIGEST_SIZE); in ghash_export() 99 memcpy(dctx->icv, in, GHASH_DIGEST_SIZE); in ghash_import() [all …]
|
| /arch/powerpc/crypto/ |
| A D | ghash.c | 45 struct p8_ghash_desc_ctx *dctx = shash_desc_ctx(desc); in p8_ghash_init() local 47 memset(dctx->shash, 0, GHASH_DIGEST_SIZE); in p8_ghash_init() 73 struct p8_ghash_desc_ctx *dctx, in __ghash_block() argument 85 crypto_xor((u8 *)dctx->shash, src, GHASH_BLOCK_SIZE); in __ghash_block() 86 gf128mul_lle((be128 *)dctx->shash, &ctx->key); in __ghash_block() 91 struct p8_ghash_desc_ctx *dctx, in __ghash_blocks() argument 101 gcm_ghash_p8(dctx->shash, ctx->htable, in __ghash_blocks() 109 gf128mul_lle((be128 *)dctx->shash, &ctx->key); in __ghash_blocks() 124 return __ghash_blocks(ctx, dctx, src, srclen); in p8_ghash_update() 137 __ghash_block(ctx, dctx, buf); in p8_ghash_finup() [all …]
|
| /arch/riscv/crypto/ |
| A D | ghash-riscv64-glue.c | 51 struct riscv64_ghash_desc_ctx *dctx = shash_desc_ctx(desc); in riscv64_ghash_init() local 53 *dctx = (struct riscv64_ghash_desc_ctx){}; in riscv64_ghash_init() 60 struct riscv64_ghash_desc_ctx *dctx, in riscv64_ghash_blocks() argument 66 ghash_zvkg(&dctx->accumulator, &tctx->key, src, srclen); in riscv64_ghash_blocks() 70 crypto_xor((u8 *)&dctx->accumulator, src, in riscv64_ghash_blocks() 72 gf128mul_lle(&dctx->accumulator, &tctx->key); in riscv64_ghash_blocks() 83 struct riscv64_ghash_desc_ctx *dctx = shash_desc_ctx(desc); in riscv64_ghash_update() local 85 riscv64_ghash_blocks(tctx, dctx, src, in riscv64_ghash_update() 94 struct riscv64_ghash_desc_ctx *dctx = shash_desc_ctx(desc); in riscv64_ghash_finup() local 100 riscv64_ghash_blocks(tctx, dctx, buf, GHASH_BLOCK_SIZE); in riscv64_ghash_finup() [all …]
|
| /arch/x86/crypto/ |
| A D | ghash-clmulni-intel_glue.c | 33 struct ghash_desc_ctx *dctx = shash_desc_ctx(desc); in ghash_init() local 35 memset(dctx, 0, sizeof(*dctx)); in ghash_init() 85 struct ghash_desc_ctx *dctx = shash_desc_ctx(desc); in ghash_update() local 86 u8 *dst = dctx->buffer; in ghash_update() 95 static void ghash_flush(struct x86_ghash_ctx *ctx, struct ghash_desc_ctx *dctx, in ghash_flush() argument 98 u8 *dst = dctx->buffer; in ghash_flush() 112 struct ghash_desc_ctx *dctx = shash_desc_ctx(desc); in ghash_finup() local 113 u8 *buf = dctx->buffer; in ghash_finup() 115 ghash_flush(ctx, dctx, src, len); in ghash_finup()
|
| A D | polyval-clmulni_glue.c | 92 struct polyval_desc_ctx *dctx = shash_desc_ctx(desc); in polyval_x86_init() local 94 memset(dctx, 0, sizeof(*dctx)); in polyval_x86_init() 102 struct polyval_desc_ctx *dctx = shash_desc_ctx(desc); in polyval_x86_update() local 109 internal_polyval_update(tctx, src, nblocks, dctx->buffer); in polyval_x86_update() 120 struct polyval_desc_ctx *dctx = shash_desc_ctx(desc); in polyval_x86_finup() local 124 crypto_xor(dctx->buffer, src, len); in polyval_x86_finup() 125 internal_polyval_mul(dctx->buffer, in polyval_x86_finup() 129 memcpy(dst, dctx->buffer, POLYVAL_BLOCK_SIZE); in polyval_x86_finup()
|
| /arch/arm64/crypto/ |
| A D | polyval-ce-glue.c | 82 struct polyval_desc_ctx *dctx = shash_desc_ctx(desc); in polyval_arm64_init() local 84 memset(dctx, 0, sizeof(*dctx)); in polyval_arm64_init() 92 struct polyval_desc_ctx *dctx = shash_desc_ctx(desc); in polyval_arm64_update() local 99 internal_polyval_update(tctx, src, nblocks, dctx->buffer); in polyval_arm64_update() 110 struct polyval_desc_ctx *dctx = shash_desc_ctx(desc); in polyval_arm64_finup() local 114 crypto_xor(dctx->buffer, src, len); in polyval_arm64_finup() 115 internal_polyval_mul(dctx->buffer, in polyval_arm64_finup() 119 memcpy(dst, dctx->buffer, POLYVAL_BLOCK_SIZE); in polyval_arm64_finup()
|
| /arch/sparc/crypto/ |
| A D | des_glue.c | 47 struct des_sparc64_ctx *dctx = crypto_tfm_ctx(tfm); in des_set_key() local 58 des_sparc64_key_expand((const u32 *) key, &dctx->encrypt_expkey[0]); in des_set_key() 59 encrypt_to_decrypt(&dctx->decrypt_expkey[0], &dctx->encrypt_expkey[0]); in des_set_key() 183 struct des3_ede_sparc64_ctx *dctx = crypto_tfm_ctx(tfm); in des3_ede_set_key() local 199 memcpy(&dctx->encrypt_expkey[0], &k1[0], sizeof(k1)); in des3_ede_set_key() 200 encrypt_to_decrypt(&dctx->encrypt_expkey[DES_EXPKEY_WORDS / 2], &k2[0]); in des3_ede_set_key() 201 memcpy(&dctx->encrypt_expkey[(DES_EXPKEY_WORDS / 2) * 2], in des3_ede_set_key() 204 encrypt_to_decrypt(&dctx->decrypt_expkey[0], &k3[0]); in des3_ede_set_key() 205 memcpy(&dctx->decrypt_expkey[DES_EXPKEY_WORDS / 2], in des3_ede_set_key() 207 encrypt_to_decrypt(&dctx->decrypt_expkey[(DES_EXPKEY_WORDS / 2) * 2], in des3_ede_set_key()
|