Skip to content
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: final changes #161

Open
wants to merge 9 commits into
base: v0.2
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ sudo: required

env:
global:
- SECP256K1_REMOTE=https://github.com/bitcoin-core/secp256k1.git
- SECP256K1_COMMIT=fa3301713549d118e57ebe6551d062903ddd6b63
- SECP256K1_REMOTE=https://github.com/jonasnick/secp256k1.git
- SECP256K1_COMMIT=538052c95039e84c2f6b2790b826b86765f8d2c3
- DOCKER_CACHE_DIR=/home/travis/docker

cache:
Expand All @@ -19,15 +19,15 @@ matrix:
- COVERAGE=true
- PHPQA_PHP_VERSION=7.3.7
- SECP256K1_REMOTE=https://github.com/jonasnick/secp256k1.git
- SECP256K1_COMMIT=a228e2f54d64692230ccb2937b12dd746c5157ed
- SECP256K1_COMMIT=538052c95039e84c2f6b2790b826b86765f8d2c3
- SECP256K1_CONFIGURE="--enable-module-ecdh --enable-module-recovery --enable-module-schnorrsig"
- EXT_SECP256K1_CONFIGURE="--with-secp256k1-config --with-module-recovery --with-module-ecdh --with-module-schnorrsig"
- php: 7.3
env:
- VALGRIND=true
- PHPQA_PHP_VERSION=7.3.7
- SECP256K1_REMOTE=https://github.com/jonasnick/secp256k1.git
- SECP256K1_COMMIT=a228e2f54d64692230ccb2937b12dd746c5157ed
- SECP256K1_COMMIT=538052c95039e84c2f6b2790b826b86765f8d2c3
- SECP256K1_CONFIGURE="--enable-module-ecdh --enable-module-recovery --enable-module-schnorrsig"
- EXT_SECP256K1_CONFIGURE="--with-secp256k1-config --with-module-recovery --with-module-ecdh --with-module-schnorrsig"
- php: 7.2
Expand Down
2 changes: 1 addition & 1 deletion secp256k1/config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ if test "$PHP_SECP256K1" != "no"; then
[
AC_DEFINE(SECP256K1_MODULE_SCHNORRSIG, 1, [ ])
],[
AC_MSG_ERROR([missing libraries for secp256k1 recovery support])
AC_MSG_ERROR([missing libraries for secp256k1 schnorrsig support])
],[])
fi
else
Expand Down
12 changes: 11 additions & 1 deletion secp256k1/php_secp256k1.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ extern zend_module_entry secp256k1_module_entry;
#define SECP256K1_PUBKEY_RES_NAME "secp256k1_pubkey"
#define SECP256K1_SIG_RES_NAME "secp256k1_ecdsa_signature"
#define SECP256K1_SCRATCH_SPACE_RES_NAME "secp256k1_scratch_space"
#define SECP256K1_XONLY_PUBKEY_RES_NAME "secp256k1_xonly_pubkey"
#ifdef SECP256K1_MODULE_RECOVERY
#define SECP256K1_RECOVERABLE_SIG_RES_NAME "secp256k1_ecdsa_recoverable_signature"
#endif
Expand Down Expand Up @@ -64,8 +65,8 @@ PHP_FUNCTION(secp256k1_ec_pubkey_parse);
PHP_FUNCTION(secp256k1_ec_pubkey_serialize);

PHP_FUNCTION(secp256k1_ec_privkey_tweak_add);
PHP_FUNCTION(secp256k1_ec_privkey_tweak_mul);
PHP_FUNCTION(secp256k1_ec_pubkey_tweak_add);
PHP_FUNCTION(secp256k1_ec_privkey_tweak_mul);
PHP_FUNCTION(secp256k1_ec_pubkey_tweak_mul);

PHP_FUNCTION(secp256k1_ec_pubkey_combine);
Expand All @@ -76,6 +77,15 @@ PHP_FUNCTION(secp256k1_scratch_space_destroy);
PHP_FUNCTION(secp256k1_nonce_function_default);
PHP_FUNCTION(secp256k1_nonce_function_rfc6979);

PHP_FUNCTION(secp256k1_xonly_pubkey_create);
PHP_FUNCTION(secp256k1_xonly_pubkey_parse);
PHP_FUNCTION(secp256k1_xonly_pubkey_serialize);
PHP_FUNCTION(secp256k1_xonly_pubkey_from_pubkey);
PHP_FUNCTION(secp256k1_xonly_pubkey_to_pubkey);
PHP_FUNCTION(secp256k1_xonly_privkey_tweak_add);
PHP_FUNCTION(secp256k1_xonly_pubkey_tweak_add);
PHP_FUNCTION(secp256k1_xonly_pubkey_tweak_test);

/* Recovery module */
#ifdef SECP256K1_MODULE_RECOVERY
PHP_FUNCTION(secp256k1_ecdsa_sign_recoverable);
Expand Down
Loading