Skip to main content

Module privacy_and_dist_patterns

Module privacy_and_dist_patterns 

Source
Expand description

Privacy-preserving computation + distributed systems patterns.

PSI, PIR, differential privacy, feature flags, API versioning, schema registry, 2PC, WAL streaming, snapshot isolation, homomorphic MAC.

Structs§

ApiVersion
ApiVersionRegistry
FeatureFlag
FeatureFlags
HomomorphicMac
MAC that supports homomorphic addition: MAC(m1+m2) = MAC(m1) + MAC(m2).
MacTag
PirQuery
XOR-based PIR (2 servers): each server gets a random subset; XOR of responses gives the desired element.
PirResponse
Schema
SchemaRegistry
Snapshot
SnapshotStore
TwoPcCoordinator
TwoPcParticipant
WalStreamEntry
WalStreamer

Enums§

TwoPcState

Functions§

dp_count
Counting query with DP: report noisy count.
dp_query
Add Laplace noise to a numeric query result.
gaussian_noise
Gaussian mechanism: add Gaussian noise.
laplace_noise
Laplace mechanism: add noise calibrated to sensitivity and epsilon.
pir_batch
Batch PIR: retrieve multiple indices in one query.
pir_create_query
pir_decode
pir_server_respond
pir_trivial
Simple PIR: client downloads entire database (trivial but private).
psi_cardinality
PSI result size only (cardinality), not the actual intersection.
psi_hash_based
Hash-based PSI: both parties hash their sets, compare hashes.