User:Cspan64/Sandbox
From Wikipedia, the free encyclopedia
|
[edit] Key generation
To allow for decryption, the modulus used in Blum-Goldwasser encryption should be a Blum integer. This value is generated in the same manner as an RSA modulus, except that the prime factors (p,q) must be congruent to 3 mod 4. (See RSA, key generation for details.)
- Alice generates two large prime numbers and such that , randomly and independently of each other, where mod 4.
- Alice computes N = pq.
- Alice can also precompute now and , so that
ap + bq = 1 (Bezout's identity) using the extended euclidean algorithm.
The public key is N. The secret key is the factorization (p,q).
[edit] Message decryption
Alice receives . She can recover m using the following procedure:
- Using the prime factorization (p,q), Alice computes and .
- Compute the initial seed
- From x0, recompute the bit-vector using the BBS generator, as in the encryption algorithm.
- Compute the plaintext by XORing the keystream with the ciphertext: .
Alice recovers the plaintext .