GithubHelp home page GithubHelp logo

sdiehl / pairing Goto Github PK

View Code? Open in Web Editor NEW
55.0 9.0 7.0 521 KB

Optimised bilinear pairings over elliptic curves

License: MIT License

Haskell 98.63% Dockerfile 1.37%
cryptography pairing barreto-naehrig elliptic-curves bilinear-pairing pairing-cryptography ecc bn128 bn254 bls12-381

pairing's People

Contributors

acentelles avatar bodigrim avatar sdiehl avatar sumo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pairing's Issues

Tests failing?

Hello, how viable is this package and its dependencies within this organization? I'm seeing test failures in galois-field, elliptic-curve and pairings, using GHC 8.10.7 and the 22.05 version of nixpkgs (which is a cut of Hackage from roughly this past May).

These are the versions I'm using:

  • galois-field: 9fdd43061453bc54fb683636d03c7c34d643e397 (1.0.3)
  • elliptic-curve: 445e196a550e36e0f25bd4d9d6a38676b4cf2be8 (HEAD)
  • pairings: 9e3fd026fb43fd64917a3b267d0d8d351eba77cc (HEAD)

Push latest to hackage

Hi, unfortunately the hackage version 1.1.0 has an upper bound for protolude < 0.3. Could you please push current to hackage?

Thanks
Sumit

Overlapping instance error when building pairing

pairing fails to build via cabal new-build with the following error:

Build Log

src/Pairing/Fr.hs:28:10: error:
    • Overlapping instances for Ord Fr
        arising from a use of ‘ghc-prim-0.5.3:GHC.Classes.$dm<’
      Matching instances:
        instance Ord (PrimeField p) -- Defined in ‘PrimeField’
        instance Ord Fr -- Defined at src/Pairing/Fr.hs:28:10
    • In the expression: ghc-prim-0.5.3:GHC.Classes.$dm< @(Fr)
      In an equation for ‘<’: (<) = ghc-prim-0.5.3:GHC.Classes.$dm< @(Fr)
      In the instance declaration for ‘Ord Fr’
   |
28 | instance Ord Fr where
   |          ^^^^^^

src/Pairing/Fr.hs:28:10: error:
    • Overlapping instances for Ord Fr
        arising from a use of ‘ghc-prim-0.5.3:GHC.Classes.$dm<=’
      Matching instances:
        instance Ord (PrimeField p) -- Defined in ‘PrimeField’
        instance Ord Fr -- Defined at src/Pairing/Fr.hs:28:10
    • In the expression: ghc-prim-0.5.3:GHC.Classes.$dm<= @(Fr)
      In an equation for ‘<=’:
          (<=) = ghc-prim-0.5.3:GHC.Classes.$dm<= @(Fr)
      In the instance declaration for ‘Ord Fr’
   |
28 | instance Ord Fr where
   |          ^^^^^^

src/Pairing/Fr.hs:28:10: error:
    • Overlapping instances for Ord Fr
        arising from a use of ‘ghc-prim-0.5.3:GHC.Classes.$dm>’
      Matching instances:
        instance Ord (PrimeField p) -- Defined in ‘PrimeField’
        instance Ord Fr -- Defined at src/Pairing/Fr.hs:28:10
    • In the expression: ghc-prim-0.5.3:GHC.Classes.$dm> @(Fr)
      In an equation for ‘>’: (>) = ghc-prim-0.5.3:GHC.Classes.$dm> @(Fr)
      In the instance declaration for ‘Ord Fr’
   |
28 | instance Ord Fr where
   |          ^^^^^^

src/Pairing/Fr.hs:28:10: error:
    • Overlapping instances for Ord Fr
        arising from a use of ‘ghc-prim-0.5.3:GHC.Classes.$dm>=’
      Matching instances:
        instance Ord (PrimeField p) -- Defined in ‘PrimeField’
        instance Ord Fr -- Defined at src/Pairing/Fr.hs:28:10
    • In the expression: ghc-prim-0.5.3:GHC.Classes.$dm>= @(Fr)
      In an equation for ‘>=’:
          (>=) = ghc-prim-0.5.3:GHC.Classes.$dm>= @(Fr)
      In the instance declaration for ‘Ord Fr’
   |
28 | instance Ord Fr where
   |          ^^^^^^

src/Pairing/Fr.hs:28:10: error:
    • Overlapping instances for Ord Fr
        arising from a use of ‘ghc-prim-0.5.3:GHC.Classes.$dmmax’
      Matching instances:
        instance Ord (PrimeField p) -- Defined in ‘PrimeField’
        instance Ord Fr -- Defined at src/Pairing/Fr.hs:28:10
    • In the expression: ghc-prim-0.5.3:GHC.Classes.$dmmax @(Fr)
      In an equation for ‘max’:
          max = ghc-prim-0.5.3:GHC.Classes.$dmmax @(Fr)
      In the instance declaration for ‘Ord Fr’
   |
28 | instance Ord Fr where
   |          ^^^^^^

src/Pairing/Fr.hs:28:10: error:
    • Overlapping instances for Ord Fr
        arising from a use of ‘ghc-prim-0.5.3:GHC.Classes.$dmmin’
      Matching instances:
        instance Ord (PrimeField p) -- Defined in ‘PrimeField’
        instance Ord Fr -- Defined at src/Pairing/Fr.hs:28:10
    • In the expression: ghc-prim-0.5.3:GHC.Classes.$dmmin @(Fr)
      In an equation for ‘min’:
          min = ghc-prim-0.5.3:GHC.Classes.$dmmin @(Fr)
      In the instance declaration for ‘Ord Fr’
   |
28 | instance Ord Fr where
   |          ^^^^^^

GHC 9.6 and 9.8 support

The package doesn't build on GHC 9.6+. I think this is mainly due to galois-field and elliptic-curve dependencies and I wasn't sure how to fix them.

Addition of mcl-wasm compatible serialisation

I am looking at adding in mcl-wasm specific serialisation support. Was going to add it to master but seems like there has been plenty of work on galois-field-integration branch. If you are looking to merge this into master, I'll make my changes based on the galois-field-integration branch. I'm in no rush, so happy to track a development branch and reduce my merge effort. What's the preference?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.