-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
area/networkNetwork/DHT relatedNetwork/DHT relatedphase/1-testnetPhase 1: Testnet deploymentPhase 1: Testnet deploymentpriority/highHigh priorityHigh prioritytype/featureNew featureNew feature
Description
Context
After schema design is complete, implement the core DHT storage API for encrypted identity documents. This fulfills the Phase 1 deliverable: "Integrate DHT file storage layer".
Scope
- Implement DHT put operation (store encrypted document)
- Implement DHT get operation (retrieve by DID)
- Handle ChaCha20-Poly1305 encryption/decryption
- Implement replication logic (3+ nodes)
- Add error handling for network failures
- Public API:
store_identity(did: &str, document: &[u8]) -> Result<()> - Public API:
retrieve_identity(did: &str) -> Result<Vec<u8>>
Dependencies
- Issue DHT: Design storage schema for identity documents #1: DHT schema design must be complete
Acceptance Criteria
-
store_identityfunction implemented and working -
retrieve_identityfunction implemented and working - Documents encrypted with ChaCha20-Poly1305 before storage
- Minimum 3-node replication enforced
- Network error handling with retries
- Unit tests with >80% coverage
- Integration tests with local DHT cluster
- API documentation with examples
Technical Notes
- Use lib-crypto for ChaCha20-Poly1305 encryption (lib-crypto/src/symmetric/chacha20.rs)
- Implement exponential backoff for retries (max 3 attempts)
- Store metadata (timestamp, version) with encrypted document
- Reference lib-identity/src/backup/crypto.rs for existing ChaCha20-Poly1305 usage patterns
Metadata
Metadata
Assignees
Labels
area/networkNetwork/DHT relatedNetwork/DHT relatedphase/1-testnetPhase 1: Testnet deploymentPhase 1: Testnet deploymentpriority/highHigh priorityHigh prioritytype/featureNew featureNew feature