-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Schnorr signature support #258
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
a27a66c
Initial bindings
kozross 87b4065
Try updating haskell.nix
kozross d085afd
Add nixpkgs pin, move to recent revision
michaelpj 7a8c98b
Bump haskell.nix
michaelpj e227b99
Fix nixpkgs
michaelpj fcefd4f
Merge branch 'master' into mpj/bump-nixpkgs
michaelpj 465f757
Merge branch 'mpj/bump-nixpkgs' of https://github.com/input-output-hk…
kozross 68acbf7
Finish FFI bits
kozross 332b95a
Rename the prior SECP work to be more accurate
kozross 72f4266
Implement DSIGN interface for Schnorr signatures
kozross 2bfa4d8
Add to test suite, ensure everything passes
kozross 3caf9f8
Merge branch 'master' into koz/schnorr
kozross 7436983
Rewrite Schnorr implementation with PinnedByteArray
kozross f6c2453
Rewrite Schnorr with useAsCStringLen
kozross a7a77ab
Remove magic number on copyPtr
kozross 0557a3a
Rename SECP import to ECDSA, clearer constructor names for Schnorr
kozross ec9e615
Merge branch 'master' into koz/schnorr
kozross File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,129 +1,127 @@ | ||
cabal-version: 2.2 | ||
cabal-version: 2.2 | ||
name: cardano-crypto-class | ||
version: 2.0.0 | ||
synopsis: | ||
Type classes abstracting over cryptography primitives for Cardano | ||
|
||
name: cardano-crypto-class | ||
version: 2.0.0 | ||
synopsis: Type classes abstracting over cryptography primitives for Cardano | ||
description: Type classes abstracting over cryptography primitives for Cardano | ||
license: Apache-2.0 | ||
description: | ||
Type classes abstracting over cryptography primitives for Cardano | ||
|
||
license: Apache-2.0 | ||
license-files: | ||
LICENSE | ||
NOTICE | ||
author: IOHK | ||
maintainer: [email protected] | ||
copyright: 2019-2021 IOHK | ||
category: Currency | ||
build-type: Simple | ||
extra-source-files: README.md | ||
|
||
author: IOHK | ||
maintainer: [email protected] | ||
copyright: 2019-2021 IOHK | ||
category: Currency | ||
build-type: Simple | ||
extra-source-files: README.md | ||
|
||
flag development | ||
description: Disable `-Werror` | ||
default: False | ||
manual: True | ||
description: Disable `-Werror` | ||
default: False | ||
manual: True | ||
|
||
common base { build-depends: base >= 4.14 && < 4.15 } | ||
common base | ||
build-depends: base ^>=4.14 | ||
|
||
common project-config | ||
default-language: Haskell2010 | ||
default-language: Haskell2010 | ||
ghc-options: | ||
-Wall -Wcompat -Wincomplete-record-updates | ||
-Wincomplete-uni-patterns -Wpartial-fields -Wredundant-constraints | ||
-Wunused-packages | ||
|
||
ghc-options: -Wall | ||
-Wcompat | ||
-Wincomplete-record-updates | ||
-Wincomplete-uni-patterns | ||
-Wpartial-fields | ||
-Wredundant-constraints | ||
-Wunused-packages | ||
|
||
if (!flag(development)) | ||
ghc-options: -Werror | ||
if !flag(development) | ||
ghc-options: -Werror | ||
|
||
library | ||
import: base, project-config | ||
hs-source-dirs: src | ||
import: base, project-config | ||
hs-source-dirs: src | ||
exposed-modules: | ||
Cardano.Crypto.DSIGN | ||
Cardano.Crypto.Hash | ||
Cardano.Crypto.KES | ||
Cardano.Crypto.VRF | ||
|
||
Cardano.Crypto.DSIGN.Class | ||
Cardano.Crypto.DSIGN.Ed25519 | ||
Cardano.Crypto.DSIGN.Ed448 | ||
Cardano.Crypto.DSIGN.Mock | ||
Cardano.Crypto.DSIGN.NeverUsed | ||
Cardano.Crypto.DSIGN.SECP256k1 | ||
|
||
Cardano.Crypto.Hash.Blake2b | ||
Cardano.Crypto.Hash.Class | ||
Cardano.Crypto.Hash.NeverUsed | ||
Cardano.Crypto.Hash.SHA256 | ||
Cardano.Crypto.Hash.SHA3_256 | ||
Cardano.Crypto.Hash.Short | ||
Cardano.Crypto.Hash.Keccak256 | ||
|
||
Cardano.Crypto.KES.Class | ||
Cardano.Crypto.KES.Mock | ||
Cardano.Crypto.KES.NeverUsed | ||
Cardano.Crypto.KES.Simple | ||
Cardano.Crypto.KES.Single | ||
Cardano.Crypto.KES.Sum | ||
Cardano.Crypto.KES.CompactSingle | ||
Cardano.Crypto.KES.CompactSum | ||
|
||
Cardano.Crypto.PinnedSizedBytes | ||
Cardano.Crypto.Seed | ||
Cardano.Crypto.Util | ||
|
||
Cardano.Crypto.VRF.Class | ||
Cardano.Crypto.VRF.Mock | ||
Cardano.Crypto.VRF.NeverUsed | ||
Cardano.Crypto.VRF.Simple | ||
|
||
Cardano.Crypto.Libsodium | ||
Cardano.Crypto.Libsodium.C | ||
Cardano.Crypto.Libsodium.Constants | ||
Cardano.Crypto.Libsodium.Hash | ||
Cardano.Crypto.Libsodium.Init | ||
Cardano.Crypto.Libsodium.Memory | ||
Cardano.Crypto.Libsodium.Memory.Internal | ||
Cardano.Crypto.Libsodium.MLockedBytes | ||
Cardano.Crypto.Libsodium.MLockedBytes.Internal | ||
Cardano.Crypto.Libsodium.UnsafeC | ||
|
||
Cardano.Foreign | ||
|
||
other-modules: Cardano.Crypto.PackedBytes | ||
|
||
build-depends: aeson | ||
, base | ||
, base16-bytestring >= 1 | ||
, bytestring | ||
, cardano-binary | ||
, cardano-prelude | ||
, cereal | ||
, cryptonite | ||
, deepseq | ||
, integer-gmp | ||
, ghc-prim | ||
, memory | ||
, nothunks | ||
, primitive | ||
, serialise | ||
, secp256k1-haskell | ||
, text | ||
, transformers | ||
, vector | ||
|
||
pkgconfig-depends: libsodium | ||
Cardano.Crypto.DSIGN | ||
Cardano.Crypto.DSIGN.Class | ||
Cardano.Crypto.DSIGN.EcdsaSecp256k1 | ||
Cardano.Crypto.DSIGN.Ed25519 | ||
Cardano.Crypto.DSIGN.Ed448 | ||
Cardano.Crypto.DSIGN.Mock | ||
Cardano.Crypto.DSIGN.NeverUsed | ||
Cardano.Crypto.DSIGN.SchnorrSecp256k1 | ||
Cardano.Crypto.Hash | ||
Cardano.Crypto.Hash.Blake2b | ||
Cardano.Crypto.Hash.Class | ||
Cardano.Crypto.Hash.Keccak256 | ||
Cardano.Crypto.Hash.NeverUsed | ||
Cardano.Crypto.Hash.SHA256 | ||
Cardano.Crypto.Hash.SHA3_256 | ||
Cardano.Crypto.Hash.Short | ||
Cardano.Crypto.KES | ||
Cardano.Crypto.KES.Class | ||
Cardano.Crypto.KES.CompactSingle | ||
Cardano.Crypto.KES.CompactSum | ||
Cardano.Crypto.KES.Mock | ||
Cardano.Crypto.KES.NeverUsed | ||
Cardano.Crypto.KES.Simple | ||
Cardano.Crypto.KES.Single | ||
Cardano.Crypto.KES.Sum | ||
Cardano.Crypto.Libsodium | ||
Cardano.Crypto.Libsodium.C | ||
Cardano.Crypto.Libsodium.Constants | ||
Cardano.Crypto.Libsodium.Hash | ||
Cardano.Crypto.Libsodium.Init | ||
Cardano.Crypto.Libsodium.Memory | ||
Cardano.Crypto.Libsodium.Memory.Internal | ||
Cardano.Crypto.Libsodium.MLockedBytes | ||
Cardano.Crypto.Libsodium.MLockedBytes.Internal | ||
Cardano.Crypto.Libsodium.UnsafeC | ||
Cardano.Crypto.PinnedSizedBytes | ||
Cardano.Crypto.Seed | ||
Cardano.Crypto.Util | ||
Cardano.Crypto.VRF | ||
Cardano.Crypto.VRF.Class | ||
Cardano.Crypto.VRF.Mock | ||
Cardano.Crypto.VRF.NeverUsed | ||
Cardano.Crypto.VRF.Simple | ||
Cardano.Foreign | ||
|
||
other-modules: | ||
Cardano.Crypto.PackedBytes | ||
Cardano.Crypto.Schnorr | ||
|
||
build-depends: | ||
, aeson | ||
, base | ||
, base16-bytestring >=1 | ||
, bytestring | ||
, cardano-binary | ||
, cardano-prelude | ||
, cereal | ||
, cryptonite | ||
, deepseq | ||
, ghc-prim | ||
, integer-gmp | ||
, memory | ||
, nothunks | ||
, primitive | ||
, secp256k1-haskell | ||
, serialise | ||
, text | ||
, transformers | ||
, vector | ||
|
||
pkgconfig-depends: libsodium -any, libsecp256k1 -any | ||
|
||
test-suite test-memory-example | ||
import: base, project-config | ||
type: exitcode-stdio-1.0 | ||
hs-source-dirs: memory-example | ||
main-is: Main.hs | ||
|
||
build-depends: base | ||
, bytestring | ||
, cardano-crypto-class | ||
|
||
if os(linux) || os(osx) | ||
build-depends: unix | ||
import: base, project-config | ||
type: exitcode-stdio-1.0 | ||
hs-source-dirs: memory-example | ||
main-is: Main.hs | ||
build-depends: | ||
, base | ||
, bytestring | ||
, cardano-crypto-class | ||
|
||
if (os(linux) || os(osx)) | ||
build-depends: unix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would have been better to leave the formatting style intact; reformatting file like this when you're only making minor changes produces "diff noise", makes code harder to merge / rebase, and makes it more difficult to spot the actual changes. Improving formatting is great, but I'd recommend (for the future) to do it in a separate commit.