tf-encrypted / aes-prng Goto Github PK
View Code? Open in Web Editor NEWRust pseudo-random number generator based on AES
License: Apache License 2.0
Rust pseudo-random number generator based on AES
License: Apache License 2.0
AES seems to be slower than ChaCha on Apple M1:
rng_fill/chacha8/2000000
time: [1.6929 ms 1.6940 ms 1.6951 ms]
Found 9 outliers among 100 measurements (9.00%)
2 (2.00%) low severe
1 (1.00%) low mild
2 (2.00%) high mild
4 (4.00%) high severe
rng_fill/chacha12/2000000
time: [2.4556 ms 2.4581 ms 2.4606 ms]
Found 3 outliers among 100 measurements (3.00%)
3 (3.00%) high mild
rng_fill/chacha20/2000000
time: [3.9821 ms 3.9857 ms 3.9895 ms]
Found 4 outliers among 100 measurements (4.00%)
4 (4.00%) high mild
rng_fill/aes/2000000 time: [8.4624 ms 8.4707 ms 8.4792 ms]
Found 2 outliers among 100 measurements (2.00%)
2 (2.00%) high mild
rng_next_u64/chacha8 time: [8.0137 us 8.0212 us 8.0285 us]
Found 9 outliers among 100 measurements (9.00%)
1 (1.00%) low mild
4 (4.00%) high mild
4 (4.00%) high severe
rng_next_u64/chacha12 time: [11.055 us 11.065 us 11.076 us]
Found 7 outliers among 100 measurements (7.00%)
1 (1.00%) low mild
4 (4.00%) high mild
2 (2.00%) high severe
rng_next_u64/chacha20 time: [17.142 us 17.161 us 17.179 us]
Found 7 outliers among 100 measurements (7.00%)
1 (1.00%) low mild
5 (5.00%) high mild
1 (1.00%) high severe
rng_next_u64/aes time: [36.918 us 36.950 us 36.983 us]
Found 10 outliers among 100 measurements (10.00%)
5 (5.00%) low mild
4 (4.00%) high mild
1 (1.00%) high severe
Maybe this can be fixed by simply enabling a flag.
Currently the code does not implement the CryptoRng
trait which indicates that the rng is secure for cryptographic purposes.
Currently it is not possible to make a clone of an Rng.
I suggest we use one where
Show results of cargo bench
under new subsection
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.