Skip to content

feat(dsa): implement DSA digital signature scheme with key generation… - #1

Open
Gabry022003 wants to merge 1 commit into
Herbrant:mainfrom
Gabry022003:main
Open

feat(dsa): implement DSA digital signature scheme with key generation…#1
Gabry022003 wants to merge 1 commit into
Herbrant:mainfrom
Gabry022003:main

Conversation

@Gabry022003

@Gabry022003 Gabry022003 commented Aug 18, 2025

Copy link
Copy Markdown

Add DSA Digital Signature Algorithm Implementation

Summary

Added complete DSA (Digital Signature Algorithm) implementation following FIPS 186-4 standard.

Changes

Core Implementation

  • New module: src/dsa/ with algorithms and key structures
  • New trait: traits::digital_signature::DigitalSignature for signature schemes
  • Security levels: 80, 112, 128, 192, 256 bits (FIPS 186-4 compliant)
  • Dependencies: Added rug v1.24 for arbitrary precision arithmetic

Testing & Examples

  • Example: dsa_example.rs demonstrating complete usage workflow
  • Tests: 11 comprehensive test suites with mathematical property validation
  • Benchmarks: Performance testing for keygen/sign/verify operations
  • Documentation: Updated README

Utilities

  • Utils module: src/utils/rand.rs are adapted from the pke_rust

Key Features

  • Cryptographically secure domain parameter generation
  • Miller-Rabin primality testing with configurable rounds
  • Secure random number generation via OS entropy
  • Mathematical property validation (g^q ≡ 1 mod p, q | p-1)
  • Attack detection (invalid signatures, tampered messages)

Integration

  • Dual API design: Maintains existing BLS trait while adding DSA trait
  • No breaking changes to existing BLS implementation
  • Consistent error handling and testing patterns

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