Lably
Skip to content

Blum–Goldwasser cryptosystem

Asymmetric key encryption algorithm

  • 4 min read
  • 4 chapters

Related on Lably

Through Integer factorization and Prime number

The BG cryptosystem is semantically secure based on the assumed intractability of integer factorization; specifically, factoring a composite value N=pq where p,q are large primes. BG has multiple advantages over earlier probabilistic encryption schemes such as the Goldwasser–Micali cryptosystem. First, its semantic security reduces solely to integer factorization, without requiring any additional assumptions (e.g., hardness of the quadratic residuosity problem or the RSA problem). Secondly, BG is efficient in terms of storage, inducing a constant-size ciphertext expansion regardless of message length. BG is also relatively efficient in terms of computation, and fares well even in comparison with cryptosystems such as RSA (depending on message length and exponent choices). However, BG is highly vulnerable to adaptive chosen ciphertext attacks (see below).

Because encryption is performed using a probabilistic algorithm, a given plaintext may produce very different ciphertexts each time it is encrypted. This has significant advantages, as it prevents an adversary from recognizing intercepted messages by comparing them to a dictionary of known ciphertexts.

Operation

The Blum–Goldwasser cryptosystem consists of three algorithms: a probabilistic key generation algorithm which produces a public and a private key, a probabilistic encryption algorithm, and a deterministic decryption algorithm.

Key generation

The public and private keys are generated as follows:

  1. Choose two large distinct prime numbers p and q such that p≡3mod4 and q≡3mod4.
  2. Compute n=pq.

Then n is the public key and the pair (p,q) is the private key.

Encryption

A message M is encrypted with the public key n as follows:

  1. Compute the block size in bits, h=⌊log2(log2(n))⌋.
  2. Convert M to a sequence of t blocks m1,m2,…,mt, where each block is h bits in length.
  3. Select a random integer r<n.
  4. Compute x0=r2modn.
  5. For i from 1 to t
    1. Compute xi=xi−12modn.
    2. Compute pi= the least significant h bits of xi.
    3. Compute ci=mi⊕pi.
  6. Finally, compute xt+1=xt2modn.

The encryption of the message M is then all the ci values plus the final xt+1 value: (c1,c2,…,ct,xt+1).

Decryption

An encrypted message (c1,c2,…,ct,x) can be decrypted with the private key (p,q) as follows:

  1. Compute dp=((p+1)/4)t+1mod(p−1).
  2. Compute dq=((q+1)/4)t+1mod(q−1).
  3. Compute up=xdpmodp.
  4. Compute uq=xdqmodq.
  5. Using the Extended Euclidean Algorithm, compute rp and rq such that rpp+rqq=1.
  6. Compute x0=uqrpp+uprqqmodn. This will be the same value which was used in encryption (see proof below). x0 can then used to compute the same sequence of xi values as were used in encryption to decrypt the message, as follows.
  7. For i from 1 to t
    1. Compute xi=xi−12modn.
    2. Compute pi= the least significant h bits of xi.
    3. Compute mi=ci⊕pi.
  8. Finally, reassemble the values (m1,m2,…,mt) into the message M.

Sign in to keep reading

3 more chapters are free with a Lably account.

More in Computing and communication