**CEILIDH** is a "public key "cryptosystem based on the "discrete logarithm problem in "algebraic torus. This idea was first introduced by "Alice Silverberg and "Karl Rubin in 2003. The main advantage of the system is the reduced size of the keys for the same security over basic schemes.^{["which?]}

The name CEILIDH comes from the Scots Gaelic word "ceilidh which means a traditional Scottish Gathering.

- Let be a prime power.
- An "integer is chosen such that :
- The torus has an explicit rational parametrization.
- is divisible by a big prime where is the "Cyclotomic polynomial.

- Let where is the "Euler function.
- Let a birational map and its inverse .
- Choose of order and let .

This Scheme is based on the "Diffie-Hellman key agreement.

- Alice chooses a random number .
- She computes and sends it to Bob.
- Bob chooses a random number .
- He computes and sends it to Alice.
- Alice computes
- Bob computes

is the identity, thus we have : which is the shared secret of Alice and Bob.

This scheme is based on the "ElGamal encryption.

**Key Generation**- Alice chooses a random number as her private key.
- The resulting public key is .

**Encryption**- The message is an element of .
- Bob chooses a random integer in the range .
- Bob computes and .
- Bob sends the ciphertext to Alice.

**Decryption**- Alice computes .

The CEILIDH scheme is based on the ElGamal scheme and thus has similar security properties.

If the "computational Diffie-Hellman assumption holds the underlying cyclic group , then the encryption function is "one-way.^{[1]} If the "decisional Diffie-Hellman assumption (DDH) holds in , then CEILIDH achieves "semantic security.^{[1]} Semantic security is not implied by the computational Diffie-Hellman assumption alone.^{[2]} See "decisional Diffie-Hellman assumption for a discussion of groups where the assumption is believed to hold.

CEILIDH encryption is unconditionally "malleable, and therefore is not secure under "chosen ciphertext attack. For example, given an encryption of some (possibly unknown) message , one can easily construct a valid encryption of the message .

- ^
^{a}^{b}"El-gamal Encryption Scheme".*CRYPTUTOR*. Archived from the original on 2009-04-21. Retrieved 2009-04-21. **^**Abdalla, M.; Bellare, M.; Rogaway, P. (September 1998). "DHIES: An encryption scheme based on the Diffie-Hellman Problem (Appendix A)" (PDF).*IEEE P P1363a*.

- Karl Rubin, Alice Silverberg: Torus-Based Cryptography. CRYPTO 2003: 349–365

- Torus-Based Cryptography — the paper introducing the concept (in PDF).