Encryption Service
Component Detail
Service Layer
high complexity
mobile
1
Dependencies
2
Dependents
1
Entities
0
Integrations
Description
Implements end-to-end asymmetric encryption using libsodium NaCl box primitives. Generates and stores per-user keypairs on-device (iOS Keychain / Android Keystore) and exposes encrypt/decrypt operations. The server stores only ciphertext and never holds plaintext.
encryption-service
Responsibilities
- Generate asymmetric keypair (Curve25519) on first use and persist to secure device storage
- Encrypt assignment payload with recipient's public key before API submission
- Decrypt ciphertext payload on-device using stored private key
- Expose public key for coordinator to retrieve before dispatch
Interfaces
generateKeypair(): KeyPair
getPublicKey(): Uint8List
encrypt(plaintext: String, recipientPublicKey: Uint8List): EncryptedPayload
decrypt(payload: EncryptedPayload): String
Relationships
Dependents (2)
Components that depend on this component