<commit_before>homepage: https://github.com/cpeikert/Lol
changelog-type: markdown
hash: bc9524337ed4a7608bda8a983259e6e381621d8a0914531833a5d1a761ba7971
test-bench-deps: {}
maintainer: <NAME> <<EMAIL>>
synopsis: A library for lattice cryptography.
changelog: ! "Changelog for lol project\n================================\n\n0.6.0.0\n----\n
  * Support for serializing ring products, linear functions, and TypeReps.\n * Split
  previous lol package into separate tensor packages lol-cpp and lol-repa\n   and
  utility packages lol-benches and lol-tests.\n * Moved test and benchmark code to
  packages lol-tests and lol-benches, respectively.\n * Simpler tests and benchmarks
  (though microbenchmarks might be slightly slower\n   than 0.5.0.2).\n * Fixed minor
  bug in IrreducibleChar2.hs\n * Moved tensor-specific instances (Elt, Unbox, etc)
  to tensor packages\n   (lol-cpp and lol-repa).\n\n0.5.0.2\n----\n * Updates to README.\n\n0.5.0.1\n----\n
  * Benchmarks now compile.\n\n0.5.0.0\n----\n * Dramatically improved CT performance
  using Haskell INLINE/INLINABLE pragmas.\n * Removed fmapTM from Tensor.\n * Removed
  valuePPs, totientPPs, radicalPPs, oddRadicalPPs from Factored.\n * K_q (i.e. base
  ring RRq) is now serialized with a discrete modulus.\n * Fixed a bug in UCyc.divG.
  The result is `divG` is now split into `divGPow`\n   `divGDec`, and `divGCRTC`.\n
  * Added `UCycPC` type synonym to UCyc.\n * Added data-level interface for Factored.\n
  * Added Random instance for FiniteField.\n\n0.4.0.0\n----\n * Added support for
  GHC 8.0, also compatible with 7.10.3\n * Converted documentation to MathJax\n *
  Renamed Tensor.Matrix -> Tensor.Kron\n * Added Crypto.Lol.Types interface file\n\n0.3.0.0\n-----\n
  * Support for protocol-buffers\n * Support for reifying Factored types\n * Support
  for reals (RR) mod q\n * Replaced C backend with C++ backend\n * Renamed LatticePrelude
  -> Prelude\n * Added monad argument to CRTrans\n\n0.2.0.0\n-----\n * Added benchmarks\n
  * Better performance for C backend with RNS base ring\n * UCyc exposes bases as
  type for safety\n * Other safety improvements throughout\n * Easier index representation
  with TemplateHaskell\n * Split SymmSHE into new package lol-apps.\n\n0.1.0.0\n-----\n
  * Fixed bug in Box-Muller sampling routine.\n * Changed how we lift linear functions
  for better noise control.\n * Split entailment functions in Tensor.\n * Increased
  performance in FastCyc by better handling Sub constructors."
basic-deps:
  bytestring: <0.11
  reflection: ! '>=1.5.1 && <2.2'
  MonadRandom: ! '>=0.2 && <0.6'
  base: ! '>=4.9 && <5'
  protocol-buffers: <2.5
  crypto-api: <0.14
  constraints: <0.10
  data-default: ! '>=0.3.0 && <0.8'
  protocol-buffers-descriptor: <2.5
  containers: ! '>=0.5.6.2 && <0.6'
  singletons: ! '>=1.1.2.1 && <2.3'
  tagged-transformer: ! '>=0.7 && <0.9'
  arithmoi: ! '>=0.4.1.3 && <0.5'
  mtl: ! '>=2.2.1 && <2.3'
  random: ! '>=1.1 && <1.2'
  deepseq: ! '>=1.4.1.1 && <1.5'
  vector-th-unbox: ! '>=0.2.1.0 && <0.3'
  template-haskell: ! '>=2.2.0.0 && <2.12'
  vector: ! '>=0.11 && <0.13'
  numeric-prelude: ! '>=0.4.2 && <0.5'
  monadcryptorandom: <0.8
  directory: <1.4
all-versions:
- 0.1.0.0
- 0.2.0.0
- 0.2.0.1
- 0.3.0.0
- 0.4.0.0
- 0.5.0.1
- 0.5.0.2
- 0.6.0.0
author: <NAME> <<EMAIL>>, <NAME> <<EMAIL>>
latest: 0.6.0.0
description-type: text
description: ! "\nThis package is primarily a library providing interfaces for lattice
  cryptography\nprimitives. There are two main interfaces: 'Cyclotomic' and 'Tensor'.
  The\nCyclotomic interface is the outward-facing API that is used to build cryptographic\napplications
  like pseudo-random functions, encryption, etc. The Tensor interface allows\nmultiple
  backends to implement the functionality used by the Cyclotomic interface.\nUnless
  you are writing a new backend implementation, you shouldn't need to\nunderstand
  the Tensor interface. However, you *will* need an implementation of the\nTensor
  interface in order to test, benchmark, and run applications.\n\nMost of the functionality
  in Lol is exported by two modules:\n\n* 'Crypto.Lol' exports the primary *interfaces*
  of Lol\n\n* 'Crypto.Lol.Types' exports concrete types that would be used by most\n
  \ instantiations.\n\nFor a brief introduction to relevant mathematical notation,
  see 'Crypto.Lol'.\n\nOverview of key modules, roughly from highest- to lowest-level:\n\nCyclotomic
  layer:\n* 'Crypto.Lol.Cyclotomic.Cyc', which defines an interface for using cyclotomic\n
  \ fields, rings \\( R \\), and quotient rings \\( R_q=R/qR \\); as well as many\n
  \ other commonly used operations, e.g., converting\n  between rings, decoding and
  decomposing elements, modulus\n  reduction/rounding, etc. 'Cyc' is a safe wrapper
  around the\n  'UCyc' type, which exposes some representation-dependent operations.\n
  \ 'UCyc' (and hence 'Cyc') is implemented using a generic 'Tensor'\n  (described
  below).\n\n\nTensor layer:\n* 'Crypto.Lol.Cyclotomic.Tensor', which defines a class
  that encapsulates all\n  the necessary linear transformations for operating on representations
  of\n  \\( R \\)- and \\( R_q \\)-elements, e.g., the CRT transform, converting between\n
  \ the powerful and decoding bases, generating error terms, etc.\n\n* You will need
  an implementation of the 'Tensor' interface in order to use Lol.\n  Two implementations
  can be found at\n  <https://hackage.haskell.org/package/lol-cpp lol-cpp>\n  and
  <https://hackage.haskell.org/package/lol-repa lol-repa>.\n\n\nBase ring layer:\n*
  'Crypto.Lol.Types.FiniteField', which gives an unoptimized implementation of\n  finite
  field arithmetic. To use this module, you will need an instance of\n  'IrreduciblePoly'.
  These instances provide irreducible polynomials\n  for various degrees and base
  fields.  One (orphan) instance is provided for\n  characteristic 2 fields of size
  up to 2^128 in\n  'Crypto.Lol.Types.IrreducibleChar2', and is exported by 'Crypto.Lol.Types'.\n
  \ If you need to use an unsupported finite field,  define your own\n  instance of
  'IrreduciblePoly' and do **not** import 'IrreducibleChar2'.\n\n* 'Crypto.Lol.Types.Unsafe.ZqBasic',
  which is a basic implementation of\n  \\( \\Z_q=\\Z/q\\Z \\) arithmetic.\n\n* 'Crypto.Lol.Factored',
  which contains type-level support code for\n  factored integers. It also supports
  \"reifying\" 'Int's at runtime as static\n  types and \"reflecting\" those types
  as integers back to the code..\n  'Factored' types are mainly used to represent
  cyclotomic indices.\n\nTests and benchmarks can be found in the packages <https://hackage.haskell.org/package/lol-tests
  lol-tests> and <https://hackage.haskell.org/package/lol-benches lol-benches>,\nrespectively,
  though they are instantiated in individual tensors."
license-name: GPL-2.0-only<commit_msg>Update from Hackage at 2020-02-19T19:43:29Z<commit_after>homepage: https://github.com/cpeikert/lol#readme
changelog-type: markdown
hash: 748ee336c1dbe0fe05a644eb1b9289bdf249dde618b6d619d08ac64bbb8f5526
test-bench-deps:
  lol: -any
  test-framework: -any
  base: -any
maintainer: |-
  <NAME> <<EMAIL>>,
  <NAME> <<EMAIL>>
synopsis: A library for lattice cryptography.
changelog: |-
  Changelog for lol project
  ================================

  0.6.0.0
  ----
   * Support for serializing ring products, linear functions, and TypeReps.
   * Split previous lol package into separate tensor packages lol-cpp and lol-repa
     and utility packages lol-benches and lol-tests.
   * Moved test and benchmark code to packages lol-tests and lol-benches, respectively.
   * Simpler tests and benchmarks (though microbenchmarks might be slightly slower
     than 0.5.0.2).
   * Fixed minor bug in IrreducibleChar2.hs
   * Moved tensor-specific instances (Elt, Unbox, etc) to tensor packages
     (lol-cpp and lol-repa).

  0.5.0.2
  ----
   * Updates to README.

  0.5.0.1
  ----
   * Benchmarks now compile.

  0.5.0.0
  ----
   * Dramatically improved CT performance using Haskell INLINE/INLINABLE pragmas.
   * Removed fmapTM from Tensor.
   * Removed valuePPs, totientPPs, radicalPPs, oddRadicalPPs from Factored.
   * K_q (i.e. base ring RRq) is now serialized with a discrete modulus.
   * Fixed a bug in UCyc.divG. The result is `divG` is now split into `divGPow`
     `divGDec`, and `divGCRTC`.
   * Added `UCycPC` type synonym to UCyc.
   * Added data-level interface for Factored.
   * Added Random instance for FiniteField.

  0.4.0.0
  ----
   * Added support for GHC 8.0, also compatible with 7.10.3
   * Converted documentation to MathJax
   * Renamed Tensor.Matrix -> Tensor.Kron
   * Added Crypto.Lol.Types interface file

  0.3.0.0
  -----
   * Support for protocol-buffers
   * Support for reifying Factored types
   * Support for reals (RR) mod q
   * Replaced C backend with C++ backend
   * Renamed LatticePrelude -> Prelude
   * Added monad argument to CRTrans

  0.2.0.0
  -----
   * Added benchmarks
   * Better performance for C backend with RNS base ring
   * UCyc exposes bases as type for safety
   * Other safety improvements throughout
   * Easier index representation with TemplateHaskell
   * Split SymmSHE into new package lol-apps.

  0.1.0.0
  -----
   * Fixed bug in Box-Muller sampling routine.
   * Changed how we lift linear functions for better noise control.
   * Split entailment functions in Tensor.
   * Increased performance in FastCyc by better handling Sub constructors.
basic-deps:
  criterion-measurement: ! '>=0.1.2 && <0.2'
  bytestring: ! '>=0.10.8 && <0.11'
  reflection: ! '>=2.1.5 && <2.2'
  test-framework: ! '>=0.8.2 && <0.9'
  MonadRandom: ! '>=0.5.1 && <0.6'
  base: ! '>=4.12.0 && <4.13'
  protocol-buffers: ! '>=2.4.12 && <2.5'
  test-framework-quickcheck2: ! '>=0.3.0 && <0.4'
  criterion: ! '>=1.5.6 && <1.6'
  crypto-api: ! '>=0.13.3 && <0.14'
  constraints: ! '>=0.10.1 && <0.11.0'
  data-default: ! '>=0.7.1 && <0.8'
  protocol-buffers-descriptor: ! '>=2.4.12 && <2.5'
  containers: ! '>=0.6.0 && <0.7'
  singletons: ! '>=2.5.1 && <2.6'
  ansi-terminal: ! '>=0.9.1 && <0.10.0'
  tagged-transformer: ! '>=0.8.1 && <0.9'
  arithmoi: ! '>=0.9.0 && <0.10'
  mtl: ! '>=2.2.2 && <2.3'
  statistics: ! '>=0.15.1 && <0.16'
  random: ! '>=1.1 && <1.2'
  deepseq: ! '>=1.4.4 && <1.5'
  vector-th-unbox: ! '>=0.2.1 && <0.3'
  QuickCheck: ! '>=2.13.2 && <2.14'
  template-haskell: ! '>=2.14.0 && <2.15'
  vector: ! '>=0.12.0 && <0.13'
  numeric-prelude: ! '>=0.4.3 && <0.5'
  monadcryptorandom: ! '>=0.7.2 && <0.8'
  directory: ! '>=1.3.3 && <1.4'
all-versions:
- 0.1.0.0
- 0.2.0.0
- 0.2.0.1
- 0.3.0.0
- 0.4.0.0
- 0.5.0.1
- 0.5.0.2
- 0.6.0.0
- 0.7.0.0
author: |-
  <NAME> <<EMAIL>>,
  <NAME> <<EMAIL>>
latest: 0.7.0.0
description-type: text
description: |
  This package is primarily a library providing high-level interfaces
  for lattice cryptography primitives. There are two main collections of
  interfaces: 'Cyclotomic' and 'Tensor'. The Cyclotomic interface can be
  used to build cryptographic primitives like encryption, pseudorandom
  functions, etc. The lower-level Tensor interface allows multiple
  backends to implement the functionality used by the Cyclotomic
  interface.  Unless you are writing a new backend implementation, you
  do not need to understand the Tensor interface. However, you *will*
  need an implementation of the Tensor interface in order to test,
  benchmark, and run applications.

  Most of the functionality in Lol is exported by two modules:

  * 'Crypto.Lol' exports the primary *interfaces* of Lol.

  * 'Crypto.Lol.Types' exports concrete types that would tend to be used
    by most instantiations.

  For a brief introduction to the relevant mathematical notation, see
  'Crypto.Lol'.

  Overview of key modules, roughly from highest- to lowest-level:

  Cyclotomic layer:

  * 'Crypto.Lol.Cyclotomic.Cyc' defines an interface for using
    cyclotomic fields \( K \), rings \( R \), and quotient rings \(
    R_q=R/qR \); as well as many other commonly used operations, e.g.,
    converting between rings; reducing, lifting, and decomposing
    elements; modulus reduction/rounding; etc. 'Cyc' is a safe wrapper
    around the 'CycRep' type, which exposes some
    representation-dependent operations.  'CycRep' (and hence 'Cyc') is
    implemented using a generic 'Tensor' (described below).

  Tensor layer:

  * 'Crypto.Lol.Cyclotomic.Tensor' defines interfaces that encapsulate
    all the necessary linear transformations for operating on
    representations of \( R \)- and \( R_q \)-elements, e.g., the CRT
    transform, converting between the powerful and decoding bases,
    generating error terms, etc.

  * You will need an implementation of the 'Tensor' interface in order
    to use Lol. The main up-to-date implementation is
    <https://hackage.haskell.org/package/lol-cpp lol-cpp>
    (<https://hackage.haskell.org/package/lol-repa lol-repa> is out of
    date).

  Base-ring layer:

  * 'Crypto.Lol.Types.FiniteField' gives an unoptimized implementation
    of finite-field arithmetic. To use this module, you will need an
    instance of 'IrreduciblePoly', which provides irreducible
    polynomials for various degrees and base fields. One (orphan)
    instance is provided for characteristic-2 fields of size up to 2^128
    in 'Crypto.Lol.Types.IrreducibleChar2', and is exported by
    'Crypto.Lol.Types'.  If you need to use an unsupported finite field,
    define your own instance of 'IrreduciblePoly' and do **not** import
    'IrreducibleChar2'.

  * 'Crypto.Lol.Types.Unsafe.ZqBasic', which is a basic implementation
    of \( \Z_q=\Z/q\Z \) arithmetic.

  * 'Crypto.Lol.Factored', which contains type-level support code for
    factored integers. It also supports "reifying" 'Int's at runtime as
    static types and "reflecting" those types as integer
    values. 'Factored' types are mainly used to represent cyclotomic
    indices.

  A collection of polymorphic tests and benchmarks can be found in the
  packages <https://hackage.haskell.org/package/lol-tests lol-tests> and
  <https://hackage.haskell.org/package/lol-benches lol-benches>,
  respectively. These tests should be (and are) instantiated for
  specific 'Tensor' backends by the corresponding tensor packages.
license-name: GPL-3.0-only
{'fraction_non_alphanumeric': 0.13088895120583285, 'fraction_numerical': 0.037787436904094224, 'mean_word_length': 3.3266606005459507, 'pattern_counts': {'":': 0, '<': 83, '<?xml version=': 0, '>': 80, 'https://': 10, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 43, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6846591', 'n_tokens_mistral': 5181, 'n_tokens_neox': 4865, 'n_words': 1553}