Home
last modified time | relevance | path

Searched full:rng (Results 1 – 25 of 328) sorted by relevance

12345678910>>...14

/freebsd/sys/contrib/pcg-c/include/
H A Dpcg_variants.h403 static inline void pcg_oneseq_8_step_r(struct pcg_state_8* rng) in pcg_oneseq_8_step_r() argument
405 rng->state = rng->state * PCG_DEFAULT_MULTIPLIER_8 in pcg_oneseq_8_step_r()
409 static inline void pcg_oneseq_8_advance_r(struct pcg_state_8* rng, uint8_t delta) in pcg_oneseq_8_advance_r() argument
411 rng->state = pcg_advance_lcg_8(rng->state, delta, PCG_DEFAULT_MULTIPLIER_8, in pcg_oneseq_8_advance_r()
415 static inline void pcg_mcg_8_step_r(struct pcg_state_8* rng) in pcg_mcg_8_step_r() argument
417 rng->state = rng->state * PCG_DEFAULT_MULTIPLIER_8; in pcg_mcg_8_step_r()
420 static inline void pcg_mcg_8_advance_r(struct pcg_state_8* rng, uint8_t delta) in pcg_mcg_8_advance_r() argument
422 rng->state in pcg_mcg_8_advance_r()
423 = pcg_advance_lcg_8(rng->state, delta, PCG_DEFAULT_MULTIPLIER_8, 0u); in pcg_mcg_8_advance_r()
426 static inline void pcg_unique_8_step_r(struct pcg_state_8* rng) in pcg_unique_8_step_r() argument
[all …]
/freebsd/sys/dev/random/fenestrasX/
H A Dfx_brng.c53 * 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
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()
91 struct fxrng_buffered_rng *rng; in fxrng_brng_src_reseed() local
93 rng = &fxrng_root; in fxrng_brng_src_reseed()
94 FXRNG_BRNG_ASSERT(rng); in fxrng_brng_src_reseed()
95 ASSERT_DEBUG(rng->brng_generation > 0, "root RNG not seeded"); in fxrng_brng_src_reseed()
97 fxrng_rng_src_reseed(&rng->brng_rng, event); in fxrng_brng_src_reseed()
[all …]
H A Dfx_rng.c114 * 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()
139 fxrng_chacha_nonce_add64(&rng->rng_prf, blockcount); in fxrng_rng_genrandom_internal()
142 chacha_keysetup(&rng->rng_prf, newkey, sizeof(newkey) * 8); in fxrng_rng_genrandom_internal()
145 FXRNG_RNG_UNLOCK(rng); in fxrng_rng_genrandom_internal()
147 p_ctx = &rng->rng_prf; in fxrng_rng_genrandom_internal()
154 FXRNG_RNG_ASSERT_NOT(rng); in fxrng_rng_genrandom_internal()
[all …]
H A Dfx_rng.h36 #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
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()
54 mtx_init(&rng->rng_lk, "fx pcpu brng lk", NULL, MTX_DEF); in fxrng_rng_init()
58 fxrng_rng_setkey(struct fxrng_basic_rng *rng, const void *newkey, size_t len) in fxrng_rng_setkey() argument
61 chacha_keysetup(&rng->rng_prf, newkey, len * 8); in fxrng_rng_setkey()
H A Dfx_main.c36 * The Windows 10 RNG bears some similarity to Fortuna, which Ferguson was also
56 * interpretation of the document is that the Windows RNG infrastructure
145 struct fxrng_buffered_rng **pcpu_brng_p, *rng, *tmp; in _fxrng_alg_read() local
157 rng = (void *)atomic_load_acq_ptr((uintptr_t *)pcpu_brng_p); in _fxrng_alg_read()
164 if (__predict_false(rng == NULL)) { in _fxrng_alg_read()
190 rng = malloc_domainset(sizeof(*rng), M_ENTROPY, ds, in _fxrng_alg_read()
192 if (rng == NULL) { in _fxrng_alg_read()
194 rng = &fxrng_root; in _fxrng_alg_read()
198 fxrng_brng_init(rng); in _fxrng_alg_read()
211 FXRNG_BRNG_LOCK(rng); in _fxrng_alg_read()
[all …]
/freebsd/sys/contrib/device-tree/Bindings/rng/
H A Dmtk-rng.yaml4 $id: http://devicetree.org/schemas/rng/mtk-rng.yaml#
14 pattern: "^rng@[0-9a-f]+$"
19 - mediatek,mt7623-rng
22 - mediatek,mt7622-rng
23 - mediatek,mt7629-rng
24 - mediatek,mt7986-rng
25 - mediatek,mt8365-rng
26 - mediatek,mt8516-rng
27 - const: mediatek,mt7623-rng
37 - const: rng
[all …]
H A Dmtk-rng.txt6 "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
12 - clock-names : Should contain "rng" entries;
17 rng: rng@1020f000 {
18 compatible = "mediatek,mt7623-rng";
21 clock-names = "rng";
H A Dbrcm,bcm2835.yaml4 $id: http://devicetree.org/schemas/rng/brcm,bcm2835.yaml#
17 - brcm,bcm2835-rng
18 - brcm,bcm-nsp-rng
19 - brcm,bcm5301x-rng
20 - brcm,bcm6368-rng
48 - brcm,bcm6368-rng
60 rng@7e104000 {
61 compatible = "brcm,bcm2835-rng";
67 rng@18033000 {
68 compatible = "brcm,bcm-nsp-rng";
[all …]
H A Domap_rng.txt6 RNG versions:
7 - "ti,omap2-rng" for OMAP2.
8 - "ti,omap4-rng" for OMAP4, OMAP5 and AM33XX.
11 - ti,hwmods: Name of the hwmod associated with the RNG module
13 - interrupts : the interrupt number for the RNG module.
14 Used for "ti,omap4-rng" and "inside-secure,safexcel-eip76"
25 rng: rng@48310000 {
26 compatible = "ti,omap4-rng";
27 ti,hwmods = "rng";
33 trng: rng@f2760000 {
H A Domap_rng.yaml4 $id: http://devicetree.org/schemas/rng/omap_rng.yaml#
15 - ti,omap2-rng
16 - ti,omap4-rng
20 const: rng
22 description: Name of the hwmod associated with the RNG module
49 - ti,omap4-rng
66 rng: rng@48310000 {
67 compatible = "ti,omap4-rng";
68 ti,hwmods = "rng";
[all...]
H A Dsparc_sun_oracle_rng.txt6 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
18 rng-#units: 00000002
19 compatible: 'ORCL,m4-rng'
25 rng-#units: 00000003
26 compatible: 'ORCL,m7-rng'
H A Dingenic,rng.yaml4 $id: http://devicetree.org/schemas/rng/ingenic,rng.yaml#
7 title: RNG in Ingenic SoCs
18 - ingenic,jz4780-rng
19 - ingenic,x1000-rng
32 rng: rng@d8 {
33 compatible = "ingenic,jz4780-rng";
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
9 Definition: must be "nokia,n900-rom-rng"
14 Definition: reference to the the RNG interface clock
23 rom_rng: rng {
24 compatible = "nokia,n900-rom-rng";
H A Dintel,ixp46x-rng.yaml4 $id: http://devicetree.org/schemas/rng/intel,ixp46x-rng.yaml#
7 title: Intel IXP46x RNG
19 const: intel,ixp46x-rng
32 rng@70002100 {
33 compatible = "intel,ixp46x-rng";
H A Dsilex-insight,ba431-rng.yaml4 $id: http://devicetree.org/schemas/rng/silex-insight,ba431-rng.yaml#
7 title: Silex Insight BA431 RNG
18 const: silex-insight,ba431-rng
31 rng@42800000 {
32 compatible = "silex-insight,ba431-rng";
H A Dnuvoton,npcm-rng.yaml4 $id: http://devicetree.org/schemas/rng/nuvoton,npcm-rng.yaml#
20 - nuvoton,npcm750-rng
21 - nuvoton,npcm845-rng
34 rng@f000b000 {
35 compatible = "nuvoton,npcm750-rng";
H A Dti,omap-rom-rng.yaml4 $id: http://devicetree.org/schemas/rng/ti,omap-rom-rng.yaml#
14 Secure SoCs may provide RNG via secure ROM calls like Nokia N900 does.
19 const: nokia,n900-rom-rng
37 rng {
38 compatible = "nokia,n900-rom-rng";
H A Dst,stm32-rng.yaml4 $id: http://devicetree.org/schemas/rng/st,stm32-rng.yaml#
7 title: STMicroelectronics STM32 RNG
19 - st,stm32-rng
20 - st,stm32mp13-rng
35 st,rng-lock-conf:
37 description: If set, the RNG configuration in RNG_CR, RNG_HTCR and
51 - st,stm32-rng
54 st,rng-lock-conf: false
61 rng
[all...]
H A Dmicrochip,pic32-rng.txt3 The PIC32 RNG provides a pseudo random number generator which can be seeded by
7 - compatible : should be "microchip,pic32mzda-rng"
13 rng: rng@1f8e6000 {
14 compatible = "microchip,pic32mzda-rng";
H A Dapm,rng.txt5 - compatible : should be "apm,xgene-rng"
8 - interrupts : specify the fault interrupt for the RNG device
12 rng: rng@10520000 {
13 compatible = "apm,xgene-rng";
H A Dst,rng.yaml4 $id: http://devicetree.org/schemas/rng/st,rng.yaml#
14 const: st,rng
31 rng@fee80000 {
32 compatible = "st,rng";
/freebsd/contrib/bc/src/
H A Drand.c38 * Code for the RNG.
392 * @param rng The PRNG on the top of the stack. Must have been seeded.
395 bc_rand_seedZeroes(BcRNG* r, BcRNGData* rng, size_t idx) in bc_rand_seedZeroes() argument
413 bc_rand_copy(bc_vec_item_rev(&r->v, i), rng); in bc_rand_seedZeroes()
419 bc_rand_srand(BcRNGData* rng) in bc_rand_srand() argument
432 bc_rand_fill(rng, bc_rand_frand, &fd); in bc_rand_srand()
442 bc_rand_fill(rng, bc_rand_frand, &fd); in bc_rand_srand()
448 bc_rand_fill(rng, bc_rand_winrand, NULL); in bc_rand_srand()
452 while (BC_ERR(BC_RAND_ZERO(rng))) in bc_rand_srand()
454 bc_rand_fill(rng, bc_rand_ran in bc_rand_srand()
467 bc_rand_propagate(BcRNG * r,BcRNGData * rng) bc_rand_propagate() argument
499 BcRNGData* rng = bc_vec_top(&r->v); bc_rand_int() local
539 BcRNGData* rng = bc_vec_top(&r->v); bc_rand_seed() local
588 BcRNGData* rng = bc_vec_top(&r->v); bc_rand_getRands() local
607 BcRNGData* rng = bc_vec_pushEmpty(&r->v); bc_rand_push() local
[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},
157 {"brcm,bcm2838-rng", (uintptr_t)&bcm2838_rng_conf},
[all …]
/freebsd/contrib/ntp/sntp/libopts/
H A Dnumeric.c47 const struct {long const rmin, rmax;} * rng = rng_table; in optionShowRange() local
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()
79 fprintf(option_usage_fp, zRangeAbove, pz_indent, rng->rmin); in optionShowRange()
81 fprintf(option_usage_fp, zRange, pz_indent, rng->rmin, in optionShowRange()
82 rng->rmax); in optionShowRange()
89 rng++; in optionShowRange()
/freebsd/contrib/llvm-project/llvm/include/llvm/Support/
H A DRandomNumberGenerator.h1 //==- llvm/Support/RandomNumberGenerator.h - RNG for diversity ---*- C++ -*-==//
10 // generation (RNG). Note that the current implementation is not
29 /// seed should be set by passing the -rng-seed=<uint64> option. Use
30 /// Module::createRNG to create a new RNG instance for use with that
36 // This RNG is deterministically portable across C++11
50 /// Seeds and salts the underlying RNG engine.
53 /// Module::createRNG to create a new RNG salted with the Module ID.

12345678910>>...14