GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Math::Prime::Util::ChaCha(3) User Contributed Perl Documentation Math::Prime::Util::ChaCha(3)

Math::Prime::Util::ChaCha - Pure Perl ChaCha20 CSPRNG

Version 0.73

A pure Perl implementation of ChaCha20 with a CSPRNG interface.

Takes a binary string as input and seeds the internal CSPRNG.

A method for sieving the CSPRNG with a small value. This will not be secure but can be useful for simulations and emulating the system "srand".

With no argument, chooses a random number, seeds and returns the number. With a single integer argument, seeds and returns the number.

Returns a random 32-bit integer.

Returns a random 64-bit integer.

Takes an unsigned number "n" as input and returns that many random bytes as a single binary string.

Dana Jacobsen <dana@acm.org>

Daniel J. Bernstein wrote the ChaCha family of stream ciphers in 2008 as an update to the popular Salsa20 cipher from 2005.

RFC7539: "ChaCha20 and Poly1305 for IETF Protocols" was used to create both the C and Perl implementations. Test vectors from that document are used here as well.

For final optimizations I got ideas from Christopher Madsen's Crypt::Salsa20 for how to best work around some of Perl's aggressive dynamic typing. Our core is still about 20% slower than Salsa20.

Copyright 2017 by Dana Jacobsen <dana@acm.org>

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

2018-11-15 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.