packages feed

lol-apps-0.2.0.0: lol-apps.cabal

name:                lol-apps
-- The package version.  See the Haskell package versioning policy (PVP)
-- for standards guiding when and how versions should be incremented.
-- http://www.haskell.org/haskellwiki/Package_versioning_policy
-- PVP summary:      +-+------- breaking API changes
--                   | | +----- non-breaking API additions
--                   | | | +--- code changes with no API change
version:             0.2.0.0
synopsis:            Lattice-based cryptographic applications using Lol.
homepage:            https://github.com/cpeikert/Lol
Bug-Reports:         https://github.com/cpeikert/Lol/issues
license:             GPL-2
license-file:        LICENSE
author:              Eric Crockett <ecrockett0@gmail.com>, Chris Peikert <cpeikert@alum.mit.edu>
maintainer:          Eric Crockett <ecrockett0@gmail.com>
copyright:           Eric Crockett, Chris Peikert
category:            Crypto
stability:           experimental
build-type:          Simple
extra-source-files:  README, CHANGES.md, SHE.proto, HomomPRF.proto
cabal-version:       >= 1.10
description:
    This library contains example cryptographic applications built using
    <https://hackage.haskell.org/package/lol Λ ∘ λ>  (Lol),
    a general-purpose library for ring-based lattice cryptography.

source-repository head
  type: git
  location: https://github.com/cpeikert/Lol

Flag llvm
  Description:  Compile via LLVM. This produces much better object code,
                but you need to have the LLVM compiler installed.

  Default:      False

Flag opt
  Description: Turn on library optimizations
  Default:     True
  Manual:      False

library
  default-language:   Haskell2010

  if flag(llvm)
    ghc-options: -fllvm -optlo-O3

  -- ghc optimizations
  if flag(opt)
    ghc-options: -O3 -Odph -funbox-strict-fields -fwarn-dodgy-imports
    ghc-options: -fno-liberate-case -funfolding-use-threshold1000 -funfolding-keeness-factor1000

  exposed-modules:
    Crypto.Lol.Applications.HomomPRF
    Crypto.Lol.Applications.KeyHomomorphicPRF
    Crypto.Lol.Applications.SymmSHE
    Crypto.Proto.HomomPRF
    Crypto.Proto.HomomPRF.LinearFuncChain
    Crypto.Proto.HomomPRF.RoundHintChain
    Crypto.Proto.HomomPRF.TunnelInfoChain
    Crypto.Proto.SHE
    Crypto.Proto.SHE.KSHint
    Crypto.Proto.SHE.RqPolynomial
    Crypto.Proto.SHE.SecretKey
    Crypto.Proto.SHE.TunnelInfo

  build-depends:
    base >= 4.9 && < 5,
    containers,
    deepseq >= 1.4.1.1,
    lol >= 0.6.0.0,
    MonadRandom >= 0.2,
    mtl,
    numeric-prelude >= 0.4.2,
    protocol-buffers,
    protocol-buffers-descriptor,
    singletons,
    split

test-suite test-apps
  type:             exitcode-stdio-1.0
  hs-source-dirs:   tests, examples
  default-language: Haskell2010
  main-is:          TestAppsMain.hs
  ghc-options:      -main-is TestAppsMain
  other-modules:    KHPRFTests, SHETests

  ghc-options:      -threaded -rtsopts

  build-depends:
    arithmoi,
    base >= 4.9 && < 5,
    constraints,
    deepseq,
    DRBG,
    lol >= 0.6.0.0,
    lol-apps,
    lol-cpp,
    lol-repa,
    lol-tests,
    MonadRandom,
    mtl,
    numeric-prelude,
    QuickCheck >= 2.8,
    random,
    repa,
    singletons,
    test-framework >= 0.8,
    test-framework-quickcheck2 >= 0.3,
    vector

Benchmark bench-apps
  type:             exitcode-stdio-1.0
  hs-source-dirs:   benchmarks, examples
  default-language: Haskell2010
  main-is:          BenchAppsMain.hs
  ghc-options:      -main-is BenchAppsMain
  other-modules:    KHPRFBenches, SHEBenches

--  if flag(llvm)
--    ghc-options: -fllvm -optlo-O3
  ghc-options: -threaded -rtsopts
--  ghc-options: -O2 -Odph -funbox-strict-fields -fwarn-dodgy-imports -rtsopts
--  ghc-options: -fno-liberate-case -funfolding-use-threshold1000 -funfolding-keeness-factor1000

  build-depends:
    arithmoi,
    base >= 4.9 && < 5,
    containers,
    criterion,
    deepseq,
    DRBG,
    lol >= 0.6.0.0,
    lol-apps,
    lol-benches,
    lol-cpp,
    lol-repa,
    MonadRandom,
    mtl,
    numeric-prelude,
    singletons,
    transformers,
    vector,
    repa

executable homomprf
  hs-source-dirs: examples
  default-language: Haskell2010
  main-is: HomomPRFMain.hs
  ghc-options: -main-is HomomPRFMain
  other-modules: HomomPRFParams

  ghc-options: -threaded -rtsopts

  build-depends:
    arithmoi,
    base >= 4.9 && < 5,
    deepseq,
    DRBG,
    filepath,
    lol >= 0.6.0.0,
    lol-apps,
    lol-cpp,
    MonadRandom,
    mtl,
    numeric-prelude,
    singletons,
    time

executable khprf
  hs-source-dirs: examples
  default-language: Haskell2010
  main-is: KHPRFMain.hs
  ghc-options: -main-is KHPRFMain

  ghc-options: -threaded -rtsopts

  build-depends:
    arithmoi,
    base >= 4.9 && < 5,
    deepseq,
    lol >= 0.6.0.0,
    lol-apps,
    lol-cpp,
    MonadRandom,
    mtl,
    numeric-prelude

executable symmshe
  hs-source-dirs:   examples
  default-language: Haskell2010
  main-is:          SHEMain.hs
  ghc-options: -main-is SHEMain

  ghc-options: -threaded -rtsopts

  build-depends:
    arithmoi,
    base >= 4.9 && < 5,
    lol >= 0.6.0.0,
    lol-apps,
    lol-cpp,
    MonadRandom,
    numeric-prelude