git: libc - Port chacha20 from FreeBSD for arc4random()

Matthew Dillon dillon at crater.dragonflybsd.org
Sat Feb 25 11:03:07 PST 2023


commit 22cd51fe15e7d8e951102064ba0d7e07839d6394
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Sat Feb 25 11:01:39 2023 -0800

    libc - Port chacha20 from FreeBSD for arc4random()
    
    * Port chacha20 from FreeBSD to replace the arc4random() suite.
    
    Requested-by: Zoltan Keri

Summary of changes:
 lib/libc/gen/Makefile.inc                        |   4 +-
 lib/libc/gen/{waitid.c => arc4random-compat.c}   |  68 ++--
 lib/libc/gen/arc4random.3                        | 131 ++++---
 lib/libc/gen/arc4random.c                        | 425 ++++++++++-------------
 lib/libc/gen/arc4random.h                        | 149 ++++++++
 lib/libc/gen/arc4random_uniform.c                |  58 ++++
 sys/crypto/chacha20/_chacha.h                    |  15 +
 sys/crypto/chacha20/chacha-sw.c                  |  66 ++++
 {crypto/openssh => sys/crypto/chacha20}/chacha.c |  57 ++-
 sys/crypto/chacha20/chacha.h                     |  43 +++
 10 files changed, 673 insertions(+), 343 deletions(-)
 copy lib/libc/gen/{waitid.c => arc4random-compat.c} (58%)
 create mode 100644 lib/libc/gen/arc4random.h
 create mode 100644 lib/libc/gen/arc4random_uniform.c
 create mode 100644 sys/crypto/chacha20/_chacha.h
 create mode 100644 sys/crypto/chacha20/chacha-sw.c
 copy {crypto/openssh => sys/crypto/chacha20}/chacha.c (83%)
 create mode 100644 sys/crypto/chacha20/chacha.h

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/22cd51fe15e7d8e951102064ba0d7e07839d6394


-- 
DragonFly BSD source repository


More information about the Commits mailing list