elliptic-curve alternatives and similar packages
Based on the "Cryptography" category.
Alternatively, view elliptic-curve alternatives based on common mentions on social networks and blogs.
cryptonite9.7 0.0 elliptic-curve VS cryptonitelowlevel set of cryptographic primitives for haskell
lol9.6 0.0 elliptic-curve VS lolΛ ⚬ λ: Functional Lattice Cryptography
lol-apps9.6 0.0 elliptic-curve VS lol-appsΛ ⚬ λ: Functional Lattice Cryptography
merkle-tree9.5 0.0 elliptic-curve VS merkle-treeAn implementation of a Merkle Tree and merkle tree proofs
jose9.4 3.3 elliptic-curve VS joseHaskell JOSE and JWT library
cacophony9.1 0.0 elliptic-curve VS cacophonyA Haskell library implementing the Noise protocol.
saltine9.0 0.0 elliptic-curve VS saltineCryptography that's easy to digest (NaCl/libsodium bindings)
entropy8.9 0.0 elliptic-curve VS entropyEasy entropy source for Haskell users.
pedersen-commitmentAn implementation of Pedersen commitment schemes
arithmetic-circuitsArithmetic circuits for zero knowledge proof systems
secp256k18.7 0.0 elliptic-curve VS secp256k1Haskell bindings for secp256k1 library
galois-field8.7 0.0 elliptic-curve VS galois-fieldFinite field and algebraic extension field arithmetic
pvss8.7 0.0 elliptic-curve VS pvssPublic Verifiable Secret Sharing
aos-signature8.6 0.0 elliptic-curve VS aos-signatureAbe-Ohkubo-Suzuki Linkable Ring Signatures
crypto-rng8.5 0.0 elliptic-curve VS crypto-rngCryptographic random number generator.
pairing8.5 0.0 elliptic-curve VS pairingOptimised bilinear pairings over elliptic curves
oblivious-transferOblivious transfer for multiparty computation
HsOpenSSL8.4 0.0 elliptic-curve VS HsOpenSSLOpenSSL binding for Haskell
cryptohash8.4 0.0 elliptic-curve VS cryptohashefficient and practical cryptohashing in haskell. DEPRECATED in favor of cryptonite
jose-jwt8.3 0.0 elliptic-curve VS jose-jwtHaskell implementation of JOSE/JWT standards
cipher-blowfishDEPRECATED by cryptonite; A collection of cryptographic block and stream ciphers in haskell
signable8.1 0.0 elliptic-curve VS signableDeterministic serialisation and signatures with proto-lens and protobuf-elixir support
ed255198.1 0.0 L4 elliptic-curve VS ed25519Minimal ed25519 Haskell package, binding to the ref10 SUPERCOP implementation.
cipher-aes8.0 0.0 L4 elliptic-curve VS cipher-aesDEPRECATED - use cryptonite - a comprehensive fast AES implementation for haskell that supports aesni and advanced cryptographic modes.
crypto-api8.0 0.0 elliptic-curve VS crypto-apiHaskell generic interface (type classes) for cryptographic algorithms
crypto-sodium7.9 0.0 elliptic-curve VS crypto-sodiumHaskell cryptography done right
skein7.8 0.0 L3 elliptic-curve VS skeinSkein, a family of cryptographic hash functions. Includes Skein-MAC as well.
servant-hmac-authServant authentication with HMAC
galois-fft7.7 0.0 elliptic-curve VS galois-fftFinite field polynomial arithmetic based on fast Fourier transforms
qnap-decrypt7.5 0.0 elliptic-curve VS qnap-decryptDecrypt files encrypted by the QNAP's Hybrid Backup Sync
cryptohash-sha256Fast, pure and practical SHA-256 implementation
pwstore-fast7.2 0.0 elliptic-curve VS pwstore-fastSecurely store hashed, salted passwords
spake27.2 0.0 elliptic-curve VS spake2SPAKE2 key exchange protocol for Haskell
cryptohash-md57.1 0.0 elliptic-curve VS cryptohash-md5Fast, pure and practical MD5 implementation
bcrypt7.1 0.0 L2 elliptic-curve VS bcryptHaskell bindings for bcrypt
xxhash7.0 0.0 L4 elliptic-curve VS xxhashHaskell implementation of the XXHash algorithm
h-gpgme7.0 0.0 elliptic-curve VS h-gpgmehighlevel bindings for gnupg made easy in haskell
crypto-pubkey-typesCrypto Public Key algorithm generic types.
crypto-pubkey-opensshOpenSSH keys decoder/encoder
crypto-pubkey6.8 0.0 elliptic-curve VS crypto-pubkeyDEPRECATED - use cryptonite - Cryptographic public key related algorithms in haskell (RSA,DSA,DH,ElGamal)
nonce6.8 0.0 elliptic-curve VS nonceGenerate cryptographic nonces.
scrypt6.8 0.0 L4 elliptic-curve VS scryptHaskell bindings to Colin Percival's scrypt implementation.
cipher-aes1286.5 0.0 L4 elliptic-curve VS cipher-aes128Based on cipher-aes, but using a crypto-api interface and providing resulting IVs for each mode
OTP6.4 0.0 elliptic-curve VS OTPHaskell implementation of One-Time Passwords algorithms
cprng-aes6.3 0.0 elliptic-curve VS cprng-aesCrypto Pseudo Random Number Generator using AES in counter mode
magic-wormhole6.2 0.0 elliptic-curve VS magic-wormholeMagic Wormhole for Haskell
keystore6.2 0.0 elliptic-curve VS keystorestoring secret things
eccrypto6.2 0.0 elliptic-curve VS eccryptoElliptic Curve Cryptography for Haskell
crypto-enigma6.1 0.0 elliptic-curve VS crypto-enigmaA Haskell Enigma machine simulator with rich display and machine state details.
crypto-numbers6.1 0.0 elliptic-curve VS crypto-numbersDEPRECATED - use cryptonite - Cryptographic number related function and algorithms
Static code analysis for 29 languages.
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of elliptic-curve or a related project?
An extensible library of elliptic curves used in cryptography research.
An [elliptic curve](src/Data/Curve.hs) E(K) over a field K is a smooth projective plane algebraic cubic curve with a specified base point
O, and the points on E(K) form an algebraic group with identity point
O. By the Riemann-Roch theorem, any elliptic curve is isomorphic to a cubic curve of the form
where is the point at infinity, and are K-rational coefficients that satisfy a non-zero discriminant condition. For cryptographic computational purposes, elliptic curves are represented in several different forms.
A (short) [Weierstrass curve](src/Data/Curve/Weierstrass.hs) is an elliptic curve over for some prime , and is of the form
B are K-rational coefficients such that is non-zero. Weierstrass curves are the most common representations of elliptic curves, as any elliptic curve over a field of characteristic greater than 3 is isomorphic to a Weierstrass curve.
A (short Weierstrass) [binary curve](src/Data/Curve/Binary.hs) is an elliptic curve over for some positive , and is of the form
B are K-rational coefficients such that
B is non-zero. Binary curves have field elements represented by binary integers for efficient arithmetic, and are special cases of long Weierstrass curves over a field of characteristic 2.
A [Montgomery curve](src/Data/Curve/Montgomery.hs) is an elliptic curve over for some prime , and is of the form
B are K-rational coefficients such that is non-zero. Montgomery curves only use the first affine coordinate for computations, and can utilise the Montgomery ladder for efficient multiplication.
A (twisted) [Edwards curve](src/Data/Curve/Edwards.hs) is an elliptic curve over for some prime , and is of the form
D are K-rational coefficients such that is non-zero. Edwards curves have no point at infinity, and their addition and doubling formulae converge.
This library is open for new curve representations and curve implementations through pull requests. These should ideally be executed by replicating and modifying existing curve files, for ease, quickcheck testing, and formatting consistency, but a short description of the file organisation is provided here for clarity. Note that it also has a dependency on the Galois field library and its required language extensions.
The library exposes four promoted data kinds which are used to define a type-safe interface for working with curves.
These are then specialised down into type classes for the different forms.
And then by coordinate system.
A curve class is constructed out of four type parameters which are instantiated in the associated data type Point on the Curve typeclass.
class Curve (f :: Form) (c :: Coordinates) e q r | | | Curve Type o-+ | | Field of Points o---+ | Field of Coefficients o-----+ data Point f c e q r :: *
```haskell ignore data Anomalous
type Fq = Prime Q type Q = 0xb0000000000000000000000953000000000000000000001f9d7
type Fr = Prime R type R = 0xb0000000000000000000000953000000000000000000001f9d7
instance Curve 'Weierstrass c Anomalous Fq Fr => WCurve c Anomalous Fq Fr where -- data instance Point 'Weierstrass c Anomalous Fq Fr
**Arithmetic** ```haskell ignore -- Point addition add :: Point f c e q r -> Point f c e q r -> Point f c e q r -- Point doubling dbl :: Point f c e q r -> Point f c e q r -- Point multiplication by field element mul :: Curve f c e q r => Point f c e q r -> r -> Point f c e q r -- Point multiplication by Integral mul' :: (Curve f c e q r, Integral n) => Point f c e q r -> n -> Point f c e q r -- Point identity id :: Point f c e q r -- Point inversion inv :: Point f c e q r -> Point f c e q r -- Frobenius endomorphism frob :: Point f c e q r -> Point f c e q r -- Random point rnd :: MonadRandom m => m (Point f c e q r)
```haskell ignore -- Curve characteristic char :: Point f c e q r -> Natural
-- Curve cofactor cof :: Point f c e q r -> Natural
-- Check if a point is well-defined def :: Point f c e q r -> Bool
-- Discriminant disc :: Point f c e q r -> q
-- Curve order order :: Point f c e q r -> Natural
-- Curve generator point gen :: Point f c e q r
### Point Arithmetic See [**Example.hs**](examples/Example.hs). ### Elliptic Curve Diffie-Hellman (ECDH) See [**DiffieHellman.hs**](examples/DiffieHellman.hs). ### Representing a new curve using the curve class See [**Weierstrass**](src/Data/Curve/Weierstrass.hs). ### Implementing a new curve using a curve representation See [**Anomalous**](src/Data/Curve/Weierstrass/Anomalous.hs). ### Using an implemented curve Import a curve implementation. ```haskell import qualified Data.Curve.Weierstrass.Anomalous as Anomalous
The data types and constants can then be accessed readily as
We'll test that the Hasse Theorem is successful with an implemented curve as a usage example:
import Protolude import GHC.Natural import qualified Data.Field.Galois as F main :: IO () main = do putText $ "Hasse Theorem succeeds: " <> show (hasseTheorem Anomalous._h Anomalous._r (F.order (witness :: Anomalous.Fq))) where hasseTheorem h r q = join (*) (naturalToInteger (h * r) - naturalToInteger q - 1) <= 4 * naturalToInteger q
The following curves have already been implemented.
- SECT (NIST) curves
- Edwards curves
- [Ed25519 (Curve25519)](src/Data/Curve/Edwards/Ed25519.hs)
- [Ed3363 (HighFive)](src/Data/Curve/Edwards/Ed3363.hs)
- [Ed448 (Goldilocks)](src/Data/Curve/Edwards/Ed448.hs)
- Montgomery curves
- [Curve25519 (Ed25519)](src/Data/Curve/Montgomery/Curve25519.hs)
- [Curve448 (Goldilocks)](src/Data/Curve/Montgomery/Curve448.hs)
- Barreto-Lynn-Scott (BLS) curves
- Barreto-Naehrig (BN) curves
- [BN224 (Fp224BN)](src/Data/Curve/Weierstrass/BN224.hs)
- [BN254 (CurveSNARK)](src/Data/Curve/Weierstrass/BN254.hs)
- [BN254T (CurveSNARKn2)](src/Data/Curve/Weierstrass/BN254T.hs)
- [BN254A (Fp254BNa)](src/Data/Curve/Weierstrass/BN254A.hs)
- [BN254AT (Fp254n2BNa)](src/Data/Curve/Weierstrass/BN254AT.hs)
- [BN254B (Fp254BNb)](src/Data/Curve/Weierstrass/BN254B.hs)
- [BN254BT (Fp254n2BNb)](src/Data/Curve/Weierstrass/BN254BT.hs)
- [BN254C (Fp254BNc)](src/Data/Curve/Weierstrass/BN254C.hs)
- [BN254CT (Fp254n2BNc)](src/Data/Curve/Weierstrass/BN254CT.hs)
- [BN254D (Fp254BNd)](src/Data/Curve/Weierstrass/BN254D.hs)
- [BN254DT (Fp254n2BNd)](src/Data/Curve/Weierstrass/BN254DT.hs)
- [BN256 (Fp256BN)](src/Data/Curve/Weierstrass/BN256.hs)
- [BN384 (Fp384BN)](src/Data/Curve/Weierstrass/BN384.hs)
- [BN462 (Fp462BN)](src/Data/Curve/Weierstrass/BN462.hs)
- [BN462T (Fp462n2BN)](src/Data/Curve/Weierstrass/BN462T.hs)
- [BN512 (Fp512BN)](src/Data/Curve/Weierstrass/BN512.hs)
- Brainpool curves
- SECP (NIST) curves
The data structures in this library are meant for use in research-grade projects and not in interactive protocols. The elliptic curve operations in this library are not constant time and thus may be vulernable to timing attacks if used improperly. If you are unsure of the implications of this, do not use this library.
Copyright (c) 2019-2020 Adjoint Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*Note that all licence references and agreements mentioned in the elliptic-curve README section above are relevant to that project's source code only.