Home
last modified time | relevance | path

Searched +full:sha +full:- +full:512 (Results 1 – 25 of 69) sorted by relevance

123

/linux/lib/crypto/tests/
H A DKconfig1 # SPDX-License-Identifier: GPL-2.0-or-later
13 tristate "KUnit tests for SHA-1" if !KUNIT_ALL_TESTS
19 KUnit tests for the SHA-1 cryptographic hash function and its
22 # Option is named *_SHA256_KUNIT_TEST, though both SHA-224 and SHA-256 tests are
25 tristate "KUnit tests for SHA-224 and SHA-256" if !KUNIT_ALL_TESTS
31 KUnit tests for the SHA-224 and SHA-256 cryptographic hash functions
34 # Option is named *_SHA512_KUNIT_TEST, though both SHA-384 and SHA-512 tests are
37 tristate "KUnit tests for SHA-384 and SHA-512" if !KUNIT_ALL_TESTS
43 KUnit tests for the SHA-384 and SHA-512 cryptographic hash functions
H A Dsha512_kunit.c1 // SPDX-License-Identifier: GPL-2.0-or-later
6 #include "sha512-testvecs.h"
22 #include "hash-test-template.h"
38 MODULE_DESCRIPTION("KUnit tests and benchmark for SHA-512 and HMAC-SHA512");
/linux/arch/s390/crypto/
H A Dhmac_s390.c1 // SPDX-License-Identifier: GPL-2.0+
24 * blocksize of the used hashing sha2-algorithm function codes. The param block
25 * contains the hash chaining value (cv), the input message bit-length (imbl)
26 * and the hmac-secret (key). To prevent code duplication, the sizes of all
29 * param-block:
30 * +-------+
32 * +-------+
34 * +-------+
36 * +-------+
39 * part | sh2-alg | calculation | size | type
[all …]
H A Dphmac_s390.c1 // SPDX-License-Identifier: GPL-2.0+
45 hwh->walkbytes = crypto_hash_walk_first(req, &hwh->walk); in hwh_prepare()
46 if (hwh->walkbytes < 0) in hwh_prepare()
47 return hwh->walkbytes; in hwh_prepare()
48 hwh->walkaddr = hwh->walk.data; in hwh_prepare()
63 return crypto_hash_walk_done(&hwh->walk, n); in hwh_advance()
65 hwh->walkbytes -= n; in hwh_advance()
66 hwh->walkaddr += n; in hwh_advance()
67 if (hwh->walkbytes > 0) in hwh_advance()
70 hwh->walkbytes = crypto_hash_walk_done(&hwh->walk, 0); in hwh_advance()
[all …]
H A Dprng.c1 // SPDX-License-Identifier: GPL-2.0
42 MODULE_PARM_DESC(prng_mode, "PRNG mode: 0 - auto, 1 - TDES, 2 - SHA512");
68 * of course, in a state of sin. -- John von Neumann
120 * the random bytes given back is assumed to have at least 50% - meaning
126 * at least 512 stckf() values are needed. The entropy relevant part of the
156 return -ENOMEM; in generate_entropy()
163 /* exor upper 2k with 512 stckf values, offset 4 bytes each */ in generate_entropy()
164 for (n = 0; n < 512; n++) { in generate_entropy()
165 int offset = (PAGE_SIZE / 2) + (n * 4) - 4; in generate_entropy()
175 nbytes -= n; in generate_entropy()
[all …]
/linux/include/crypto/
H A Dsha2.h1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Common values for SHA-2 algorithms
76 sctx->state[0] = SHA224_H0; in sha224_block_init()
77 sctx->state[1] = SHA224_H1; in sha224_block_init()
78 sctx->state[2] = SHA224_H2; in sha224_block_init()
79 sctx->state[3] = SHA224_H3; in sha224_block_init()
80 sctx->state[4] = SHA224_H4; in sha224_block_init()
81 sctx->state[5] = SHA224_H5; in sha224_block_init()
82 sctx->state[6] = SHA224_H6; in sha224_block_init()
83 sctx->state[7] = SHA224_H7; in sha224_block_init()
[all …]
H A Dsha3.h1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Common values for SHA-3 algorithms
11 #define SHA3_224_BLOCK_SIZE (200 - 2 * SHA3_224_DIGEST_SIZE)
15 #define SHA3_256_BLOCK_SIZE (200 - 2 * SHA3_256_DIGEST_SIZE)
19 #define SHA3_384_BLOCK_SIZE (200 - 2 * SHA3_384_DIGEST_SIZE)
22 #define SHA3_512_DIGEST_SIZE (512 / 8)
23 #define SHA3_512_BLOCK_SIZE (200 - 2 * SHA3_512_DIGEST_SIZE)
/linux/tools/perf/pmu-events/arch/s390/cf_z17/
H A Dpai_crypto.json3 "Unit": "PAI-CRYPTO",
10 "Unit": "PAI-CRYPTO",
14 "PublicDescription": "KM-DEA function ending with CC=0"
17 "Unit": "PAI-CRYPTO",
21 "PublicDescription": "KM-TDEA-128 function ending with CC=0"
24 "Unit": "PAI-CRYPTO",
28 "PublicDescription": "KM-TDEA-192 function ending with CC=0"
31 "Unit": "PAI-CRYPTO",
35 "PublicDescription": "KM-Encrypted-DEA function ending with CC=0"
38 "Unit": "PAI-CRYPTO",
[all …]
/linux/Documentation/ABI/testing/
H A Ddebugfs-pfo-nx-crypto1 What: /sys/kernel/debug/nx-crypto/*
7 These debugfs interfaces are built by the nx-crypto driver, built in
18 The most recent non-zero return code from the H_COP_OP hcall. -EBUSY is not
19 recorded here (the hcall will retry until -EBUSY goes away).
36 The total number of bytes hashed by the hardware using SHA-256.
39 The total number of SHA-256 operations submitted to the hardware.
42 The total number of bytes hashed by the hardware using SHA-512.
45 The total number of SHA-512 operations submitted to the hardware.
/linux/fs/crypto/
H A Dhkdf.c1 // SPDX-License-Identifier: GPL-2.0
5 * the case that the fscrypt master keys are hardware-wrapped keys).
18 * SHA-512 because it is well-established, secure, and reasonably efficient.
20 * HKDF-SHA256 was also considered, as its 256-bit security strength would be
21 * sufficient here. A 512-bit security strength is "nice to have", though.
22 * Also, on 64-bit CPUs, SHA-512 is usually just as fast as SHA-256. In the
23 * common case of deriving an AES-256-XTS key (512 bits), that can result in
24 * HKDF-SHA512 being much faster than HKDF-SHA256, as the longer digest size of
25 * SHA-512 causes HKDF-Expand to only need to do one iteration rather than two.
33 * 1. HKDF-Extract: extract a pseudorandom key of length HKDF_HASHLEN bytes from
[all …]
/linux/lib/crypto/sparc/
H A Dsha512.h1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * SHA-512 accelerated using the sparc64 sha512 opcodes
5 * Copyright (c) Jean-Luc Cooke <jlcooke@certainkey.com>
41 pr_info("Using sparc64 sha512 opcode optimized SHA-512/SHA-384 implementation\n"); in sha512_mod_init_arch()
/linux/drivers/crypto/aspeed/
H A DKconfig32 SHA-1, SHA-224, SHA-256, SHA-384, SHA-512, and so on.
45 Supports AES/DES symmetric-key encryption and decryption
/linux/tools/perf/pmu-events/arch/s390/cf_z16/
H A Dpai_crypto.json3 "Unit": "PAI-CRYPTO",
10 "Unit": "PAI-CRYPTO",
14 "PublicDescription": "KM-DEA function ending with CC=0"
17 "Unit": "PAI-CRYPTO",
21 "PublicDescription": "KM-TDEA-128 function ending with CC=0"
24 "Unit": "PAI-CRYPTO",
28 "PublicDescription": "KM-TDEA-192 function ending with CC=0"
31 "Unit": "PAI-CRYPTO",
35 "PublicDescription": "KM-Encrypted-DEA function ending with CC=0"
38 "Unit": "PAI-CRYPTO",
[all …]
/linux/crypto/
H A DKconfig1 # SPDX-License-Identifier: GPL-2.0
156 cbc(aes), and the support for the crypto self-tests.
178 bool "Enable cryptographic self-tests"
181 Enable the cryptographic self-tests.
183 The cryptographic self-tests run at boot time, or at algorithm
188 - Development and pre-release testing. In this case, also enable
192 - Production kernels, to help prevent buggy drivers from being used
193 and/or meet FIPS 140-3 pre-operational testing requirements. In
197 bool "Enable the full set of cryptographic self-tests"
200 Enable the full set of cryptographic self-tests for each algorithm.
[all …]
H A Dsha512.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Crypto API support for SHA-384, SHA-512, HMAC-SHA384, and HMAC-SHA512
5 * Copyright (c) Jean-Luc Cooke <jlcooke@certainkey.com>
18 * library SHA context, except the value in bytecount_lo must be block-aligned
36 ctx.bytecount_lo -= partial; in __crypto_sha512_export()
49 ctx->bytecount_lo += *p; in __crypto_sha512_import()
53 /* SHA-384 */
95 return __crypto_sha512_export(&SHA384_CTX(desc)->ctx, out); in crypto_sha384_export()
100 return __crypto_sha512_import(&SHA384_CTX(desc)->ctx, in); in crypto_sha384_import()
103 /* SHA-512 */
[all …]
H A Dsha3_generic.c1 // SPDX-License-Identifier: GPL-2.0-or-later
5 * SHA-3, as specified in
8 * SHA-3 code by Jeff Garzik <jeff@garzik.org>
19 * On some 32-bit architectures (h8300), GCC ends up using
21 * in keccakf(). On the other hand, on 64-bit architectures with plenty
22 * of [64-bit wide] general purpose registers, not inlining it severely
23 * hurts performance. So let's use 64-bitness as a heuristic to decide
165 memset(sctx->st, 0, sizeof(sctx->st)); in crypto_sha3_init()
173 unsigned int rsiz = crypto_shash_blocksize(desc->tfm); in crypto_sha3_update()
181 sctx->st[i] ^= get_unaligned_le64(data + 8 * i); in crypto_sha3_update()
[all …]
/linux/lib/crypto/arm64/
H A Dsha512-ce-core.S1 /* SPDX-License-Identifier: GPL-2.0 */
3 * sha512-ce-core.S - core SHA-384/SHA-512 transform using v8 Crypto Extensions
17 * assemblers both consider the SHA-512 instructions to be part of the
20 * versions.) "sha3" doesn't make a lot of sense, since SHA-512 is part
21 * of the SHA-2 family of algorithms, and also the Arm Architecture
25 .arch armv8-a+sha3
28 * The SHA-512 round constants
102 ld1 {v8.2d-v11.2d}, [x0]
106 ld1 {v20.2d-v23.2d}, [x3], #64
109 0: ld1 {v12.2d-v15.2d}, [x1], #64
[all …]
/linux/lib/crypto/
H A Dsha1.c1 // SPDX-License-Identifier: GPL-2.0
3 * SHA-1 and HMAC-SHA1 library functions
29 * suggested by Artur Skawina - that will also make gcc unable to
50 /* This "rolls" over the 512-bit array */
55 * the input data, the next mix it from the 512-bit array.
73 * sha1_transform - single block SHA1 transform (deprecated)
76 * @data: 512 bits of data to hash
79 * This function executes SHA-1's internal compression function. It updates the
80 * 160-bit internal state (@digest) with a single 512-bit data block (@data).
82 * Don't use this function. SHA-1 is no longer considered secure. And even if
[all …]
/linux/lib/crypto/riscv/
H A Dsha512.h1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * SHA-512 and SHA-384 using the RISC-V vector crypto extensions
H A Dsha512-riscv64-zvknhb-zvkb.S1 /* SPDX-License-Identifier: Apache-2.0 OR BSD-2-Clause */
3 // This file is dual-licensed, meaning that you can use it under your
40 // The generated code of this file depends on the following RISC-V extensions:
41 // - RV64I
42 // - RISC-V Vector ('V') with VLEN >= 128
43 // - RISC-V Vector SHA-2 Secure Hash extension ('Zvknhb')
44 // - RISC-V Vector Cryptography Bit-manipulation extension ('Zvkb')
70 // Do 4 rounds of SHA-512. w0 contains the current 4 message schedule words.
73 // computes 4 more message schedule words. w1-w3 contain the next 3 groups of 4
101 // message scheduling. There are 4 words, so an 8-bit mask suffices.
[all …]
/linux/kernel/module/
H A DKconfig1 # SPDX-License-Identifier: GPL-2.0-only
64 bool "Debug duplicate modules with auto-loading"
66 Module autoloading allows in-kernel code to request modules through
75 requests are non-fatal virtual memory is a limited resource and each
80 module requests to help identify if module auto-loading may be the
93 non-wait request_module() call is synchronous and waits until modprobe
94 completes. Subsequent auto-loading requests for the same module do
102 abuse was due to module auto-loading. These issues are currently only
105 module auto-loading is not the culprit. There may very well still be
106 many duplicate module auto-loading requests which could be optimized
[all …]
/linux/lib/crypto/mips/
H A Dsha512.h1 /* SPDX-License-Identifier: GPL-2.0-or-later */
5 * SHA-512 and SHA-384 Secure Hash Algorithm.
11 * Copyright (c) Jean-Luc Cooke <jlcooke@certainkey.com>
20 * We pass everything as 64-bit. OCTEON can handle misaligned data.
33 write_octeon_64bit_hash_sha512(state->h[0], 0); in sha512_blocks()
34 write_octeon_64bit_hash_sha512(state->h[1], 1); in sha512_blocks()
35 write_octeon_64bit_hash_sha512(state->h[2], 2); in sha512_blocks()
36 write_octeon_64bit_hash_sha512(state->h[3], 3); in sha512_blocks()
37 write_octeon_64bit_hash_sha512(state->h[4], 4); in sha512_blocks()
38 write_octeon_64bit_hash_sha512(state->h[5], 5); in sha512_blocks()
[all …]
/linux/drivers/crypto/
H A DKconfig1 # SPDX-License-Identifier: GPL-2.0-only
39 called padlock-aes.
53 called padlock-sha.
61 Say 'Y' here to use the AMD Geode LX processor on-board AES
65 will be called geode-aes.
87 - A pkey base and API kernel module (pkey.ko) which offers the
89 and the sysfs API and the in-kernel API to the crypto cipher
91 - A pkey pckmo kernel module (pkey-pckmo.ko) which is automatically
94 - A pkey CCA kernel module (pkey-cca.ko) which is automatically
96 - A pkey EP11 kernel module (pkey-ep11.ko) which is automatically
[all …]
/linux/lib/crypto/s390/
H A Dsha512.h1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * SHA-512 optimized using the CP Assist for Cryptographic Functions (CPACF)
/linux/drivers/crypto/ccp/
H A Dccp-ops.c1 // SPDX-License-Identifier: GPL-2.0-only
5 * Copyright (C) 2013-2019 Advanced Micro Devices, Inc.
15 #include <linux/dma-mapping.h>
20 #include "ccp-dev.h"
22 /* SHA initial context values */
57 #define CCP_NEW_JOBID(ccp) ((ccp->vdata->version == CCP_VERSION(3, 0)) ? \
62 return atomic_inc_return(&ccp->current_id) & CCP_JOBID_MASK; in ccp_gen_jobid()
67 if (wa->dma_count) in ccp_sg_free()
68 dma_unmap_sg(wa->dma_dev, wa->dma_sg_head, wa->nents, wa->dma_dir); in ccp_sg_free()
70 wa->dma_count = 0; in ccp_sg_free()
[all …]

123