Privacy and Masking
Fed-GWAS uses practical privacy-oriented mechanisms in the current implementation: ECC-backed encrypted client-to-client relay, tokenized LR filtering, and deterministic anonymization for chunked PLINK data.
Encrypted relay
pipeline/server/prg_masking.py tracks public keys and exposes curve parameters. pipeline/clients/client_to_client.py uses client private keys and peer public keys to build encrypted envelopes that the server forwards but cannot decrypt.
The flow is:
- During
key_exchange, each client generates an ECC keypair and sends a PEM-encoded public key. - The server stores public keys and distributes the full public-key map during later stages.
- Each client computes shared secrets with peers.
- Clients encrypt seed messages, QC payloads, and KING map payloads for peer recipients.
- The server only relays ciphertext arrays through Flower
Parameters. - Recipient clients decrypt the envelopes and perform the required local aggregation or mapping.
The same relay pattern is used for seed synchronization and global QC. Local LR filtering sends salted tokens instead of raw SNP IDs; clients compute the intersection locally during local_lr_filter_response.
ID anonymization
BaseGWASClient contains helpers for anonymizing samples and SNPs before chunk transport.
| Data | Method |
|---|---|
| Sample FID/IID | Add sample_offset to numeric IDs; use a hash fallback for non-numeric IDs. |
| SNP ID | Compute a deterministic SHA-256 based ID from global_seed and the original SNP ID. |
The client persists chunk map files under its intermediate directory so returned anonymous IDs can be mapped back to local identifiers when possible, including after Flower actor restarts.
Operational notes
num_clientsmust match the actual number of clients so each client encrypts messages for the right recipients.- Simulation mode may recreate Flower actors across rounds; the client stores configuration in Flower state to mitigate that.
- Encrypted relay and tokenization reduce server visibility. They are not a complete privacy proof for every deployment threat model, so production use should include a separate security review.