Crypto: Secp256k1 -> Libsecp256k1

This commit is contained in:
Vincent Bernardoff 2018-04-19 14:29:27 +02:00 committed by Grégoire Henry
parent f8130eed82
commit 3a0cdfd90a
68 changed files with 204 additions and 203 deletions

View File

@ -249,230 +249,231 @@ opam:02:ocplib-resto:
variables:
package: ocplib-resto
opam:03:blake2:
<<: *opam_definition
variables:
package: blake2
opam:04:tweetnacl:
<<: *opam_definition
variables:
package: tweetnacl
opam:05:tezos-error-monad:
opam:03:tezos-error-monad:
<<: *opam_definition
variables:
package: tezos-error-monad
opam:06:ocplib-resto-directory:
opam:04:ocplib-resto-directory:
<<: *opam_definition
variables:
package: ocplib-resto-directory
opam:07:tezos-crypto:
opam:05:blake2:
<<: *opam_definition
variables:
package: tezos-crypto
package: blake2
opam:08:tezos-micheline:
opam:06:secp256k1:
<<: *opam_definition
variables:
package: tezos-micheline
package: secp256k1
opam:09:tezos-rpc:
<<: *opam_definition
variables:
package: tezos-rpc
opam:10:tezos-base:
<<: *opam_definition
variables:
package: tezos-base
opam:11:pbkdf:
<<: *opam_definition
variables:
package: pbkdf
opam:12:ocplib-resto-cohttp:
<<: *opam_definition
variables:
package: ocplib-resto-cohttp
opam:13:irmin-leveldb:
<<: *opam_definition
variables:
package: irmin-leveldb
opam:14:tezos-protocol-environment-sigs:
<<: *opam_definition
variables:
package: tezos-protocol-environment-sigs
opam:15:tezos-stdlib-unix:
<<: *opam_definition
variables:
package: tezos-stdlib-unix
opam:16:bip39:
<<: *opam_definition
variables:
package: bip39
opam:17:tezos-rpc-http:
<<: *opam_definition
variables:
package: tezos-rpc-http
opam:18:tezos-shell-services:
<<: *opam_definition
variables:
package: tezos-shell-services
opam:19:tezos-storage:
<<: *opam_definition
variables:
package: tezos-storage
opam:20:tezos-protocol-compiler:
<<: *opam_definition
variables:
package: tezos-protocol-compiler
opam:21:tezos-client-base:
<<: *opam_definition
variables:
package: tezos-client-base
opam:22:tezos-protocol-alpha:
<<: *opam_definition
variables:
package: tezos-protocol-alpha
opam:23:tezos-protocol-environment:
<<: *opam_definition
variables:
package: tezos-protocol-environment
opam:24:tezos-client-alpha:
<<: *opam_definition
variables:
package: tezos-client-alpha
opam:25:tezos-client-commands:
<<: *opam_definition
variables:
package: tezos-client-commands
opam:26:tezos-protocol-environment-shell:
<<: *opam_definition
variables:
package: tezos-protocol-environment-shell
opam:27:tezos-baking-alpha:
<<: *opam_definition
variables:
package: tezos-baking-alpha
opam:28:tezos-protocol-genesis:
<<: *opam_definition
variables:
package: tezos-protocol-genesis
opam:29:ocplib-resto-json:
<<: *opam_definition
variables:
package: ocplib-resto-json
opam:30:tezos-protocol-updater:
<<: *opam_definition
variables:
package: tezos-protocol-updater
opam:31:tezos-p2p:
<<: *opam_definition
variables:
package: tezos-p2p
opam:32:tezos-baking-alpha-commands:
<<: *opam_definition
variables:
package: tezos-baking-alpha-commands
opam:33:tezos-client-alpha-commands:
<<: *opam_definition
variables:
package: tezos-client-alpha-commands
opam:34:tezos-client-base-unix:
<<: *opam_definition
variables:
package: tezos-client-base-unix
opam:35:tezos-client-genesis:
<<: *opam_definition
variables:
package: tezos-client-genesis
opam:36:ocplib-ezresto:
<<: *opam_definition
variables:
package: ocplib-ezresto
opam:37:tezos-embedded-protocol-alpha:
<<: *opam_definition
variables:
package: tezos-embedded-protocol-alpha
opam:38:tezos-embedded-protocol-demo:
<<: *opam_definition
variables:
package: tezos-embedded-protocol-demo
opam:39:tezos-embedded-protocol-genesis:
<<: *opam_definition
variables:
package: tezos-embedded-protocol-genesis
opam:40:tezos-shell:
<<: *opam_definition
variables:
package: tezos-shell
opam:41:tezos-client:
<<: *opam_definition
variables:
package: tezos-client
opam:42:ocplib-ezresto-directory:
<<: *opam_definition
variables:
package: ocplib-ezresto-directory
opam:43:tezos-clic:
opam:07:tezos-clic:
<<: *opam_definition
variables:
package: tezos-clic
opam:44:tezos-baker-alpha:
opam:08:tezos-rpc:
<<: *opam_definition
variables:
package: tezos-rpc
opam:09:tweetnacl:
<<: *opam_definition
variables:
package: tweetnacl
opam:10:tezos-crypto:
<<: *opam_definition
variables:
package: tezos-crypto
opam:11:tezos-micheline:
<<: *opam_definition
variables:
package: tezos-micheline
opam:12:tezos-base:
<<: *opam_definition
variables:
package: tezos-base
opam:13:pbkdf:
<<: *opam_definition
variables:
package: pbkdf
opam:14:ocplib-resto-cohttp:
<<: *opam_definition
variables:
package: ocplib-resto-cohttp
opam:15:irmin-leveldb:
<<: *opam_definition
variables:
package: irmin-leveldb
opam:16:tezos-protocol-environment-sigs:
<<: *opam_definition
variables:
package: tezos-protocol-environment-sigs
opam:17:tezos-stdlib-unix:
<<: *opam_definition
variables:
package: tezos-stdlib-unix
opam:18:bip39:
<<: *opam_definition
variables:
package: bip39
opam:19:tezos-rpc-http:
<<: *opam_definition
variables:
package: tezos-rpc-http
opam:20:tezos-shell-services:
<<: *opam_definition
variables:
package: tezos-shell-services
opam:21:tezos-storage:
<<: *opam_definition
variables:
package: tezos-storage
opam:22:tezos-protocol-compiler:
<<: *opam_definition
variables:
package: tezos-protocol-compiler
opam:23:tezos-client-base:
<<: *opam_definition
variables:
package: tezos-client-base
opam:24:tezos-protocol-alpha:
<<: *opam_definition
variables:
package: tezos-protocol-alpha
opam:25:tezos-protocol-environment:
<<: *opam_definition
variables:
package: tezos-protocol-environment
opam:26:tezos-client-alpha:
<<: *opam_definition
variables:
package: tezos-client-alpha
opam:27:tezos-client-commands:
<<: *opam_definition
variables:
package: tezos-client-commands
opam:28:tezos-protocol-environment-shell:
<<: *opam_definition
variables:
package: tezos-protocol-environment-shell
opam:29:tezos-baking-alpha:
<<: *opam_definition
variables:
package: tezos-baking-alpha
opam:30:tezos-protocol-genesis:
<<: *opam_definition
variables:
package: tezos-protocol-genesis
opam:31:ocplib-resto-json:
<<: *opam_definition
variables:
package: ocplib-resto-json
opam:32:tezos-protocol-updater:
<<: *opam_definition
variables:
package: tezos-protocol-updater
opam:33:tezos-p2p:
<<: *opam_definition
variables:
package: tezos-p2p
opam:34:tezos-baking-alpha-commands:
<<: *opam_definition
variables:
package: tezos-baking-alpha-commands
opam:35:tezos-client-alpha-commands:
<<: *opam_definition
variables:
package: tezos-client-alpha-commands
opam:36:tezos-client-base-unix:
<<: *opam_definition
variables:
package: tezos-client-base-unix
opam:37:tezos-client-genesis:
<<: *opam_definition
variables:
package: tezos-client-genesis
opam:38:ocplib-ezresto:
<<: *opam_definition
variables:
package: ocplib-ezresto
opam:39:tezos-embedded-protocol-alpha:
<<: *opam_definition
variables:
package: tezos-embedded-protocol-alpha
opam:40:tezos-embedded-protocol-demo:
<<: *opam_definition
variables:
package: tezos-embedded-protocol-demo
opam:41:tezos-embedded-protocol-genesis:
<<: *opam_definition
variables:
package: tezos-embedded-protocol-genesis
opam:42:tezos-shell:
<<: *opam_definition
variables:
package: tezos-shell
opam:43:tezos-client:
<<: *opam_definition
variables:
package: tezos-client
opam:44:ocplib-ezresto-directory:
<<: *opam_definition
variables:
package: ocplib-ezresto-directory
opam:45:tezos-baker-alpha:
<<: *opam_definition
variables:
package: tezos-baker-alpha
opam:45:tezos-protocol-demo:
opam:46:tezos-protocol-demo:
<<: *opam_definition
variables:
package: tezos-protocol-demo
opam:46:tezos-node:
opam:47:tezos-node:
<<: *opam_definition
variables:
package: tezos-node
opam:46:secp256k1-internal:
<<: *opam_definition
variables:
package: secp256k1-internal
##END_OPAM##

View File

@ -18,7 +18,7 @@
nocrypto
blake2
tweetnacl
secp256k1-internal
secp256k1
zarith))))
(alias

View File

@ -17,7 +17,7 @@ module Public_key_hash = Blake2B.Make(Base58)(struct
let () =
Base58.check_encoded_prefix Public_key_hash.b58check_encoding "tz2" 36
open Secp256k1_ml.External
open Libsecp256k1.External
let context = Context.(create [Verify; Sign])

View File

@ -19,7 +19,7 @@ depends: [
"blake2"
"tweetnacl"
"zarith"
"secp256k1-internal"
"secp256k1"
"alcotest" { test & >= "0.8.3" }
]
build: [

View File

@ -1,5 +1,5 @@
opam-version: "1.2"
name: "secp256k1-internal"
name: "secp256k1"
version: "0.1"
authors: "Vincent Bernardoff <vb@luminar.eu.org>"
maintainer: "Vincent Bernardoff <vb@luminar.eu.org>"

View File

@ -1,10 +1,10 @@
(jbuild_version 1)
(library
((name secp256k1_ml)
(public_name secp256k1-internal)
((name libsecp256k1)
(public_name secp256k1)
(modules (internal external))
(libraries (bigarray cstruct))
(libraries (cstruct))
(c_names (secp256k1
secp256k1_wrap))
(c_flags (:include c_flags.sexp))

View File

@ -2,7 +2,7 @@
(executable
((name test)
(libraries (hex secp256k1-internal alcotest))))
(libraries (hex libsecp256k1 alcotest))))
(alias
((name runtest)

View File

@ -1,4 +1,4 @@
open Secp256k1_ml
open Libsecp256k1
let assert_equal a b = assert (a = b)