Skip to content

pkc%feat(eddsa): add rudimentary Ed25519 support backed by ed25519-dalek - #46

Merged
kwvg merged 6 commits into
dashpay:developfrom
kwvg:eddsa_prep
Sep 17, 2026
Merged

kwvg merged 6 commits into
dashpay:developfrom
kwvg:eddsa_prep

Conversation

@kwvg

@kwvg kwvg commented Sep 15, 2026

Copy link
Copy Markdown
Collaborator

Additional Information

  • Due to inherent properties of the Ed25519 , tweaking is unavailable in the API. See SLIP-0010 for more information (source).

Breaking Changes

  • dash_primitives::payload::proregtx::PlatformNodeId has been superseded by dash_primitives::payload::PlatformNodeId

  • PlatformNodeId no longer implements dash_types::codec::Hashable

How Has This Been Tested?

./contrib/git_filter.py --fast-fail develop eddsa_prep -- bash -c 'cargo clippy --all-targets --no-default-features -- -D warnings && cargo clippy --all-targets --features full -- -D warnings && cargo test --all-targets --features full && nix develop ./contrib/nix#dev --command python3 maint/lint_all.py'

Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional tests
  • I have made corresponding changes to the documentation
  • I have assigned this pull request to a milestone (for repository code-owners and collaborators only)

@kwvg kwvg added this to the 0.1 milestone Sep 15, 2026
@kwvg kwvg self-assigned this Sep 15, 2026
@coderabbitai

coderabbitai Bot commented Sep 15, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 4e6ede46-2ba8-4d28-8eae-620352a658bc

📥 Commits

Reviewing files that changed from the base of the PR and between d95cd6c and c04f167.

📒 Files selected for processing (10)
  • maint/codeql/rust/lib/imports.qll
  • maint/codeql/rust/lib/pkc.qll
  • maint/codeql/rust/pkc.model.yml
  • maint/codeql/rust/pkc.ql
  • pkgs/pkc/src/bls/error.rs
  • pkgs/pkc/src/ecdsa/error.rs
  • pkgs/pkc/src/eddsa/public_ops.rs
  • pkgs/pkc/src/eddsa/secret_ops.rs
  • pkgs/pkc/src/eddsa/sig_ops.rs
  • pkgs/pkc/src/lib.rs

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The change adds feature-gated Ed25519 support to dash-pkc, including key, signature, hash, validation, tests, and benchmarks. It reuses EddsaPkHash for PlatformNodeId and updates Rust CodeQL models for Ed25519 API differences.

Changes

EdDSA support and integration

Layer / File(s) Summary
EdDSA contracts and feature wiring
pkgs/pkc/Cargo.toml, pkgs/pkc/src/lib.rs, pkgs/pkc/src/eddsa/*, pkgs/pkc/src/bls/error.rs, pkgs/pkc/src/ecdsa/error.rs
Adds the eddsa feature, the Ed25519 dependency, byte and hash types, error types, module exports, shared fixtures, and Copy derives for existing error enums.
EdDSA key and signature operations
pkgs/pkc/src/eddsa/public_ops.rs, pkgs/pkc/src/eddsa/secret_ops.rs, pkgs/pkc/src/eddsa/sig_ops.rs
Adds Ed25519 public-key parsing, strict verification, secret-key generation, signing, zeroization, conversions, and tests for valid and invalid inputs.
EdDSA benchmark wiring
pkgs/pkc/bench/*
Adds benchmarks for signing, verification, key derivation, deserialization, and public-key hashing.
PlatformNodeId integration
pkgs/primitives/src/payload/*
Re-exports EddsaPkHash as PlatformNodeId and updates payload modules to use the shared type.
CodeQL EdDSA modeling
maint/codeql/rust/*
Adds armLacks and armLacksTrait modeling, reports trait gaps, exempts unavailable Ed25519 APIs, and allowlists the new public-hash re-export.

Sequence Diagram(s)

sequenceDiagram
  participant EddsaSecretKey
  participant EddsaSignature
  participant EddsaPublicKey
  EddsaSecretKey->>EddsaSignature: sign(message)
  EddsaSecretKey->>EddsaPublicKey: public_key()
  EddsaPublicKey->>EddsaSignature: verify(message, signature)
Loading

Priority: ➖ Normal

Merge Risk: ⚪ Minimal · up to c04f1

The Ed25519 and PlatformNodeId changes have no remaining actionable issue supported by the available evidence.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 75.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 56 functions across 18 files. (4 skipped:… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description check ✅ Passed The description clearly covers the Ed25519 implementation, PlatformNodeId change, testing, and breaking changes.
Title check ✅ Passed The title clearly and concisely identifies the main change: adding rudimentary Ed25519 support backed by ed25519-dalek.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 75.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 56 functions across 18 files. (4 skipped: 4 unsupported.)

  • Fix all pre-merge checks with AI

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Sep 15, 2026

Copy link
Copy Markdown

Note

This pull request has no conflicts! 🎊 🎉 🎊

@github-actions github-actions Bot removed the needs-rebase This pull request needs to be rebased against the base branch label Sep 17, 2026
@kwvg

kwvg commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 17, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@kwvg
kwvg merged commit a5b313c into dashpay:develop Sep 17, 2026
59 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.

1 participant