fix: security and panic fixes (#127, #137) #151
Merged
+8
−7
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.
Summary
subscription_manager.clone().unwrap()with pattern matching to prevent potential panicChanges
kdf.rs (Issue #127)
Changed scrypt parameter from N=8192 (2^13) to N=262144 (2^18) to follow EIP-2335 standard. This provides stronger security for key derivation.
node.rs (Issue #137)
Changed the RPC server initialization from:
to:
This prevents a potential panic if subscription_manager is None.
Test Plan
cargo checkpassescargo test -p cipherbft-crypto --libpasses (all 102 tests)Closes #127
Closes #137