Home
last modified time | relevance | path

Searched refs:sctx (Results 1 – 25 of 33) sorted by relevance

12

/arch/mips/cavium-octeon/crypto/
Docteon-sha512.c31 static void octeon_sha512_store_hash(struct sha512_state *sctx) in octeon_sha512_store_hash() argument
33 write_octeon_64bit_hash_sha512(sctx->state[0], 0); in octeon_sha512_store_hash()
34 write_octeon_64bit_hash_sha512(sctx->state[1], 1); in octeon_sha512_store_hash()
35 write_octeon_64bit_hash_sha512(sctx->state[2], 2); in octeon_sha512_store_hash()
36 write_octeon_64bit_hash_sha512(sctx->state[3], 3); in octeon_sha512_store_hash()
37 write_octeon_64bit_hash_sha512(sctx->state[4], 4); in octeon_sha512_store_hash()
38 write_octeon_64bit_hash_sha512(sctx->state[5], 5); in octeon_sha512_store_hash()
39 write_octeon_64bit_hash_sha512(sctx->state[6], 6); in octeon_sha512_store_hash()
40 write_octeon_64bit_hash_sha512(sctx->state[7], 7); in octeon_sha512_store_hash()
43 static void octeon_sha512_read_hash(struct sha512_state *sctx) in octeon_sha512_read_hash() argument
[all …]
Docteon-sha256.c32 static void octeon_sha256_store_hash(struct sha256_state *sctx) in octeon_sha256_store_hash() argument
34 u64 *hash = (u64 *)sctx->state; in octeon_sha256_store_hash()
42 static void octeon_sha256_read_hash(struct sha256_state *sctx) in octeon_sha256_read_hash() argument
44 u64 *hash = (u64 *)sctx->state; in octeon_sha256_read_hash()
68 struct sha256_state *sctx = shash_desc_ctx(desc); in octeon_sha224_init() local
70 sctx->state[0] = SHA224_H0; in octeon_sha224_init()
71 sctx->state[1] = SHA224_H1; in octeon_sha224_init()
72 sctx->state[2] = SHA224_H2; in octeon_sha224_init()
73 sctx->state[3] = SHA224_H3; in octeon_sha224_init()
74 sctx->state[4] = SHA224_H4; in octeon_sha224_init()
[all …]
Docteon-sha1.c31 static void octeon_sha1_store_hash(struct sha1_state *sctx) in octeon_sha1_store_hash() argument
33 u64 *hash = (u64 *)sctx->state; in octeon_sha1_store_hash()
37 } hash_tail = { { sctx->state[4], } }; in octeon_sha1_store_hash()
45 static void octeon_sha1_read_hash(struct sha1_state *sctx) in octeon_sha1_read_hash() argument
47 u64 *hash = (u64 *)sctx->state; in octeon_sha1_read_hash()
56 sctx->state[4] = hash_tail.word[0]; in octeon_sha1_read_hash()
76 struct sha1_state *sctx = shash_desc_ctx(desc); in octeon_sha1_init() local
78 sctx->state[0] = SHA1_H0; in octeon_sha1_init()
79 sctx->state[1] = SHA1_H1; in octeon_sha1_init()
80 sctx->state[2] = SHA1_H2; in octeon_sha1_init()
[all …]
/arch/powerpc/crypto/
Dsha256-spe-glue.c49 static inline void ppc_sha256_clear_context(struct sha256_state *sctx) in ppc_sha256_clear_context() argument
52 u32 *ptr = (u32 *)sctx; in ppc_sha256_clear_context()
61 struct sha256_state *sctx = shash_desc_ctx(desc); in ppc_spe_sha256_init() local
63 sctx->state[0] = SHA256_H0; in ppc_spe_sha256_init()
64 sctx->state[1] = SHA256_H1; in ppc_spe_sha256_init()
65 sctx->state[2] = SHA256_H2; in ppc_spe_sha256_init()
66 sctx->state[3] = SHA256_H3; in ppc_spe_sha256_init()
67 sctx->state[4] = SHA256_H4; in ppc_spe_sha256_init()
68 sctx->state[5] = SHA256_H5; in ppc_spe_sha256_init()
69 sctx->state[6] = SHA256_H6; in ppc_spe_sha256_init()
[all …]
Dsha1-spe-glue.c48 static inline void ppc_sha1_clear_context(struct sha1_state *sctx) in ppc_sha1_clear_context() argument
51 u32 *ptr = (u32 *)sctx; in ppc_sha1_clear_context()
60 struct sha1_state *sctx = shash_desc_ctx(desc); in ppc_spe_sha1_init() local
62 sctx->state[0] = SHA1_H0; in ppc_spe_sha1_init()
63 sctx->state[1] = SHA1_H1; in ppc_spe_sha1_init()
64 sctx->state[2] = SHA1_H2; in ppc_spe_sha1_init()
65 sctx->state[3] = SHA1_H3; in ppc_spe_sha1_init()
66 sctx->state[4] = SHA1_H4; in ppc_spe_sha1_init()
67 sctx->count = 0; in ppc_spe_sha1_init()
75 struct sha1_state *sctx = shash_desc_ctx(desc); in ppc_spe_sha1_update() local
[all …]
Dmd5-glue.c20 static inline void ppc_md5_clear_context(struct md5_state *sctx) in ppc_md5_clear_context() argument
23 u32 *ptr = (u32 *)sctx; in ppc_md5_clear_context()
32 struct md5_state *sctx = shash_desc_ctx(desc); in ppc_md5_init() local
34 sctx->hash[0] = MD5_H0; in ppc_md5_init()
35 sctx->hash[1] = MD5_H1; in ppc_md5_init()
36 sctx->hash[2] = MD5_H2; in ppc_md5_init()
37 sctx->hash[3] = MD5_H3; in ppc_md5_init()
38 sctx->byte_count = 0; in ppc_md5_init()
46 struct md5_state *sctx = shash_desc_ctx(desc); in ppc_md5_update() local
47 const unsigned int offset = sctx->byte_count & 0x3f; in ppc_md5_update()
[all …]
Dsha1.c27 struct sha1_state *sctx = shash_desc_ctx(desc); in powerpc_sha1_init() local
29 *sctx = (struct sha1_state){ in powerpc_sha1_init()
39 struct sha1_state *sctx = shash_desc_ctx(desc); in powerpc_sha1_update() local
43 partial = sctx->count & 0x3f; in powerpc_sha1_update()
44 sctx->count += len; in powerpc_sha1_update()
52 memcpy(sctx->buffer + partial, data, done + 64); in powerpc_sha1_update()
53 src = sctx->buffer; in powerpc_sha1_update()
57 powerpc_sha_transform(sctx->state, src); in powerpc_sha1_update()
64 memcpy(sctx->buffer + partial, src, len - done); in powerpc_sha1_update()
73 struct sha1_state *sctx = shash_desc_ctx(desc); in powerpc_sha1_final() local
[all …]
/arch/sparc/crypto/
Dsha512_glue.c30 struct sha512_state *sctx = shash_desc_ctx(desc); in sha512_sparc64_init() local
31 sctx->state[0] = SHA512_H0; in sha512_sparc64_init()
32 sctx->state[1] = SHA512_H1; in sha512_sparc64_init()
33 sctx->state[2] = SHA512_H2; in sha512_sparc64_init()
34 sctx->state[3] = SHA512_H3; in sha512_sparc64_init()
35 sctx->state[4] = SHA512_H4; in sha512_sparc64_init()
36 sctx->state[5] = SHA512_H5; in sha512_sparc64_init()
37 sctx->state[6] = SHA512_H6; in sha512_sparc64_init()
38 sctx->state[7] = SHA512_H7; in sha512_sparc64_init()
39 sctx->count[0] = sctx->count[1] = 0; in sha512_sparc64_init()
[all …]
Dsha256_glue.c31 struct sha256_state *sctx = shash_desc_ctx(desc); in sha224_sparc64_init() local
32 sctx->state[0] = SHA224_H0; in sha224_sparc64_init()
33 sctx->state[1] = SHA224_H1; in sha224_sparc64_init()
34 sctx->state[2] = SHA224_H2; in sha224_sparc64_init()
35 sctx->state[3] = SHA224_H3; in sha224_sparc64_init()
36 sctx->state[4] = SHA224_H4; in sha224_sparc64_init()
37 sctx->state[5] = SHA224_H5; in sha224_sparc64_init()
38 sctx->state[6] = SHA224_H6; in sha224_sparc64_init()
39 sctx->state[7] = SHA224_H7; in sha224_sparc64_init()
40 sctx->count = 0; in sha224_sparc64_init()
[all …]
Dsha1_glue.c31 struct sha1_state *sctx = shash_desc_ctx(desc); in sha1_sparc64_init() local
33 *sctx = (struct sha1_state){ in sha1_sparc64_init()
40 static void __sha1_sparc64_update(struct sha1_state *sctx, const u8 *data, in __sha1_sparc64_update() argument
45 sctx->count += len; in __sha1_sparc64_update()
48 memcpy(sctx->buffer + partial, data, done); in __sha1_sparc64_update()
49 sha1_sparc64_transform(sctx->state, sctx->buffer, 1); in __sha1_sparc64_update()
54 sha1_sparc64_transform(sctx->state, data + done, rounds); in __sha1_sparc64_update()
58 memcpy(sctx->buffer, data + done, len - done); in __sha1_sparc64_update()
64 struct sha1_state *sctx = shash_desc_ctx(desc); in sha1_sparc64_update() local
65 unsigned int partial = sctx->count % SHA1_BLOCK_SIZE; in sha1_sparc64_update()
[all …]
Dmd5_glue.c46 static void __md5_sparc64_update(struct md5_state *sctx, const u8 *data, in __md5_sparc64_update() argument
51 sctx->byte_count += len; in __md5_sparc64_update()
54 memcpy((u8 *)sctx->block + partial, data, done); in __md5_sparc64_update()
55 md5_sparc64_transform(sctx->hash, (u8 *)sctx->block, 1); in __md5_sparc64_update()
60 md5_sparc64_transform(sctx->hash, data + done, rounds); in __md5_sparc64_update()
64 memcpy(sctx->block, data + done, len - done); in __md5_sparc64_update()
70 struct md5_state *sctx = shash_desc_ctx(desc); in md5_sparc64_update() local
71 unsigned int partial = sctx->byte_count % MD5_HMAC_BLOCK_SIZE; in md5_sparc64_update()
75 sctx->byte_count += len; in md5_sparc64_update()
76 memcpy((u8 *)sctx->block + partial, data, len); in md5_sparc64_update()
[all …]
/arch/s390/crypto/
Dsha256_s390.c22 struct s390_sha_ctx *sctx = shash_desc_ctx(desc); in s390_sha256_init() local
24 sctx->state[0] = SHA256_H0; in s390_sha256_init()
25 sctx->state[1] = SHA256_H1; in s390_sha256_init()
26 sctx->state[2] = SHA256_H2; in s390_sha256_init()
27 sctx->state[3] = SHA256_H3; in s390_sha256_init()
28 sctx->state[4] = SHA256_H4; in s390_sha256_init()
29 sctx->state[5] = SHA256_H5; in s390_sha256_init()
30 sctx->state[6] = SHA256_H6; in s390_sha256_init()
31 sctx->state[7] = SHA256_H7; in s390_sha256_init()
32 sctx->count = 0; in s390_sha256_init()
[all …]
Dsha3_256_s390.c22 struct s390_sha_ctx *sctx = shash_desc_ctx(desc); in sha3_256_init() local
24 memset(sctx->state, 0, sizeof(sctx->state)); in sha3_256_init()
25 sctx->count = 0; in sha3_256_init()
26 sctx->func = CPACF_KIMD_SHA3_256; in sha3_256_init()
33 struct s390_sha_ctx *sctx = shash_desc_ctx(desc); in sha3_256_export() local
36 octx->rsiz = sctx->count; in sha3_256_export()
37 memcpy(octx->st, sctx->state, sizeof(octx->st)); in sha3_256_export()
38 memcpy(octx->buf, sctx->buf, sizeof(octx->buf)); in sha3_256_export()
45 struct s390_sha_ctx *sctx = shash_desc_ctx(desc); in sha3_256_import() local
48 sctx->count = ictx->rsiz; in sha3_256_import()
[all …]
Dsha3_512_s390.c21 struct s390_sha_ctx *sctx = shash_desc_ctx(desc); in sha3_512_init() local
23 memset(sctx->state, 0, sizeof(sctx->state)); in sha3_512_init()
24 sctx->count = 0; in sha3_512_init()
25 sctx->func = CPACF_KIMD_SHA3_512; in sha3_512_init()
32 struct s390_sha_ctx *sctx = shash_desc_ctx(desc); in sha3_512_export() local
35 octx->rsiz = sctx->count; in sha3_512_export()
36 octx->rsizw = sctx->count >> 32; in sha3_512_export()
38 memcpy(octx->st, sctx->state, sizeof(octx->st)); in sha3_512_export()
39 memcpy(octx->buf, sctx->buf, sizeof(octx->buf)); in sha3_512_export()
46 struct s390_sha_ctx *sctx = shash_desc_ctx(desc); in sha3_512_import() local
[all …]
Dsha1_s390.c32 struct s390_sha_ctx *sctx = shash_desc_ctx(desc); in s390_sha1_init() local
34 sctx->state[0] = SHA1_H0; in s390_sha1_init()
35 sctx->state[1] = SHA1_H1; in s390_sha1_init()
36 sctx->state[2] = SHA1_H2; in s390_sha1_init()
37 sctx->state[3] = SHA1_H3; in s390_sha1_init()
38 sctx->state[4] = SHA1_H4; in s390_sha1_init()
39 sctx->count = 0; in s390_sha1_init()
40 sctx->func = CPACF_KIMD_SHA_1; in s390_sha1_init()
47 struct s390_sha_ctx *sctx = shash_desc_ctx(desc); in s390_sha1_export() local
50 octx->count = sctx->count; in s390_sha1_export()
[all …]
Daes_s390.c75 struct s390_aes_ctx *sctx = crypto_tfm_ctx(tfm); in setkey_fallback_cip() local
77 sctx->fallback.cip->base.crt_flags &= ~CRYPTO_TFM_REQ_MASK; in setkey_fallback_cip()
78 sctx->fallback.cip->base.crt_flags |= (tfm->crt_flags & in setkey_fallback_cip()
81 return crypto_cipher_setkey(sctx->fallback.cip, in_key, key_len); in setkey_fallback_cip()
87 struct s390_aes_ctx *sctx = crypto_tfm_ctx(tfm); in aes_set_key() local
96 sctx->fc = (fc && cpacf_test_func(&km_functions, fc)) ? fc : 0; in aes_set_key()
97 if (!sctx->fc) in aes_set_key()
100 sctx->key_len = key_len; in aes_set_key()
101 memcpy(sctx->key, in_key, key_len); in aes_set_key()
107 struct s390_aes_ctx *sctx = crypto_tfm_ctx(tfm); in crypto_aes_encrypt() local
[all …]
Dsha512_s390.c41 struct s390_sha_ctx *sctx = shash_desc_ctx(desc); in sha512_export() local
44 octx->count[0] = sctx->count; in sha512_export()
46 memcpy(octx->state, sctx->state, sizeof(octx->state)); in sha512_export()
47 memcpy(octx->buf, sctx->buf, sizeof(octx->buf)); in sha512_export()
53 struct s390_sha_ctx *sctx = shash_desc_ctx(desc); in sha512_import() local
58 sctx->count = ictx->count[0]; in sha512_import()
60 memcpy(sctx->state, ictx->state, sizeof(ictx->state)); in sha512_import()
61 memcpy(sctx->buf, ictx->buf, sizeof(ictx->buf)); in sha512_import()
62 sctx->func = CPACF_KIMD_SHA_512; in sha512_import()
/arch/arm64/crypto/
Dsha3-ce-glue.c37 struct sha3_state *sctx = shash_desc_ctx(desc); in sha3_update() local
43 if ((sctx->partial + len) >= sctx->rsiz) { in sha3_update()
46 if (sctx->partial) { in sha3_update()
47 int p = sctx->rsiz - sctx->partial; in sha3_update()
49 memcpy(sctx->buf + sctx->partial, data, p); in sha3_update()
51 sha3_ce_transform(sctx->st, sctx->buf, 1, digest_size); in sha3_update()
56 sctx->partial = 0; in sha3_update()
59 blocks = len / sctx->rsiz; in sha3_update()
60 len %= sctx->rsiz; in sha3_update()
66 rem = sha3_ce_transform(sctx->st, data, blocks, in sha3_update()
[all …]
Dsha1-ce-glue.c56 struct sha1_ce_state *sctx = shash_desc_ctx(desc); in sha1_ce_update() local
61 sctx->finalize = 0; in sha1_ce_update()
70 struct sha1_ce_state *sctx = shash_desc_ctx(desc); in sha1_ce_finup() local
71 bool finalize = !sctx->sst.count && !(len % SHA1_BLOCK_SIZE) && len; in sha1_ce_finup()
80 sctx->finalize = finalize; in sha1_ce_finup()
90 struct sha1_ce_state *sctx = shash_desc_ctx(desc); in sha1_ce_final() local
95 sctx->finalize = 0; in sha1_ce_final()
102 struct sha1_ce_state *sctx = shash_desc_ctx(desc); in sha1_ce_export() local
104 memcpy(out, &sctx->sst, sizeof(struct sha1_state)); in sha1_ce_export()
110 struct sha1_ce_state *sctx = shash_desc_ctx(desc); in sha1_ce_import() local
[all …]
Dsha2-ce-glue.c67 struct sha256_ce_state *sctx = shash_desc_ctx(desc); in sha256_ce_update() local
73 sctx->finalize = 0; in sha256_ce_update()
82 struct sha256_ce_state *sctx = shash_desc_ctx(desc); in sha256_ce_finup() local
83 bool finalize = !sctx->sst.count && !(len % SHA256_BLOCK_SIZE) && len; in sha256_ce_finup()
97 sctx->finalize = finalize; in sha256_ce_finup()
107 struct sha256_ce_state *sctx = shash_desc_ctx(desc); in sha256_ce_final() local
114 sctx->finalize = 0; in sha256_ce_final()
121 struct sha256_ce_state *sctx = shash_desc_ctx(desc); in sha256_ce_export() local
123 memcpy(out, &sctx->sst, sizeof(struct sha256_state)); in sha256_ce_export()
129 struct sha256_ce_state *sctx = shash_desc_ctx(desc); in sha256_ce_import() local
[all …]
/arch/s390/purgatory/
Dpurgatory.c19 struct sha256_state sctx; in verify_sha256_digest() local
21 sha256_init(&sctx); in verify_sha256_digest()
25 sha256_update(&sctx, (uint8_t *)(ptr->start), ptr->len); in verify_sha256_digest()
27 sha256_final(&sctx, digest); in verify_sha256_digest()
/arch/x86/purgatory/
Dpurgatory.c27 struct sha256_state sctx; in verify_sha256_digest() local
29 sha256_init(&sctx); in verify_sha256_digest()
33 sha256_update(&sctx, (uint8_t *)(ptr->start), ptr->len); in verify_sha256_digest()
35 sha256_final(&sctx, digest); in verify_sha256_digest()
/arch/arm/crypto/
Dsha1-ce-glue.c32 struct sha1_state *sctx = shash_desc_ctx(desc); in sha1_ce_update() local
35 (sctx->count % SHA1_BLOCK_SIZE) + len < SHA1_BLOCK_SIZE) in sha1_ce_update()
Dsha1_neon_glue.c35 struct sha1_state *sctx = shash_desc_ctx(desc); in sha1_neon_update() local
38 (sctx->count % SHA1_BLOCK_SIZE) + len < SHA1_BLOCK_SIZE) in sha1_neon_update()
Dsha512-neon-glue.c29 struct sha512_state *sctx = shash_desc_ctx(desc); in sha512_neon_update() local
32 (sctx->count[0] % SHA512_BLOCK_SIZE) + len < SHA512_BLOCK_SIZE) in sha512_neon_update()

12