Home
last modified time | relevance | path

Searched +full:fips +full:- +full:140 +full:- +full:2 (Results 1 – 8 of 8) sorted by relevance

/linux-6.14.4/include/crypto/
Dxts.h1 /* SPDX-License-Identifier: GPL-2.0 */
7 #include <linux/fips.h>
18 if (keylen % 2) in xts_verify_key()
19 return -EINVAL; in xts_verify_key()
22 * In FIPS mode only a combined key length of either 256 or in xts_verify_key()
23 * 512 bits is allowed, c.f. FIPS 140-3 IG C.I. in xts_verify_key()
26 return -EINVAL; in xts_verify_key()
30 * in FIPS mode or the FORBID_WEAK_KEYS flag is set. in xts_verify_key()
34 !crypto_memneq(key, key + (keylen / 2), keylen / 2)) in xts_verify_key()
35 return -EINVAL; in xts_verify_key()
Ddrbg.h2 * DRBG based on NIST SP800-90A
12 * 2. Redistributions in binary form must reproduce the above copyright
23 * the restrictions contained in a BSD-style copyright.)
52 #include <linux/fips.h>
60 * SP800-90A requires the concatenation of different data. To avoid copying
76 string->buf = buf; in drbg_string_fill()
77 string->len = len; in drbg_string_fill()
78 INIT_LIST_HEAD(&string->list); in drbg_string_fill()
121 /* Number of RNG requests since last reseed -- 10.1.1.1 1c) */
140 unsigned char *prev; /* FIPS 140-2 continuous test value */
[all …]
/linux-6.14.4/Documentation/devicetree/bindings/rng/
Dsilex-insight,ba431-rng.yaml1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
3 ---
4 $id: http://devicetree.org/schemas/rng/silex-insight,ba431-rng.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
10 The BA431 hardware random number generator is an IP that is FIPS-140-2/3
14 - Olivier Sobrie <[email protected]>
18 const: silex-insight,ba431-rng
24 - compatible
25 - reg
30 - |
[all …]
/linux-6.14.4/crypto/
Djitterentropy-kcapi.c2 * Non-physical true random number generator based on timing jitter --
5 * Copyright Stephan Mueller <[email protected]>, 2015 - 2023
13 * 2. Redistributions in binary form must reproduce the above copyright
24 * the restrictions contained in a BSD-style copyright.)
42 #include <linux/fips.h>
51 #define JENT_CONDITIONING_HASH "sha3-256-generic"
78 * Obtain a high-resolution time stamp value. The time stamp is used to measure
83 * implement a high-resolution time stamp, the RNG code's runtime test
109 SHASH_DESC_ON_STACK(desc, hash_state_desc->tfm); in jent_hash_time()
114 desc->tfm = hash_state_desc->tfm; in jent_hash_time()
[all …]
Djitterentropy.c2 * Non-physical true random number generator based on timing jitter --
5 * Copyright Stephan Mueller <[email protected]>, 2015 - 2023
21 * 2. Redistributions in binary form must reproduce the above copyright
32 * the restrictions contained in a BSD-style copyright.)
54 … be compiled with optimizations. See documentation. Use the compiler switch -O0 for compiling jitt…
65 /* SHA3-256 is used as conditioner */
99 #define JENT_APT_WORD_MASK (JENT_APT_LSB - 1)
109 #define JENT_DISABLE_MEMORY_ACCESS (1<<2) /* Disable memory access for more
113 /* -- error codes for init function -- */
115 #define JENT_ECOARSETIME 2 /* Timer too coarse for RNG */
[all …]
Ddrbg.c3 * Based on NIST Recommended DRBG from NIST SP800-90A with the following
5 * * CTR DRBG with DF with AES-128, AES-192, AES-256 cores
6 * * Hash DRBG with DF with SHA-1, SHA-256, SHA-384, SHA-512 cores
7 * * HMAC DRBG with DF with SHA-1, SHA-256, SHA-384, SHA-512 cores
18 * 2. Redistributions in binary form must reproduce the above copyright
29 * the restrictions contained in a BSD-style copyright.)
46 * The SP 800-90A DRBG allows the user to specify a personalization string
52 * ---------------------------------
63 * -------------------------------------------------------
68 * char personalization[11] = "some-string";
[all …]
/linux-6.14.4/drivers/char/hw_random/
Drockchip-rng.c1 // SPDX-License-Identifier: GPL-2.0
3 * rockchip-rng.c True Random Number Generator driver for Rockchip RK3568 SoC
8 * Lin Jinhan <troy.lin@rock-chips.com>
31 * of ~900 (~87.5% of FIPS 140-2 successes).
35 /* TRNG registers from RK3568 TRM-Part2, section 5.4.1 */
42 #define TRNG_RNG_CTL_OSC_RING_SPEED_0 (0x00 << 2)
43 #define TRNG_RNG_CTL_OSC_RING_SPEED_1 (0x01 << 2)
44 #define TRNG_RNG_CTL_OSC_RING_SPEED_2 (0x02 << 2)
45 #define TRNG_RNG_CTL_OSC_RING_SPEED_3 (0x03 << 2)
62 writel((mask << 16) | val, rng->base + TRNG_RNG_CTL); in rk_rng_write_ctl()
[all …]
/linux-6.14.4/arch/s390/crypto/
Dprng.c1 // SPDX-License-Identifier: GPL-2.0
13 #include <linux/fips.h>
38 #define PRNG_MODE_SHA512 2
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
74 #define PRNG_SELFTEST_FAILED 2
120 * the random bytes given back is assumed to have at least 50% - meaning
121 * a 64 bytes buffer has at least 64 * 8 / 2 = 256 bits of entropy.
128 * here we use the lower 4 bytes and exor the values into 2k of bufferspace.
131 * get_random_bytes(), so this function consumes 2k of urandom for each
[all …]