add: multi verify server#88
Merged
quantumshiro merged 14 commits intodevelopfrom Jun 2, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
Adds support for multiple signature schemes (ECDSA and FNDSA) end‐to‐end by tagging wallets and addresses with an encryption type and selecting the right crypto provider for signing and verification.
- Wallets now carry an
encryption_type, append a suffix to addresses, and exposeextract_encryption_type - Server and CLI routes use the suffix to pick ECDSA or FNDSA for signing
- Transactions detect the scheme from public-key size during verification
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/network/server.rs | Extracts scheme from address, picks corresponding CryptoProvider to sign |
| src/crypto/wallets.rs | Added encryption_type in Wallet, address suffix, and extractor |
| src/crypto/types.rs | Introduces EncryptionType (and unused DecryptionType) enums |
| src/crypto/transaction.rs | Implements determine_encryption_type and branches verify logic |
| src/crypto.rs | Adds get_crypto_provider factory |
| src/command/cli.rs | Uses wallet’s encryption_type for CLI commands and strip suffix |
Comments suppressed due to low confidence (3)
src/crypto/wallets.rs:23
- Tests call
Wallet::default(), but after adding theencryption_typefield theDefaultimpl is missing or incomplete. Consider providing a manualimpl Default for Walletthat initializesencryption_type.
pub struct Wallet {
src/crypto/transaction.rs:31
- Clean up these leftover commented lines in the verify logic for clarity now that
determine_encryption_typeis implemented.
// if pub_key.len() <= 65 {
src/crypto/types.rs:9
- The
DecryptionTypeenum is introduced but never used. Consider removing it to avoid unused code.
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…n permissions Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…n permissions Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…n permissions Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…b Actions workflow
📊 Code Coverage Report✅ Coverage data has been generated successfully Artifacts:
View detailed coverage:
Coverage reports are also uploaded to Codecov and Coveralls (if configured) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
複数暗合方式に対応しました