Conditional Encryption

ACM CCS 2024

A public-key cryptographic primitive that enables encryption conditionally on whether an encrypted hidden message satisfies a predicate with respect to a control message.

Conditional Encryption diagram with hidden message, control message, and a payload gift entering the predicate gate from bottom to top.

Application

TypTop Password Typo Correction

We apply Conditional Encryption to TypTop, allowing a server to check permitted password typos while keeping the real password private from the server.

Application diagram for Conditional TypTop showing encrypted client checks, private server-side predicates, and privacy preserved with Conditional Encryption.

This artifact includes: C++ implementation · Predicate families · Performance evaluations · TypTop integration · Reproducibility scripts

Core idea

Encrypt a payload under a predicate

Let c1 = Enc(pk, m1) be a ciphertext for a hidden message. Conditional Encryption computes c = CEnc(pk, c1, m2, m3), where m2 is a control message and m3 is a payload.

  • If P(m1, m2) = 1, the conditional ciphertext decrypts to m3.
  • If P(m1, m2) = 0, the ciphertext hides the payload and reveals only an unrelated random message.

Implemented predicates

Predicate families

Equality Edit distance ≤ 1 Hamming distance ≤ ℓ CAPSLOCK OR composition

Repository

Artifact structure

CondEncCPP

Conditional Encryption implementation, tests, predicate families, and performance evaluation.

CondTypTopCPP

Conditional TypTop implementation for privacy-preserving typo-tolerant password checking.

Citation

Cite the paper

@inproceedings{ameri2024conditional,
  title     = {Conditional Encryption with Applications to Secure Personalized Password Typo Correction},
  author    = {Ameri, Mohammad Hassan and Blocki, Jeremiah},
  booktitle = {Proceedings of the 2024 ACM SIGSAC Conference on Computer and Communications Security},
  year      = {2024},
  doi       = {10.1145/3658644.3690374}
}