Skip to content

Conversation

@0xMuang
Copy link
Collaborator

@0xMuang 0xMuang commented Jan 26, 2026

Summary

Changes

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:

if let (Some(ref storage), Some(ref debug_executor)) = (&rpc_storage, &rpc_debug_executor) {
    // ...
    subscription_manager.clone().unwrap(),
}

to:

if let (Some(ref storage), Some(ref debug_executor), Some(ref sub_mgr)) =
    (&rpc_storage, &rpc_debug_executor, &subscription_manager)
{
    // ...
    sub_mgr.clone(),
}

This prevents a potential panic if subscription_manager is None.

Test Plan

  • cargo check passes
  • cargo test -p cipherbft-crypto --lib passes (all 102 tests)

Closes #127
Closes #137

- Use EIP-2335 standard scrypt N=262144 instead of weak N=8192 (#127)
- Replace subscription_manager.unwrap() with pattern matching (#137)
@0xMuang 0xMuang merged commit af1ee70 into main Jan 26, 2026
18 checks passed
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.

Potential panic on subscription_manager.unwrap() in node startup [Security] Weak scrypt KDF parameters for keystore encryption

3 participants