Skip to content

Commit

Permalink
removed getrandom dependency, removed .cargo folders that were for te…
Browse files Browse the repository at this point in the history
…sting (and stopped working), fixed some spelling
  • Loading branch information
nstilt1 committed Mar 13, 2024
1 parent 70a9f2d commit 86fd8ed
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 18 deletions.
13 changes: 0 additions & 13 deletions benches/.cargo/config.example

This file was deleted.

6 changes: 3 additions & 3 deletions benches/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ You can bench the ChaCha20 cipher using `cargo bench -- apply_keystream`
You can bench ChaCha20Rng using `cargo bench -- fill_bytes`

## Measuring CPB for aarch64
`criterion-cycles-per-byte` can work on `aarch64` with Linux, but it might produce an error. This error occurred on an up-to-date Raspberry Pi 4 (as of 12/14/2023):
`criterion-cycles-per-byte` can work on `aarch64` with Linux, but it might produce an error. This error occurred on an up-to-date Raspberry Pi 4b (as of 12/14/2023):
```
Running src/chacha20.rs (target/release/deps/chacha20-02f555ae0af3670b)
Gnuplot not found, using plotters backend
Expand All @@ -22,9 +22,9 @@ Caused by:
process didn't exit successfully: `..../benches/target/release/deps/chacha20-02f555ae0af3670b --bench` (signal: 4, SIGILL: illegal instruction)
```

The following code can fix this.
The following adjustment can fix this.

### Installing the cycle counter Linux Kernal Module on a Raspberry Pi 4b
### Installing the cycle counter Linux Kernel Module on a Raspberry Pi 4b
```
$ sudo apt-get update
$ sudo apt-get upgrade
Expand Down
4 changes: 2 additions & 2 deletions chacha20/src/rng.rs
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ pub(crate) mod tests {

#[test]
fn test_rng_output() {
let mut rng = ChaCha20Rng::from_seed(KEY.into());
let mut rng = ChaCha20Rng::from_seed(KEY);
let mut bytes = [0u8; 13];

rng.fill_bytes(&mut bytes);
Expand All @@ -641,7 +641,7 @@ pub(crate) mod tests {

#[test]
fn test_wrapping_add() {
let mut rng = ChaCha20Rng::from_entropy();
let mut rng = ChaCha20Rng::from_seed(KEY);
rng.set_stream(1337 as u128);
// test counter wrapping-add
rng.set_word_pos((2 as u64).pow(36) - 1);
Expand Down

0 comments on commit 86fd8ed

Please sign in to comment.