feat: implement cryptographic wallet signature verification#84
Merged
SudiptaPaul-31 merged 2 commits intoLumina-eX:mainfrom Feb 26, 2026
Merged
Conversation
- Add Ed25519 signature verification using Stellar SDK - Implement nonce generation with 5-minute TTL and one-time use - Add deterministic password generation with HMAC-SHA256 - Enhance /api/auth/nonce endpoint with validation - Enhance /api/auth/wallet-login with signature verification - Add comprehensive input validation utilities - Add TypeScript type definitions for auth API - Add unit tests for signature verification and nonce management - Update .env.example with WALLET_AUTH_SECRET documentation Security features: - Cryptographic proof of wallet ownership via Ed25519 signatures - Replay attack prevention through one-time nonce consumption - Time-limited nonces (5 minutes expiration) - HMAC-SHA256 password derivation with server-side secret - Comprehensive error handling and security logging Requirements: 1.1-1.6, 2.1-2.6, 3.1-3.6, 4.1-4.6, 5.1-5.6, 6.1-6.6, 7.1-7.6, 8.1-8.6, 9.1-9.6
Contributor
Author
|
Please review and merge. |
Collaborator
|
@Mmesolove please resolve conflicts |
Contributor
Author
|
please review. |
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.
Closes #74
Changes
Core Implementation
API Enhancements
Security Features
Testing
Requirements Addressed
All 9 requirements with 54 acceptance criteria:
Verification Checklist
Setup Required
Add to your
.env.local:```bash
WALLET_AUTH_SECRET=
```
Documentation
Breaking Changes
None - maintains backward compatibility with existing authentication flows.
Next Steps