
ElGamal encryption
ElGamal encryption is a method of securing messages using a pair of mathematically related keys: a public key for encryption and a private key for decryption. It relies on the difficulty of solving certain mathematical problems (discrete logarithms). To encrypt a message, the sender combines the message with a random value and the recipient's public key, producing ciphertext that only the private key holder can decrypt. This process ensures confidentiality, so only intended recipients can read the message, while the randomness provides added security against eavesdroppers.