packages feed

mldsa-0.1.0.0: mldsa.cabal

cabal-version: 2.2

-- This file has been generated from package.yaml by hpack version 0.39.1.
--
-- see: https://github.com/sol/hpack

name:           mldsa
version:        0.1.0.0
synopsis:       Module-Lattice-based Digital Signature Algorithm
description:    Module-Lattice-based Digital Signature Algorithm (ML-DSA) implemented in
                Haskell.
category:       Cryptography
homepage:       https://codeberg.org/ocheron/hs-mldsa#readme
bug-reports:    https://codeberg.org/ocheron/hs-mldsa/issues
author:         Olivier Chéron
maintainer:     olivier.cheron@gmail.com
copyright:      2026 Olivier Chéron
license:        BSD-3-Clause
license-file:   LICENSE
build-type:     Simple
extra-source-files:
    README.md
    tests/get-vectors.sh
extra-doc-files:
    CHANGELOG.md

source-repository head
  type: git
  location: https://codeberg.org/ocheron/hs-mldsa

flag use_crypton
  description: Use crypton instead of cryptonite
  manual: True
  default: True

library
  exposed-modules:
      Crypto.PubKey.ML_DSA
  other-modules:
      Auxiliary
      Base
      Block
      BlockN
      Builder
      ByteArrayST
      Crypto
      Equality
      Fusion
      Internal
      Iterate
      Machine
      Marking
      Math
      Matrix
      ScrubbedBlock
      SecureBlock
      SecureBytes
      Vector
      Paths_mldsa
  autogen-modules:
      Paths_mldsa
  hs-source-dirs:
      src
  ghc-options: -Wall -Wcompat -Widentities -Wincomplete-record-updates -Wincomplete-uni-patterns -Wmissing-export-lists -Wmissing-home-modules -Wpartial-fields -Wredundant-constraints -Wno-unticked-promoted-constructors -O2
  build-depends:
      base >=4.7 && <5
    , deepseq
    , primitive >=0.7.2
  default-language: Haskell2010
  if flag(use_crypton)
    build-depends:
        crypton >=1.1.1
      , ram
  else
    build-depends:
        cryptonite >=0.26
      , memory

test-suite mldsa-test
  type: exitcode-stdio-1.0
  main-is: Tests.hs
  other-modules:
      KeyGen
      SigExt
      SigGen
      SigVer
      Util
      Vectors
      Paths_mldsa
  autogen-modules:
      Paths_mldsa
  hs-source-dirs:
      tests
  ghc-options: -Wall -Wcompat -Widentities -Wincomplete-record-updates -Wincomplete-uni-patterns -Wmissing-export-lists -Wmissing-home-modules -Wpartial-fields -Wredundant-constraints -Wno-unticked-promoted-constructors -threaded -rtsopts -with-rtsopts=-N
  build-depends:
      aeson
    , base >=4.7 && <5
    , bytestring
    , deepseq
    , directory
    , filelock
    , mldsa
    , primitive >=0.7.2
    , process
    , tasty
    , tasty-hunit
    , tasty-quickcheck
    , text
    , zlib
  default-language: Haskell2010
  if flag(use_crypton)
    build-depends:
        crypton >=1.1.1
      , ram
  else
    build-depends:
        cryptonite >=0.26
      , memory

test-suite mldsa-test-full
  type: exitcode-stdio-1.0
  main-is: Tests.hs
  other-modules:
      Auxiliary
      Base
      Block
      BlockN
      Builder
      ByteArrayST
      Crypto
      Crypto.PubKey.ML_DSA
      Equality
      Fusion
      Internal
      Iterate
      Machine
      Marking
      Math
      Matrix
      ScrubbedBlock
      SecureBlock
      SecureBytes
      Vector
      KeyGen
      SigExt
      SigGen
      SigVer
      Util
      Vectors
      Paths_mldsa
  autogen-modules:
      Paths_mldsa
  hs-source-dirs:
      src
      tests
  ghc-options: -Wall -Wcompat -Widentities -Wincomplete-record-updates -Wincomplete-uni-patterns -Wmissing-export-lists -Wmissing-home-modules -Wpartial-fields -Wredundant-constraints -Wno-unticked-promoted-constructors -fno-ignore-asserts -threaded -rtsopts -with-rtsopts=-N
  cpp-options: -DML_DSA_TESTING
  build-depends:
      aeson
    , base >=4.7 && <5
    , bytestring
    , deepseq
    , directory
    , filelock
    , primitive >=0.7.2
    , process
    , tasty
    , tasty-hunit
    , tasty-quickcheck
    , text
    , zlib
  default-language: Haskell2010
  if flag(use_crypton)
    build-depends:
        crypton >=1.1.1
      , ram
  else
    build-depends:
        cryptonite >=0.26
      , memory

benchmark mldsa-bench
  type: exitcode-stdio-1.0
  main-is: Bench.hs
  other-modules:
      Paths_mldsa
  autogen-modules:
      Paths_mldsa
  hs-source-dirs:
      benchs
  ghc-options: -Wall -Wcompat -Widentities -Wincomplete-record-updates -Wincomplete-uni-patterns -Wmissing-export-lists -Wmissing-home-modules -Wpartial-fields -Wredundant-constraints -Wno-unticked-promoted-constructors -threaded -rtsopts -with-rtsopts=-N -with-rtsopts=-A48m
  build-depends:
      base >=4.7 && <5
    , criterion
    , deepseq
    , mldsa
    , primitive >=0.7.2
  default-language: Haskell2010
  if flag(use_crypton)
    build-depends:
        crypton >=1.1.1
      , ram
  else
    build-depends:
        cryptonite >=0.26
      , memory