Blum–Goldwasser Algebraic Decryption Correctness #
Explicit Blum-modulus square-root exponentiation and deterministic algebraic decryption correctness for the Goldreich–Levin inner-product variant of Blum–Goldwasser public-key encryption.
Original algebraic formalization: bgPadBit extracts one pad bit per squaring step via the
Goldreich–Levin Boolean inner product (Cslib.BitString.listDot) against the variable-length
binary expansion Nat.bits of the canonical residue of the state, rather than Blum–Goldwasser
(1984)'s least-significant-bit extraction. For a k-bit message m, encryption uses pad states
s_1, …, s_k and transmits the terminal state s_{k + 1} = s_k^2 = s_0 ^ (2 ^ (k + 1)) so that
s_k is not exposed in the ciphertext.
This module proves deterministic algebraic decryption correctness only; probabilistic key generation, randomized encryption, and IND-CPA security are not formalized here.
Main definitions #
Cslib.Crypto.blumOrder,Cslib.Crypto.blumSqrtExp: quadratic-residue group exponentt = (p - 1)(q - 1) / 4and square-root exponentu = (t + 1) / 2for a Blum modulusp * q.Cslib.Crypto.bgState,Cslib.Crypto.bgPadBit,Cslib.Crypto.BGCiphertext,Cslib.Crypto.bgEncrypt,Cslib.Crypto.bgDecrypt: repeated squaring state, inner-product hard-core pad bit, ciphertext structure, and deterministic Blum–Goldwasser encryption/decryption.
Main results #
Cslib.Crypto.pow_blumSqrtExp_eq_blumSqrt: exponentiating byblumSqrtExp p qagrees withCslib.Crypto.blumSqrt p q.Cslib.Crypto.blum_sq_inv_explicit:t = (p - 1)(q - 1) / 4is odd,2 * u = t + 1, and every quadratic residuex ∈ Q_{p * q}satisfiesx ^ t = 1and(x ^ 2) ^ u = x.Cslib.Crypto.bgState_recover_s1,Cslib.Crypto.bgDecrypt_bgEncrypt: exact seed recovery froms_{k + 1}and deterministic decryption correctness for all message lengthsk : ℕ.
Blum-integer quadratic-residue exponent t = (p - 1) * (q - 1) / 4.
Explicit modular square-root exponent u = (t + 1) / 2 on Q_{p * q}.
Raising a unit modulo p * q to blumSqrtExp p q equals blumSqrt p q.
Explicit Blum-integer exponent inversion: for any Blum modulus n = p * q,
t = (p - 1)(q - 1) / 4 is odd, u = (t + 1) / 2 satisfies 2 * u = t + 1, and every
quadratic residue x ∈ quadResidueSet p q satisfies x ^ t = 1 and (x ^ 2) ^ u = x.
Inner-product hard-core pad bit ⟨x, bits(s)⟩ mod 2, computed with Cslib.BitString.listDot
against the variable-length binary expansion Nat.bits of the canonical residue of s (rather
than Blum–Goldwasser 1984's LSB extraction). Original algebraic variant for this library.
A Blum–Goldwasser ciphertext for a k-bit message under modulus n, carrying the inner-product
mask mask, the terminal squaring state finalState = s_{k + 1} = s₀ ^ (2 ^ (k + 1)) (one
squaring past the last pad state s_k), and the masked message bits.
Inner-product mask
xfor the Goldreich–Levin pad bits.Terminal squaring state
s_{k + 1} = s₀ ^ (2 ^ (k + 1)) mod n.Masked message bits
m_i ⊕ bgPadBit n x s_{i + 1}for0 ≤ i < k.
Deterministic algebraic encryption map for the Goldreich–Levin inner-product variant of
Blum–Goldwasser encryption: given modulus n, mask x, seed s₀ ∈ (ZMod n)ˣ, and k-bit
message m, outputs BGCiphertext n k with finalState = s_{k + 1} and pad states
s_1, …, s_k. Original algebraic formalization; no probabilistic key generation or IND-CPA
security is formalized here.
Deterministic algebraic decryption map for the Goldreich–Levin inner-product variant of
Blum–Goldwasser encryption: given Blum primes (p, q) and ct : BGCiphertext (p * q) k,
computes t = (p - 1)(q - 1) / 4, u = (t + 1) / 2, v = u ^ k % t, recovers
s₁ = ct.finalState ^ v from s_{k + 1}, regenerates the pad bits on s_1, …, s_k, and outputs
ct.bits ⊕ pad.
Blum–Goldwasser seed recovery: for any Blum modulus n = p * q, any message length k : ℕ,
and any initial seed s₀ ∈ (ZMod (p * q))ˣ, raising s_{k + 1} to v = u ^ k % t recovers
s₁ = s₀ ^ 2 exactly.
Deterministic algebraic decryption correctness for the inner-product Blum–Goldwasser variant:
for every Blum modulus n = p * q, message length k : ℕ, mask x, seed s₀, and message
m : Fin k → Bool, bgDecrypt p q (bgEncrypt (p * q) x s₀ m) = m.