chacha

The ChaCha20 stream cipher (docs.ppad.tech/chacha).
git clone git://git.ppad.tech/chacha.git
Log | Files | Refs | README | LICENSE

ppad-chacha.cabal (2360B)


      1 cabal-version:      3.0
      2 name:               ppad-chacha
      3 version:            0.2.2
      4 synopsis:           A fast ChaCha20 stream cipher
      5 license:            MIT
      6 license-file:       LICENSE
      7 author:             Jared Tobin
      8 maintainer:         jared@ppad.tech
      9 category:           Cryptography
     10 build-type:         Simple
     11 tested-with:        GHC == 9.10.3
     12 extra-doc-files:    CHANGELOG
     13 description:
     14   A fast ChaCha20 stream cipher and block function.
     15 
     16 flag llvm
     17   description: Use GHC's LLVM backend.
     18   default:     False
     19   manual:      True
     20 
     21 flag sanitize
     22   description: Build with AddressSanitizer and UndefinedBehaviorSanitizer.
     23   default:     False
     24   manual:      True
     25 
     26 source-repository head
     27   type:     git
     28   location: git.ppad.tech/chacha.git
     29 
     30 library
     31   default-language: Haskell2010
     32   hs-source-dirs:   lib
     33   ghc-options:
     34       -Wall
     35   if flag(llvm)
     36     ghc-options: -fllvm -O2
     37   exposed-modules:
     38       Crypto.Cipher.ChaCha20
     39       Crypto.Cipher.ChaCha20.Arm
     40   build-depends:
     41       base >= 4.9 && < 5
     42     , bytestring >= 0.9 && < 0.13
     43     , primitive >= 0.8 && < 0.10
     44   c-sources:
     45       cbits/chacha20_arm.c
     46   if arch(aarch64)
     47     cc-options: -march=armv8-a
     48   if flag(sanitize)
     49     cc-options: -fsanitize=address,undefined -fno-omit-frame-pointer
     50     ghc-options: -optl=-fsanitize=address,undefined
     51 
     52 test-suite chacha-tests
     53   type:                exitcode-stdio-1.0
     54   default-language:    Haskell2010
     55   hs-source-dirs:      test
     56   main-is:             Main.hs
     57 
     58   ghc-options:
     59     -rtsopts -Wall -O2
     60   if flag(sanitize)
     61     ghc-options: -optl=-fsanitize=address,undefined
     62 
     63   build-depends:
     64       base
     65     , bytestring
     66     , ppad-base16
     67     , ppad-chacha
     68     , primitive
     69     , tasty
     70     , tasty-hunit
     71 
     72 benchmark chacha-bench
     73   type:                exitcode-stdio-1.0
     74   default-language:    Haskell2010
     75   hs-source-dirs:      bench
     76   main-is:             Main.hs
     77 
     78   ghc-options:
     79     -rtsopts -O2 -Wall
     80 
     81   build-depends:
     82       base
     83     , bytestring
     84     , criterion
     85     , deepseq
     86     , ppad-base16
     87     , ppad-chacha
     88 
     89 benchmark chacha-weigh
     90   type:                exitcode-stdio-1.0
     91   default-language:    Haskell2010
     92   hs-source-dirs:      bench
     93   main-is:             Weight.hs
     94 
     95   ghc-options:
     96     -rtsopts -O2 -Wall -fno-warn-orphans
     97   if flag(llvm)
     98     ghc-options: -fllvm
     99 
    100   build-depends:
    101       base
    102     , bytestring
    103     , deepseq
    104     , ppad-chacha
    105     , weigh
    106