Update dependencies and refactor random number generation to use `rng… #86
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
…()
instead of
thread_rng()This pull request updates the codebase to use Rust 2021 edition, modernizes dependencies, and replaces the deprecated
thread_rngfunction with the
rngfunction from the
rand` crate. Additionally, it removes unsafe code in key deserialization and includes minor refactoring for clarity. Below are the most important changes grouped by theme:Dependency Updates
Cargo.toml
andfuzz/Cargo.toml
for modern language features. [1] [2]rand
from version0.5
to0.9.0
andrand_core
from version0.2
to0.9.3
inCargo.toml
.libfuzzer-sys
dependency from0.3
to0.4.9
infuzz/Cargo.toml
.Transition to
rng
fromthread_rng
thread_rng
withrng
across the codebase for compatibility with the updatedrand
crate. This includes changes insrc/aggsig.rs
,src/ecdh.rs
,src/key.rs
, andfuzz/fuzz_targets/fuzz_aggsig.rs
. [1] [2] [3] [4]Removal of Unsafe Code
Deserialize
implementation forPublicKey
insrc/key.rs
, replacing it with a safe zeroed array initialization. [1] [2]Minor Refactoring
try_fill_bytes
methods in the test module ofsrc/key.rs
for improved code clarity. [1] [2] [3]Documentation and Constants
src/constants.rs
.