Displaying 15 results from an estimated 15 matches for "arc4random_uniform".
2023 Oct 19
12
[Bug 3629] New: Building with Clang-17 fails due to -fzero-call-used-regs
https://bugzilla.mindrot.org/show_bug.cgi?id=3629
Bug ID: 3629
Summary: Building with Clang-17 fails due to
-fzero-call-used-regs
Product: Portable OpenSSH
Version: 9.5p1
Hardware: amd64
OS: Mac OS X
Status: NEW
Severity: critical
Priority: P5
Component: Build system
2014 Jul 12
1
openssh portable and libressl portable cause recursion between arc4random and RAND_bytes
Hi,
Yesterday I tried to replace the system openssl in a gentoo system with
libressl.
With openssh an interesting issue popped up:
* RAND_bytes in libressl calls arc4random
* arc4random is a compat function both in openssh and libressl
* arc4random from openssh uses RAND_bytes
So what's happening is a recursion. arc4random wants to use RAND_bytes
and RAND_bytes wants to use arc4random. The
2013 Nov 14
1
Re: make_random_password(): avoid modulo bias, and do not deplete system entropy (#9)
...doesn't matter, but you never know when someone copy+pastes your code into their project thinking this is a proper way to generate random passwords, so IMHO its best to avoid the modulo bias.
> See here for more details: http://eternallyconfuzzled.com/arts/jsw_art_rand.aspx
> And see arc4random_uniform's implementation: http://www.openbsd.org/cgi-bin/cvsweb/src/lib/libc/crypt/arc4random.c?rev=1.26;content-type=text%2Fplain
>
> 3. The generated password needs ~2^107 brute-force attempts (16 * log2(60) + log2(default_rounds=5000)), which is more than enough of course, but usually 128...
2018 Sep 20
5
Bias in R's random integers?
On 9/20/18 1:43 AM, Carl Boettiger wrote:
> For a well-tested C algorithm, based on my reading of Lemire, the unbiased
> "algorithm 3" in https://arxiv.org/abs/1805.10941 is part already of the C
> standard library in OpenBSD and macOS (as arc4random_uniform), and in the
> GNU standard library. Lemire also provides C++ code in the appendix of his
> piece for both this and the faster "nearly divisionless" algorithm.
>
> It would be excellent if any R core members were interested in considering
> bindings to these algorithms as...
2018 Sep 20
4
Bias in R's random integers?
...On 9/20/18 1:43 AM, Carl Boettiger wrote:
> >> For a well-tested C algorithm, based on my reading of Lemire, the
> >> unbiased "algorithm 3" in https://arxiv.org/abs/1805.10941 is part
> >> already of the C standard library in OpenBSD and macOS (as
> >> arc4random_uniform), and in the GNU standard library. Lemire also
> >> provides C++ code in the appendix of his piece for both this and the
> >> faster "nearly divisionless" algorithm.
> >>
> >> It would be excellent if any R core members were interested in
> >>...
2018 Sep 20
0
Bias in R's random integers?
...AM, Ralf Stubner wrote:
> On 9/20/18 1:43 AM, Carl Boettiger wrote:
>> For a well-tested C algorithm, based on my reading of Lemire, the unbiased
>> "algorithm 3" in https://arxiv.org/abs/1805.10941 is part already of the C
>> standard library in OpenBSD and macOS (as arc4random_uniform), and in the
>> GNU standard library. Lemire also provides C++ code in the appendix of his
>> piece for both this and the faster "nearly divisionless" algorithm.
>>
>> It would be excellent if any R core members were interested in considering
>> bindings to...
2023 Sep 07
1
Privacy improving suggestions for ObscureKeystrokeTiming
...rval */
+ if (fuzz_ns > INT_MAX)
+ fuzz_ns = INT_MAX;
+ if (fuzz_ns > interval_ns) {
+ /* Shouldn't happen */
+ fatal_f("internal error: fuzz %u%% %lldns > interval %lldns",
+ interval_fuzz_pct, fuzz_ns, interval_ns);
+ }
+ interval_ns -= fuzz_ns / 2;
+ interval_ns += arc4random_uniform(fuzz_ns);
+
+ tmp.tv_sec = interval_ns / (1000 * 1000 * 1000);
+ tmp.tv_nsec = interval_ns % (1000 * 1000 * 1000);
+
+ timespecadd(now, &tmp, next_interval);
+}
+
/*
* Performs keystroke timing obfuscation. Returns non-zero if the
* output fd should be polled.
@@ -586,8 +616,9 @@ obfuscate...
2018 Sep 21
0
Bias in R's random integers?
...Carl Boettiger wrote:
> > >> For a well-tested C algorithm, based on my reading of Lemire, the
> > >> unbiased "algorithm 3" in https://arxiv.org/abs/1805.10941 is part
> > >> already of the C standard library in OpenBSD and macOS (as
> > >> arc4random_uniform), and in the GNU standard library. Lemire also
> > >> provides C++ code in the appendix of his piece for both this and the
> > >> faster "nearly divisionless" algorithm.
> > >>
> > >> It would be excellent if any R core members were intere...
2023 Oct 31
1
9.3p1 Daemon Rejects Client Connections on armv7l-dey-linux-gnueabihf w/ GCC 10/11/12
...if ${CC} supports compile flag -fzero-call-used-regs=all
if ${CC} supports compile flag -ftrivial-auto-var-init=zero
for sys/sysctl.h
for library containing login
for closefrom
for close_range
for library containing dlopen
for arc4random
for arc4random_buf
for arc4random_uniform
if libc defines sys_errlist
if libc defines sys_nerr
for library containing res_query
for library containing dn_expand
if res_query will link
for _getshort
for _getlong
While most of these configuration difference seem trivial and innocuous,
the -fzero-call-used-regs=al...
2018 Sep 19
2
Bias in R's random integers?
A quick point of order here: arguing with Duncan in this forum is
helpful to expose ideas, but probably neither side will convince the
other; eventually, if you want this adopted in core R, you'll need to
convince an R-core member to pursue this fix.
In the meantime, a good, well-tested implementation in a
user-contributed package (presumably written in C for speed) would be
enormously
2025 Apr 19
1
NSD 4.12.0rc1 pre-release
...es
checking for GNU libc compatible malloc... yes
checking for declarations of fseeko and ftello... yes
checking for cc option to enable large file support... none needed
checking size of void*... 8
checking size of off_t... 8
checking for getrandom... no
checking for arc4random... yes
checking for arc4random_uniform... yes
checking for library containing setusercontext... none required
checking for login_cap.h... yes
checking for tzset... yes
checking for alarm... yes
checking for chroot... yes
checking for dup2... yes
checking for endpwent... yes
checking for gethostname... yes
checking for memset... yes
chec...
2018 Sep 19
0
Bias in R's random integers?
For a well-tested C algorithm, based on my reading of Lemire, the unbiased
"algorithm 3" in https://arxiv.org/abs/1805.10941 is part already of the C
standard library in OpenBSD and macOS (as arc4random_uniform), and in the
GNU standard library. Lemire also provides C++ code in the appendix of his
piece for both this and the faster "nearly divisionless" algorithm.
It would be excellent if any R core members were interested in considering
bindings to these algorithms as a patch, or might expres...
2018 Sep 21
3
Bias in R's random integers?
...ttiger wrote:
>>>>> For a well-tested C algorithm, based on my reading of Lemire, the
>>>>> unbiased "algorithm 3" in https://arxiv.org/abs/1805.10941 is part
>>>>> already of the C standard library in OpenBSD and macOS (as
>>>>> arc4random_uniform), and in the GNU standard library. Lemire also
>>>>> provides C++ code in the appendix of his piece for both this and the
>>>>> faster "nearly divisionless" algorithm.
>>>>>
>>>>> It would be excellent if any R core members were...
2025 Apr 16
4
NSD 4.12.0rc1 pre-release
Dear all,
NSD 4.12.0rc1 pre-release is available:
https://nlnetlabs.nl/downloads/nsd/nsd-4.12.0rc1.tar.gz
sha256 b9085a3fd08b8318ac30715faf1c7698099781eb3520253774a46f74386342e9
pgp https://nlnetlabs.nl/downloads/nsd/nsd-4.12.0rc1.tar.gz.asc
This release introduces Prometheus metrics that can be compiled with
`--enable-prometheus-metrics` and configured with `enable-metrics` (see
2011 Sep 02
1
problems building openssh-5.8p1 on qnx
...ng whether GLOB_NOMATCH is declared... yes
checking whether struct dirent allocates space for d_name... configure: WARNING: cross compiling: assuming BROKEN_ONE_BYTE_DIRENT_D_NAME
checking for /proc/pid/fd directory... yes
checking for arc4random... no
checking for arc4random_buf... no
checking for arc4random_uniform... no
checking for asprintf... no
checking for b64_ntop... no
checking for __b64_ntop... yes
checking for b64_pton... no
checking for __b64_pton... yes
checking for bcopy... yes
checking for bindresvport_sa... yes
checking for clock... yes
checking for closefrom... no
checking for dirfd... yes
chec...