TheGoldwasser–Micali (GM) cryptosystem is anasymmetric key encryption algorithm developed byShafi Goldwasser andSilvio Micali in 1982. GM has the distinction of being the firstprobabilistic public-key encryption scheme which isprovably secure under standard cryptographic assumptions. However, it is not an efficient cryptosystem, as ciphertexts may be several hundred times larger than the initial plaintext. To prove the security properties of the cryptosystem, Goldwasser and Micali proposed the widely used definition ofsemantic security.
The GM cryptosystem issemantically secure based on the assumed intractability of thequadratic residuosity problem modulo a compositeN =pq wherep, q are largeprimes. This assumption states that given (x,N) it is difficult to determine whetherx is a quadratic residue moduloN (i.e.,x =y2 modN for somey), when theJacobi symbol forx is +1. The quadratic residue problem is easily solved given the factorization ofN, while new quadratic residues may be generated by any party, even without knowledge of this factorization. The GM cryptosystem leverages this asymmetry by encrypting individual plaintext bits as either random quadratic residues or non-residues moduloN, all with quadratic residue symbol +1. Recipients use the factorization ofN as asecret key, and decrypt the message by testing the quadratic residuosity of the received ciphertext values.
Because Goldwasser–Micali produces a value of size approximately |N| to encrypt every single bit of a plaintext, GM encryption results in substantialciphertext expansion. To preventfactorization attacks, it is recommended that |N| be several hundred bits or more. Thus, the scheme serves mainly as a proof of concept, and more efficient provably-secure schemes such asElGamal have been developed since.
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.
Goldwasser–Micali 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.
The scheme relies on deciding whether a given valuex is a square modN, given the factorization (p,q) ofN. This can be accomplished using the following procedure:
The modulus used in GM encryption is generated in the same manner as in theRSA cryptosystem. (SeeRSA, key generation for details.)
Thepublic key consists of (x, N). The secret key is the factorization (p, q).
Suppose Bob wishes to send a messagem to Alice:
Bob sends the ciphertext (c1, ...,cn).
Alice receives (c1, ...,cn). She can recoverm using the following procedure:
Alice outputs the messagem = (m1, ...,mn).
There is a simplereduction from breaking this cryptosystem to the problem of determining whether a random value moduloN with Jacobi symbol+1 is a quadratic residue. If an algorithmA breaks the cryptosystem,then to determine if a given valuex is a quadratic residue moduloN, we testA to see if it can break the cryptosystem using (x,N) as a public key. Ifx is a non-residue, thenA should work properly. However, ifx is a residue, then every "ciphertext" will simply be a random quadratic residue, soA cannot be correct more than half of the time. Furthermore, this problem israndom self-reducible, which ensures that for a givenN, every public key is just as secure as every other public key.
The GM cryptosystem hashomomorphic properties, in the sense that ifc0,c1 are the encryptions of bitsm0,m1, thenc0c1 mod N will be an encryption of. For this reason, the GM cryptosystem is sometimes used in more complex cryptographic primitives.