herolib keys module #26

Closed
sameh-farouk wants to merge 19 commits from develop-herolib-keys into develop
Member

Implements a new standalone cryptographic primitives package for Ed25519 digital signatures with full Rhai scripting integration.

What's Added

  • Core Package (packages/keys/)
    • Ed25519 keypair generation, signing, and verification
    • Key serialization (hex/bytes) with import/export
    • Cryptographic utilities (SHA-256, random bytes, secure comparison)
    • Comprehensive error handling with custom error types
    • 19 unit tests + 2 doc tests (all passing)
  • Rhai Integration
    • Full Rhai bindings for all Ed25519 operations
    • Integrated with herodo CLI for interactive use
    • 6 comprehensive Rhai test suites (all passing)
    • 4 example scripts demonstrating usage patterns

Files Created

  • packages/keys/ - Complete package implementation
  • rhai_tests/keys/run_all_tests.rhai - Test suite
  • rhaiexamples/keys/ - 4 example scripts (basic signing, serialization, utilities, advanced workflow)

Integration Points

  • packages/herodo/ - Added keys module registration
  • rhai/ - Added to aggregator (for future use)

Run Rust tests

cargo test -p herolib-keys

Run Rhai tests

./packages/herodo/target/debug/herodo rhai_tests/keys/run_all_tests.rhai
# Try examples
./packages/herodo/target/debug/herodo rhaiexamples/keys/basic_signing.rhai

Dependencies

  • ed25519-dalek v2.2.0 - Ed25519 implementation
  • sha2 v0.10 - SHA-256 hashing
  • rand v0.8 - Secure random generation
  • hex v0.4 - Hex encoding/decoding
Implements a new standalone cryptographic primitives package for Ed25519 digital signatures with full Rhai scripting integration. **What's Added** - Core Package (packages/keys/) - Ed25519 keypair generation, signing, and verification - Key serialization (hex/bytes) with import/export - Cryptographic utilities (SHA-256, random bytes, secure comparison) - Comprehensive error handling with custom error types - 19 unit tests + 2 doc tests (all passing) - Rhai Integration - Full Rhai bindings for all Ed25519 operations - Integrated with herodo CLI for interactive use - 6 comprehensive Rhai test suites (all passing) - 4 example scripts demonstrating usage patterns **Files Created** - `packages/keys/` - Complete package implementation - `rhai_tests/keys/run_all_tests.rhai` - Test suite - `rhaiexamples/keys/` - 4 example scripts (basic signing, serialization, utilities, advanced workflow) **Integration Points** - `packages/herodo/` - Added keys module registration - `rhai/` - Added to aggregator (for future use) ## Run Rust tests ```bash cargo test -p herolib-keys ``` **Run Rhai tests** ```bash ./packages/herodo/target/debug/herodo rhai_tests/keys/run_all_tests.rhai # Try examples ./packages/herodo/target/debug/herodo rhaiexamples/keys/basic_signing.rhai ``` **Dependencies** - ed25519-dalek v2.2.0 - Ed25519 implementation - sha2 v0.10 - SHA-256 hashing - rand v0.8 - Secure random generation - hex v0.4 - Hex encoding/decoding
# Conflicts:
#	packages/herodo/src/main.rs
sameh-farouk closed this pull request 2025-12-31 17:21:13 +00:00

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
geomind_research/herolib_rust!26
No description provided.