Skip to content

Commit

Permalink
feat: ECDSA functionality with key generation, signing, and verification
Browse files Browse the repository at this point in the history
Add ECDSA cryptographic functionality to the crypto module, enabling
keypair generation, message signing, and signature verification. This
includes handling Elliptic Curve operations, random key generation, and
finite field arithmetic.

- Introduce `ECDSA` struct for managing the curve, generator, and order.
- Implement methods for generating keypairs, signing messages, and
  verifying signatures.
- Add tests for keypair generation, signing, and signature verification,
  including an invalid signature test.
- Integrate logging for better tracing of ECDSA operations.
- Update dependencies in `Cargo.toml` to include `rand`, `log`, and
  `env_logger` for randomness and logging support.

This change introduces a secure elliptic curve-based signature scheme,
which can be used for authentication and integrity checks in
cryptographic protocols.
  • Loading branch information
pycckuu committed Sep 30, 2024
1 parent 69548b6 commit 9c46d3a
Show file tree
Hide file tree
Showing 4 changed files with 548 additions and 1 deletion.
320 changes: 320 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,7 @@ version = "0.1.0"
edition = "2021"

[dependencies]
num-bigint = "0.4.6"
num-bigint = { version = "0.4", features = ["rand"] }
rand = "0.8"
log = "0.4"
env_logger = "0.10"
Loading

0 comments on commit 9c46d3a

Please sign in to comment.