Skip to main content

Module privacy

Module privacy 

Source
Expand description

Loop Agent SDK - Privacy Layer

Blind indexing for card fingerprints. Loop never stores raw card IDs — only one-way cryptographic tags.

§Security Model

  • Pepper: System-wide secret stored in AWS Secrets Manager
  • Algorithm: HMAC-SHA256
  • Output: loop_fp_{hex_hash}
  • Irreversible: Even with DB access, card IDs cannot be recovered

§Double-Blind Vaulting

  1. Webhook arrives with card_id
  2. Immediately hash to loop_fp_*
  3. Purge raw card_id from memory
  4. All subsequent operations use only the fingerprint

This means:

  • Logs never contain card IDs
  • DynamoDB never sees card IDs
  • Even Loop engineers cannot reverse fingerprints

Structs§

LoopFingerprint
A Loop fingerprint (one-way hash of card_id)
PrivacyConfig
Privacy configuration
PrivacyLayer
Privacy layer for card fingerprint hashing

Enums§

PrivacyError
Privacy layer errors

Functions§

create_pepper_secret
Create the pepper secret in AWS Secrets Manager Run this during initial setup
generate_pepper
Generate a new random pepper (32 bytes) Run this once to create the initial secret