Service Layer high complexity mobile
0
Dependencies
0
Dependents
3
Entities
0
Integrations

Description

Manages asymmetric key pair lifecycle for each user, including generation during onboarding, secure local storage via Flutter Secure Storage, and public key registration in Supabase. Provides key retrieval for encryption and ensures private keys never leave the device.

Feature: Encrypted Task Assignment to Peer Mentors

key-management-service

Responsibilities

  • Generate RSA or EC key pair on user onboarding
  • Store private key in Flutter Secure Storage (never transmitted)
  • Register and update public key in Supabase user profile
  • Retrieve stored private key for decryption operations
  • Handle key rotation and recovery scenarios

Interfaces

generateKeyPair(userId)
storePrivateKey(userId, privateKey)
getPrivateKey(userId)
registerPublicKey(userId, publicKey)
getPublicKey(userId)
rotateKeyPair(userId)
deleteKeys(userId)

Related Data Entities (3)

Data entities managed by this component