Skip to content

Upgrade rand and dalek#225

Merged
coltfred merged 8 commits into
mainfrom
rand-upgrade
Mar 9, 2026
Merged

Upgrade rand and dalek#225
coltfred merged 8 commits into
mainfrom
rand-upgrade

Conversation

@giarc3
Copy link
Copy Markdown
Member

@giarc3 giarc3 commented Mar 6, 2026

Currently-pineed ed25519-dalek broke because of transitive dependencies. Since rand 0.10 is out, we're able to go to the latest pre-release of it instead.

Note: CI will fail because it tries to bench main, which is broken

@coltfred
Copy link
Copy Markdown
Member

coltfred commented Mar 7, 2026

Rand removed the reseeding rng. Our options are:

  1. Go without reseeding.
  2. Use ThreadRng, which uses ChaCha12 and reseeds every 64KB
  3. Write some kind of reseeding logic.

I opted to go with 3 because a simple reseeding rng is very easy and obvious if it's correct or not and it gives us the guarantees we had before. I also followed the standard 64KB of randomness before reseeding. This allows for more than 150 plaintexts in the case of 256 bit and we only need 32 random bytes from the system to reseed.

@coltfred
Copy link
Copy Markdown
Member

coltfred commented Mar 7, 2026

@giarc3 I'll wait for you to review this as well since a good chunk of it is now my code.

@coltfred coltfred enabled auto-merge (squash) March 9, 2026 19:48
@coltfred coltfred merged commit bc6b330 into main Mar 9, 2026
12 of 14 checks passed
@coltfred coltfred deleted the rand-upgrade branch March 9, 2026 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants