Home
last modified time | relevance | path

Searched +full:rng +full:- (Results 1 – 25 of 391) sorted by relevance

12345678910>>...16

/freebsd/sys/contrib/pcg-c/include/
H A Dpcg_variants.h4 * Copyright 2014-2019 Melissa O'Neill <oneill@pcg-random.org>,
7 * SPDX-License-Identifier: (Apache-2.0 OR MIT)
10 * LICENSE-APACHE.txt and at http://www.apache.org/licenses/LICENSE-2.0)
11 * or under the MIT license (provided in LICENSE-MIT.txt and at
19 * visit http://www.pcg-random.org/.
30 * (from https://github.com/draperlaboratory/llvm-cbe), and then
33 * Much of the remaining code was generated by C-preprocessor metaprogramming.
66 return (value >> rot) | (value << ((- rot) & 7)); in pcg_rotr_8()
76 return (value >> rot) | (value << ((- rot) & 15)); in pcg_rotr_16()
86 return (value >> rot) | (value << ((- rot) & 31)); in pcg_rotr_32()
[all …]
/freebsd/sys/dev/random/fenestrasX/
H A Dfx_brng.c1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
53 * Implementation of a buffered RNG, described in § 1.2-1.4 of the whitepaper.
57 * Initialize a buffered rng instance (either the static root instance, or a
58 * per-cpu instance on the heap. Both should be zero initialized before this
62 fxrng_brng_init(struct fxrng_buffered_rng *rng) in fxrng_brng_init() argument
64 fxrng_rng_init(&rng->brng_rng, rng == &fxrng_root); in fxrng_brng_init()
67 rng->brng_avail_idx = sizeof(rng->brng_buffer); in fxrng_brng_init()
80 * Directly reseed the root BRNG from a first-time entropy source,
91 struct fxrng_buffered_rng *rng; in fxrng_brng_src_reseed() local
[all …]
H A Dfx_rng.c1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
47 #include <crypto/rijndael/rijndael-api-fst.h>
74 nbytes -= chunklen; in fxrng_rng_keystream_internal()
86 uint128_t ctr; /* Native-endian. */ in fxrng_chacha_nonce_add64()
114 * RNG lock is required on entry. If return_unlocked is true, RNG lock will
118 fxrng_rng_genrandom_internal(struct fxrng_basic_rng *rng, void *buf, in fxrng_rng_genrandom_internal() argument
125 FXRNG_RNG_ASSERT(rng); in fxrng_rng_genrandom_internal()
128 fxrng_rng_keystream_internal(&rng->rng_prf, newkey, sizeof(newkey)); in fxrng_rng_genrandom_internal()
131 memcpy(&ctx_copy, &rng->rng_prf, sizeof(ctx_copy)); in fxrng_rng_genrandom_internal()
[all …]
H A Dfx_rng.h1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
36 #define FXRNG_RNG_LOCK(rng) mtx_lock(&(rng)->rng_lk) argument
37 #define FXRNG_RNG_UNLOCK(rng) mtx_unlock(&(rng)->rng_lk) argument
38 #define FXRNG_RNG_ASSERT(rng) mtx_assert(&(rng)->rng_lk, MA_OWNED) argument
39 #define FXRNG_RNG_ASSERT_NOT(rng) mtx_assert(&(rng)->rng_lk, MA_NOTOWNED) argument
40 /* CTR-mode cipher state, including 128-bit embedded counter. */
45 * Initialize a basic rng instance (half of a buffered FX BRNG).
49 fxrng_rng_init(struct fxrng_basic_rng *rng, bool is_root_rng) in fxrng_rng_init() argument
52 mtx_init(&rng->rng_lk, "fx root brng lk", NULL, MTX_DEF); in fxrng_rng_init()
[all …]
H A Dfx_main.c1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
33 * It is also inspired by DJB's writing on buffered key-erasure PRNGs:
34 * https://blog.cr.yp.to/20170723-random.html
36 * The Windows 10 RNG bears some similarity to Fortuna, which Ferguson was also
38 * - Extended to multi-CPU design
39 * - Extended to pre-buffer some PRNG output
40 * - Pool-based reseeding is solely time-based (rather than on-access w/
42 * - Extended to specify efficient userspace design
43 * - Always-available design (requires the equivalent of loader(8) for all
[all …]
/freebsd/sys/contrib/device-tree/Bindings/rng/
H A Dmtk-rng.yaml1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
3 ---
4 $id: http://devicetree.org/schemas/rng/mtk-rng.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
10 - Sean Wang <sean.wang@mediatek.com>
14 pattern: "^rng@[0-9a-f]+$"
18 - enum:
19 - mediatek,mt7623-rng
20 - items:
21 - enum:
[all …]
H A Dst,stm32-rng.yaml1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
3 ---
4 $id: http://devicetree.org/schemas/rng/st,stm32-rng.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: STMicroelectronics STM32 RNG
14 - Lionel Debieve <lionel.debieve@foss.st.com>
19 - st,stm32-rng
20 - st,stm32mp13-rng
21 - st,stm32mp25-rng
30 clock-names:
[all …]
H A Dmtk-rng.txt1 Device-Tree bindings for Mediatek random number generator
5 - compatible : Should be
6 "mediatek,mt7622-rng", "mediatek,mt7623-rng" : for MT7622
7 "mediatek,mt7629-rng", "mediatek,mt7623-rng" : for MT7629
8 "mediatek,mt7623-rng" : for MT7623
9 "mediatek,mt8516-rng", "mediatek,mt7623-rng" : for MT8516
10 - clocks : list of clock specifiers, corresponding to
11 entries in clock-names property;
12 - clock-names : Should contain "rng" entries;
13 - reg : Specifies base physical address and size of the registers
[all …]
H A Dbrcm,bcm2835.yaml1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
3 ---
4 $id: http://devicetree.org/schemas/rng/brcm,bcm2835.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
10 - Stefan Wahren <stefan.wahren@i2se.com>
11 - Florian Fainelli <f.fainelli@gmail.com>
12 - Herbert Xu <herbert@gondor.apana.org.au>
17 - brcm,bcm2835-rng
18 - brcm,bcm-nsp-rng
19 - brcm,bcm5301x-rng
[all …]
H A Dinside-secure,safexcel-eip76.yaml1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
3 ---
4 $id: http://devicetree.org/schemas/rng/inside-secure,safexcel-eip76.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: Inside-Secure HWRNG Module
10 - Jayesh Choudhary <j-choudhary@ti.com>
15 - enum:
16 - ti,omap2-rng
17 - ti,omap4-rng
18 - inside-secure,safexcel-eip76
[all …]
H A Domap_rng.txt1 OMAP SoC and Inside-Secure HWRNG Module
5 - compatible : Should contain entries for this and backward compatible
6 RNG versions:
7 - "ti,omap2-rng" for OMAP2.
8 - "ti,omap4-rng" for OMAP4, OMAP5 and AM33XX.
9 - "inside-secure,safexcel-eip76" for SoCs with EIP76 IP block
11 - ti,hwmods: Name of the hwmod associated with the RNG module
12 - reg : Offset and length of the register set for the module
13 - interrupts : the interrupt number for the RNG module.
14 Used for "ti,omap4-rng" and "inside-secure,safexcel-eip76"
[all …]
H A Domap_rng.yaml1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
3 ---
4 $id: http://devicetree.org/schemas/rng/omap_rn
[all...]
H A Dsparc_sun_oracle_rng.txt4 - reg : base address to sample from
5 - compatible : should contain one of the following
6 RNG versions:
7 - 'SUNW,n2-rng' for Niagara 2 Platform (SUN UltraSPARC T2 CPU)
8 - 'SUNW,vf-rng' for Victoria Falls Platform (SUN UltraSPARC T2 Plus CPU)
9- 'SUNW,kt-rng' for Rainbow/Yosemite Falls Platform (SUN SPARC T3/T4), (UltraSPARC KT/Niagara 3 -
11 - 'ORCL,m4-rng' for SPARC T5/M5
12 - 'ORCL,m7-rng' for SPARC T7/M7
15 /* linux LDOM on SPARC T5-2 */
18 rng-#units: 00000002
[all …]
H A Dingenic,rng.yaml1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
3 ---
4 $id: http://devicetree.org/schemas/rng/ingenic,rng.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: RNG in Ingenic SoCs
10 - 周琰杰 (Zhou Yanjie) <zhouyanjie@wanyeetech.com>
18 - ingenic,jz4780-rng
19 - ingenic,x1000-rng
25 - compatible
26 - reg
[all …]
H A Domap3_rom_rng.txt1 OMAP ROM RNG driver binding
3 Secure SoCs may provide RNG via secure ROM calls like Nokia N900 does. The
6 - compatible:
9 Definition: must be "nokia,n900-rom-rng"
11 - clocks:
13 Value type: <prop-encoded-array>
14 Definition: reference to the the RNG interface clock
16 - clock-names:
23 rom_rng: rng {
24 compatible = "nokia,n900-rom-rng";
[all …]
H A Damlogic,meson-rng.yaml1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
4 ---
5 $id: http://devicetree.org/schemas/rng/amlogic,meson-rng.yaml#
6 $schema: http://devicetree.org/meta-schemas/core.yaml#
11 - Neil Armstrong <neil.armstrong@linaro.org>
16 - amlogic,meson-rng
17 - amlogic,meson-s4-rng
25 clock-names:
27 - const: core
29 power-domains:
[all …]
H A 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#
7 title: Silex Insight BA431 RNG
10 The BA431 hardware random number generator is an IP that is FIPS-140-2/3
14 - Olivier Sobrie <olivier.sobrie@silexinsight.com>
18 const: silex-insight,ba431-rng
24 - compatible
25 - reg
[all …]
H A Dintel,ixp46x-rng.yaml1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
3 ---
4 $id: http://devicetree.org/schemas/rng/intel,ixp46x-rng.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: Intel IXP46x RNG
15 - Linus Walleij <linus.walleij@linaro.org>
19 const: intel,ixp46x-rng
25 - compatible
26 - reg
31 - |
[all …]
H A Dti,omap-rom-rng.yaml1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
3 ---
4 $id: http://devicetree.org/schemas/rng/ti,omap-rom-rng.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
10 - Pali Rohár <pali@kernel.org>
11 - Tony Lindgren <tony@atomide.com>
14 Secure SoCs may provide RNG via secure ROM calls like Nokia N900 does.
19 const: nokia,n900-rom-rng
24 clock-names:
26 - const: ick
[all …]
H A Dnuvoton,npcm-rng.yaml1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
3 ---
4 $id: http://devicetree.org/schemas/rng/nuvoton,npcm-rng.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
10 - Avi Fishman <avifishman70@gmail.com>
11 - Tomer Maimon <tmaimon77@gmail.com>
12 - Tali Perry <tali.perry1@gmail.com>
13 - Patrick Venture <venture@google.com>
14 - Nancy Yuen <yuenn@google.com>
15 - Benjamin Fair <benjaminfair@google.com>
[all …]
/freebsd/contrib/bc/src/
H A Drand.c9 * https://github.com/imneme/pcg-c
11 * -----------------------------------------------------------------------------
15 * Copyright (c) 2014-2017 Melissa O'Neill and PCG Project contributors
16 * Copyright (c) 2018-2025 Gavin D. Howard and contributors.
38 * Code for the RNG.
64 * Adds two 64-bit values and preserves the overflow.
81 * Adds two 128-bit values and discards the overflow.
99 * Multiplies two 64-bit values and preserves the overflow.
129 * Multiplies two 128-bit values and discards the overflow.
161 r->inc |= (BcRandState) 1UL; in bc_rand_setModified()
[all …]
/freebsd/sys/contrib/edk2/Include/Guid/
H A DRng.h2 Random Number Generator (RNG) GUIDs and structures shared across RNG interfaces.
4 Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
6 SPDX-License-Identifier: BSD-2-Clause-Patent
23 /// The algorithms corresponds to SP800-90 as defined in
24 /// NIST SP 800-90, "Recommendation for Random Number Generation Using Deterministic Random
43 /// the 3-Key Triple DES and AES Algorithm", January 2005.
65 /// with NIST SP800-90A, while not mandating a particular algorithm, so as to be
82 @param[out] RNGAlgorithmList A caller-allocated memory buffer filled by the driver
84 RNG algorithm. The list must not change across multiple
88 @retval EFI_SUCCESS The RNG algorithm list was returned successfully.
[all …]
/freebsd/sys/arm/broadcom/bcm2835/
H A Dbcm2835_rng.c56 #define RNG_CTRL 0x00 /* RNG Control Register */
67 #define RNG_RBGEN_BIT 0x00000001 /* Enable RNG bit */
69 #define BCM2835_RNG_STATUS 0x04 /* BCM2835 RNG status register */
70 #define BCM2838_RNG_STATUS 0x18 /* BCM2838 RNG status register */
77 #define BCM2835_RND_VAL_WARM_CNT 0x40000 /* RNG Warm Up count */
78 #define BCM2835_RND_WARM_CNT 0xfffff /* RNG Warm Up Count mask */
80 #define BCM2835_RNG_DATA 0x08 /* RNG Data Register */
153 {"broadcom,bcm2835-rng", (uintptr_t)&bcm2835_rng_conf},
154 {"brcm,bcm2835-rng", (uintptr_t)&bcm2835_rng_conf},
156 {"brcm,bcm2711-rng200", (uintptr_t)&bcm2838_rng_conf},
[all …]
/freebsd/crypto/openssl/crypto/rand/
H A Dprov_seed.c2 * Copyright 2020-2023 The OpenSSL Project Authors. All Rights Reserved.
48 EVP_RAND_CTX *rng = ossl_rand_get0_seed_noncreating(ctx); in ossl_rand_get_user_entropy() local
50 if (rng != NULL && evp_rand_can_seed(rng)) in ossl_rand_get_user_entropy()
51 return evp_rand_get_seed(rng, pout, entropy, min_len, max_len, in ossl_rand_get_user_entropy()
66 EVP_RAND_CTX *rng = ossl_rand_get0_seed_noncreating(ctx); in ossl_rand_cleanup_user_entropy() local
68 if (rng != NULL && evp_rand_can_seed(rng)) in ossl_rand_cleanup_user_entropy()
69 evp_rand_clear_seed(rng, buf, len); in ossl_rand_cleanup_user_entropy()
106 EVP_RAND_CTX *rng = ossl_rand_get0_seed_noncreating(ctx); in ossl_rand_get_user_nonce() local
108 if (rng == NULL) in ossl_rand_get_user_nonce()
114 if (!EVP_RAND_generate(rng, buf, min_len, 0, 0, salt, salt_len)) { in ossl_rand_get_user_nonce()
/freebsd/contrib/ntp/sntp/libopts/
H A Dnumeric.c13 * AutoOpts is Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
47 const struct {long const rmin, rmax;} * rng = rng_table; in optionShowRange() local
60 fprintf(option_usage_fp, zRangeErr, pOpts->pzProgName, in optionShowRange()
61 pOD->pz_Name, pOD->optArg.argInt); in optionShowRange()
65 if (pOD->fOptState & OPTST_SCALED_NUM) in optionShowRange()
74 if (rng->rmax == LONG_MIN) in optionShowRange()
75 fprintf(option_usage_fp, zRangeExact, pz_indent, rng->rmin); in optionShowRange()
76 else if (rng->rmin == LONG_MIN) in optionShowRange()
77 fprintf(option_usage_fp, zRangeUpto, pz_indent, rng->rmax); in optionShowRange()
78 else if (rng->rmax == LONG_MAX) in optionShowRange()
[all …]

12345678910>>...16