Paper 2016/049

Implementing a Toolkit for Ring-LWE Based Cryptography in Arbitrary Cyclotomic Number Fields

Christoph M. Mayer


Recent research in the field of lattice-based cryptography, especially on the topic of the ring-based primitive ring-LWE, provided efficient and practical ring-based cryptographic schemes, which can compete with more traditional number-theoretic ones. In the case of ring-LWE these cryptographic schemes operated mainly in power-of-two cyclotomics, which vastly restricted the variety of possible applications. Due to the toolkit for ring-LWE of Lyubashevsky, Peikert and Regev, there are now cryptographic schemes that operate in arbitrary cyclotomics, with no loss in their underlying hardness guarantees, and only little loss computational efficiency. Next to some further refinements and explanations of the theory and additional implementation notes, we provide the - as far as we know - first implementation of the toolkit of Lyubashevsky, Peikert and Regev. This includes a complete framework with fast and modular algorithms that can be used to build cryptographic schemes around ring-LWE. Our framework is easy to use, open source and has only little third party dependencies. For demonstration purposes we implemented two public-key cryptographic schemes using our framework. The complete source code is available at

Note: Added citation to Crocketts and Peikerts "LOL" paper. Some minor changes in the introduction.

Available format(s)
Publication info
Preprint. MINOR revision.
ring-LWElatticesimplementationlattice-based cryptographyalgebraic number theoryapplicationsarbitrary cyclotomic number fields
Contact author(s)
c m mayer @ gmx de
2016-01-25: revised
2016-01-19: received
See all versions
Short URL
Creative Commons Attribution


      author = {Christoph M.  Mayer},
      title = {Implementing a Toolkit for Ring-LWE Based Cryptography in Arbitrary Cyclotomic Number Fields},
      howpublished = {Cryptology ePrint Archive, Paper 2016/049},
      year = {2016},
      note = {\url{}},
      url = {}
Note: In order to protect the privacy of readers, does not use cookies or embedded third party content.