The MirOS Project
CVS log for contrib/code/Snippets/arc4random.c
Up to [The MirOS Project] / contrib / code / Snippets
Request diff between arbitrary revisions - Display revisions graphically
Keyword substitution: kv
Default branch: MAIN
Revision 1.28: download - view: text, markup, annotated - select for diffs
Sun Sep 12 12:24:03 2010 UTC (20 months, 1 week ago) by tg
- 1004C8CC69150D1B4BD
Branches: MAIN
CVS tags: HEAD
Diff to previous 1.27: preferred, coloured
Changes since revision 1.27: +30 -28 lines
• kern/c/arc4random_uniform.c, kern/include/libckern.h: move
arc4random_uniform(3) implementation here
• kern/c/Makefile.inc: build arc4random_uniform.c kernel/user
• lib/libc/crypt/arc4random.c, sys/dev/rnd.c: remove implementation here
• sys/dev/rndvar.h: prototype is now in <libckern.h>
• contrib/code/Snippets/arc4random.c: sync with master implementation
Revision 1.27: download - view: text, markup, annotated - select for diffs
Thu Jan 28 16:47:48 2010 UTC (2 years, 3 months ago) by tg
- 1004B61BFE43CFDC9F2
Branches: MAIN
Diff to previous 1.26: preferred, coloured
Changes since revision 1.26: +2 -2 lines
sync copyright year
Revision 1.26: download - view: text, markup, annotated - select for diffs
Thu Jan 28 16:47:24 2010 UTC (2 years, 3 months ago) by tg
- 1004B61BFC216C9068A
Branches: MAIN
Diff to previous 1.25: preferred, coloured
Changes since revision 1.25: +3 -3 lines
fix uninitialised memory error cought by Valgrind on mksh
Revision 1.25: download - view: text, markup, annotated - select for diffs
Wed Jan 6 17:52:07 2010 UTC (2 years, 4 months ago) by tg
- 1004B44CDF76EA71CDB
Branches: MAIN
Diff to previous 1.24: preferred, coloured
Changes since revision 1.24: +2 -1 lines
fix a coding error in the KSA found by myself reading several descriptions of aRC4
Revision 1.24: download - view: text, markup, annotated - select for diffs
Sun Nov 29 18:23:57 2009 UTC (2 years, 5 months ago) by tg
- 1004B12BC29222D2EDA
Branches: MAIN
Diff to previous 1.23: preferred, coloured
Changes since revision 1.23: +4 -3 lines
#ifdef OPPORTUNISTIC_ROOT_PUSHB
assume we’re root and can write to /dev/urandom (dangerous)
mirrors mkshdroid’s cid 1004B12B53704274E9F into FreeWRT
#endif
Revision 1.23: download - view: text, markup, annotated - select for diffs
Sun Nov 29 15:29:00 2009 UTC (2 years, 5 months ago) by tg
- 1004B1293503FBA3433
Branches: MAIN
CVS tags: BSD__arc4random-1_43
Diff to previous 1.22: preferred, coloured
Changes since revision 1.22: +5 -5 lines
make things const that should be const where we can,
complain about things where we cannot change the API
designed by const-dirty OpenBSDdiots
Revision 1.22: download - view: text, markup, annotated - select for diffs
Sun Nov 29 14:56:36 2009 UTC (2 years, 5 months ago) by tg
- 1004B128BD37E8B48DA
Branches: MAIN
Diff to previous 1.21: preferred, coloured
Changes since revision 1.21: +23 -8 lines
again, improved entropy pass behaviour in arc4random_pushb (and pushk,
which has been the same for quite a while)
Revision 1.21: download - view: text, markup, annotated - select for diffs
Mon Nov 9 22:35:25 2009 UTC (2 years, 6 months ago) by tg
- 1004AF8995013E8DF46
Branches: MAIN
Diff to previous 1.20: preferred, coloured
Changes since revision 1.20: +92 -12 lines
feature- and style-sync Snippets/arc4random.c and libc’s with each other
Revision 1.20: download - view: text, markup, annotated - select for diffs
Mon Nov 9 18:12:26 2009 UTC (2 years, 6 months ago) by tg
- 1004AF85BAD20F93D56
Branches: MAIN
Diff to previous 1.19: preferred, coloured
Changes since revision 1.19: +18 -2 lines
adapt from contrib/code/mirmake/dist/contrib/arc4random.c that Interix
has very slow /dev/urandom; also some others
Revision 1.19: download - view: text, markup, annotated - select for diffs
Sun Sep 27 10:45:32 2009 UTC (2 years, 7 months ago) by tg
- 1004ABF427B0C01542F
Branches: MAIN
Diff to previous 1.18: preferred, coloured
Changes since revision 1.18: +4 -1 lines
don't call the (expensive) MS CryptoAPI if we don’t need to _read_ any
entropy from the system either, no matter if the registry method works
Revision 1.18: download - view: text, markup, annotated - select for diffs
Sun Sep 20 13:28:53 2009 UTC (2 years, 7 months ago) by tg
- 1004AB62DF51E47759B
Branches: MAIN
Diff to previous 1.17: preferred, coloured
Changes since revision 1.17: +11 -0 lines
use a slightly different algorithm for arc4random_pushb interfacing:
rate-limit calls to CryptGenRandom to every 2‥4 minutes, if the last
call was successful, and operate with hash() on rnd_cache[], so that
it is mixed in a better way
Revision 1.17: download - view: text, markup, annotated - select for diffs
Sun Sep 20 12:50:43 2009 UTC (2 years, 7 months ago) by tg
- 1004AB6253F25FA36C0
Branches: MAIN
Diff to previous 1.16: preferred, coloured
Changes since revision 1.16: +6 -7 lines
fix buffer overflows̲ in win32 specific code
Revision 1.16: download - view: text, markup, annotated - select for diffs
Sun Aug 2 13:08:48 2009 UTC (2 years, 9 months ago) by tg
- 1004A758FAE27A96B15
Branches: MAIN
Diff to previous 1.15: preferred, coloured
Changes since revision 1.15: +113 -50 lines
• overhaul Win32 arc4random_push*() implementation:
‣ use HKCU\SOFTWARE\Microsoft\Cryptography\RNG\Seed in addition to
the HKLMSOFTWARE\Microsoft\Cryptography\RNG\Seed key we might not
have write permissions for on Vista
‣ HKCU\SOFTWARE\Microsoft\Cryptography\RNG\Seed is created if needed
‣ if opening a registry key R/W fails, use it R/O
‣ much better data-shuffling-and-XORing scheme
• add comments
• KNF, a.k.a. style(9)
Works with mksh.exe for me
Revision 1.15: download - view: text, markup, annotated - select for diffs
Sun Aug 2 11:24:16 2009 UTC (2 years, 9 months ago) by tg
- 1004A75778561DED6E0
Branches: MAIN
Diff to previous 1.14: preferred, coloured
Changes since revision 1.14: +54 -55 lines
get rid of passing (&rs) along
Revision 1.14: download - view: text, markup, annotated - select for diffs
Wed May 27 09:52:18 2009 UTC (2 years, 11 months ago) by tg
- 1004A1D0D6A5E616685
Branches: MAIN
Diff to previous 1.12: preferred, coloured
Changes since revision 1.12: +13 -13 lines
apply some -Warning -fixes from
gcc version 4.5.0 20090516 (experimental) [trunk revision 147610] (Debian 20090516-1)
Revision 1.12: download - view: text, markup, annotated - select for diffs
Mon Dec 8 18:51:30 2008 UTC (3 years, 5 months ago) by tg
- 100493D6CDD24BB45EE
Branches: MAIN
Diff to previous 1.11: preferred, coloured
Changes since revision 1.11: +4 -3 lines
MinGW32
Revision 1.11: download - view: text, markup, annotated - select for diffs
Mon Dec 8 18:45:38 2008 UTC (3 years, 5 months ago) by tg
- 100493D6B253598B1F5
Branches: MAIN
Diff to previous 1.10: preferred, coloured
Changes since revision 1.10: +54 -26 lines
while EGD socket support (for EGD control sockets and PRNGD sockets only)
is still pending, this will attempt to write into the Win32 registry global
state on pushback, as the CryptoAPI state is only per-process; furthermore,
ensure always 128 KiB are read from CryptoAPI to force its eight RC4(tm)
generators to re-seed on each arc4random_stir(3) operation
Revision 1.10: download - view: text, markup, annotated - select for diffs
Mon Dec 8 13:44:55 2008 UTC (3 years, 5 months ago) by tg
- 100493D25015FAB7DB2
Branches: MAIN
Diff to previous 1.9: preferred, coloured
Changes since revision 1.9: +4 -3 lines
some minor cygwin warning
Revision 1.9: download - view: text, markup, annotated - select for diffs
Mon Dec 8 13:37:21 2008 UTC (3 years, 5 months ago) by tg
- 100493D233652B37C21
Branches: MAIN
Diff to previous 1.8: preferred, coloured
Changes since revision 1.8: +20 -10 lines
improve further: obsd; different name for random device
Revision 1.8: download - view: text, markup, annotated - select for diffs
Mon Dec 8 13:31:35 2008 UTC (3 years, 5 months ago) by tg
- 100493D21CE226A01DF
Branches: MAIN
Diff to previous 1.7: preferred, coloured
Changes since revision 1.7: +55 -19 lines
merge stuff from BSD::arc4random arc4random.c; make easier to build
on MirBSD; enhance functionality if OS provides
Revision 1.7: download - view: text, markup, annotated - select for diffs
Mon Dec 8 12:40:41 2008 UTC (3 years, 5 months ago) by tg
- 100493D15BD5189AE88
Branches: MAIN
Diff to previous 1.6: preferred, coloured
Changes since revision 1.6: +36 -8 lines
* add arc4_count from base
* change ifdef __CYGWIN__ into USE_MS_CRYPTOAPI and set it true
for GNU/Cygwin32 (might want to use it for pcc, mingw, etc. too?)
* add arc4_atexit from base if we have push (MS CryptoAPI)
Revision 1.6: download - view: text, markup, annotated - select for diffs
Fri Oct 24 21:14:58 2008 UTC (3 years, 6 months ago) by tg
- 10049023AF361C68EA5
Branches: MAIN
Diff to previous 1.5: preferred, coloured
Changes since revision 1.5: +3 -1 lines
label defined but not used on !cygwin (gcc, Solaris)
Revision 1.5: download - view: text, markup, annotated - select for diffs
Fri Oct 24 21:14:15 2008 UTC (3 years, 6 months ago) by tg
- 10049023AC47DC47DBF
Branches: MAIN
Diff to previous 1.4: preferred, coloured
Changes since revision 1.4: +9 -1 lines
add <string.h> and MIN, MAX if not defined
caught by SUNWcc on Solaris (thanks yofuh)
Revision 1.4: download - view: text, markup, annotated - select for diffs
Mon Oct 20 11:37:15 2008 UTC (3 years, 7 months ago) by tg
- 10048FC6D833E7D55CD
Branches: MAIN
Diff to previous 1.3: preferred, coloured
Changes since revision 1.3: +120 -4 lines
* allow arc4random_pushb(3) on GNU/Cygwin32
* improve code while here
Revision 1.3: download - view: text, markup, annotated - select for diffs
Tue Mar 4 22:52:51 2008 UTC (4 years, 2 months ago) by tg
- 10047CDD2E534273D4D
Branches: MAIN
Diff to previous 1.2: preferred, coloured
Changes since revision 1.2: +11 -7 lines
arc4random.c:100: warning: ignoring return value of 'read', declared with attribute warn_unused_result
on fedora
Revision 1.2: download - view: text, markup, annotated - select for diffs
Sun Sep 9 22:13:41 2007 UTC (4 years, 8 months ago) by tg
- 10046E4703E29699E3C
Branches: MAIN
Diff to previous 1.1: preferred, coloured
Changes since revision 1.1: +13 -10 lines
fix for OSF/1
Revision 1.1: download - view: text, markup, annotated - select for diffs
Fri Sep 7 19:27:45 2007 UTC (4 years, 8 months ago) by tg
Branches: MAIN
add arc4random.c from debian mksh-30.1-1 package, plus rcsid
Valid XHTML/1.0 Transitional! — CVSweb for MirOS – ChangeLog