Skip to content

Commit 4275680

Browse files
committed
Merge remote-tracking branch 'benma/update-libwally'
2 parents 31f41d4 + 98822a3 commit 4275680

File tree

7 files changed

+13
-13
lines changed

7 files changed

+13
-13
lines changed

external/libwally-core

src/keystore.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,7 @@ bool keystore_secp256k1_nonce_commit(
608608
}
609609
secp256k1_context* ctx = wally_get_secp_context();
610610
secp256k1_ecdsa_s2c_opening signer_commitment;
611-
if (!secp256k1_ecdsa_anti_klepto_signer_commit(
611+
if (!secp256k1_ecdsa_anti_exfil_signer_commit(
612612
ctx,
613613
&signer_commitment,
614614
msg32,
@@ -640,7 +640,7 @@ bool keystore_secp256k1_sign(
640640
}
641641
secp256k1_context* ctx = wally_get_secp_context();
642642
secp256k1_ecdsa_signature secp256k1_sig = {0};
643-
if (!secp256k1_anti_klepto_sign(
643+
if (!secp256k1_anti_exfil_sign(
644644
ctx,
645645
&secp256k1_sig,
646646
msg32,

src/keystore.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,13 +203,13 @@ USE_RESULT bool keystore_secp256k1_pubkey_uncompressed(
203203
/**
204204
* Get a commitment to the original nonce before tweaking it with the host nonce. This is part of
205205
* the ECDSA Anti-Klepto Protocol. For more details, check the docs of
206-
* `secp256k1_ecdsa_anti_klepto_signer_commit`.
206+
* `secp256k1_ecdsa_anti_exfil_signer_commit`.
207207
* @param[in] keypath derivation keypath
208208
* @param[in] keypath_len size of keypath buffer
209209
* @param[in] msg32 32 byte message which will be signed by `keystore_secp256k1_sign`.
210210
* @param[in] host_commitment must be `sha256(sha256(tag)||shas256(tag)||host_nonce)` where
211211
* host_nonce is passed to `keystore_secp256k1_sign()`. See
212-
* `secp256k1_ecdsa_anti_klepto_host_commit()`.
212+
* `secp256k1_ecdsa_anti_exfil_host_commit()`.
213213
* @param[out] client_commitment_out EC_PUBLIC_KEY_LEN bytes compressed signer nonce pubkey.
214214
*/
215215
USE_RESULT bool keystore_secp256k1_nonce_commit(

test/unit-test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ set(TEST_LIST
228228
cleanup
229229
"-Wl,--wrap=util_cleanup_32"
230230
keystore
231-
"-Wl,--wrap=secp256k1_anti_klepto_sign,--wrap=memory_is_initialized,--wrap=memory_is_seeded,--wrap=memory_get_failed_unlock_attempts,--wrap=memory_reset_failed_unlock_attempts,--wrap=memory_increment_failed_unlock_attempts,--wrap=memory_set_encrypted_seed_and_hmac,--wrap=memory_get_encrypted_seed_and_hmac,--wrap=reset_reset,--wrap=salt_hash_data,--wrap=cipher_aes_hmac_encrypt,--wrap=random_32_bytes"
231+
"-Wl,--wrap=secp256k1_anti_exfil_sign,--wrap=memory_is_initialized,--wrap=memory_is_seeded,--wrap=memory_get_failed_unlock_attempts,--wrap=memory_reset_failed_unlock_attempts,--wrap=memory_increment_failed_unlock_attempts,--wrap=memory_set_encrypted_seed_and_hmac,--wrap=memory_get_encrypted_seed_and_hmac,--wrap=reset_reset,--wrap=salt_hash_data,--wrap=cipher_aes_hmac_encrypt,--wrap=random_32_bytes"
232232
keystore_antiklepto
233233
"-Wl,--wrap=keystore_secp256k1_nonce_commit,--wrap=keystore_secp256k1_sign"
234234
keystore_functional

test/unit-test/test_btc_sign.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1147,7 +1147,7 @@ static void _sign(const _modification_t* mod)
11471147

11481148
inputs[1].input.has_host_nonce_commitment = true;
11491149
// Make host commitment from host_nonce.
1150-
assert_true(secp256k1_ecdsa_anti_klepto_host_commit(
1150+
assert_true(secp256k1_ecdsa_anti_exfil_host_commit(
11511151
wally_get_secp_context(),
11521152
inputs[1].input.host_nonce_commitment.commitment,
11531153
host_nonce));
@@ -1184,7 +1184,7 @@ static void _sign(const _modification_t* mod)
11841184
secp256k1_ecdsa_s2c_opening opening;
11851185
assert_true(secp256k1_ecdsa_s2c_opening_parse(
11861186
wally_get_secp_context(), &opening, next.anti_klepto_signer_commitment.commitment));
1187-
assert_true(secp256k1_anti_klepto_host_verify(
1187+
assert_true(secp256k1_anti_exfil_host_verify(
11881188
wally_get_secp_context(),
11891189
&parsed_signature,
11901190
expected_sighash,

test/unit-test/test_keystore.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ static uint8_t _expected_secret[32] = {
102102
0x12, 0x12, 0x40, 0x37, 0x7a, 0x79, 0x97, 0x55, 0xd7, 0xcc, 0xe9, 0x26, 0x1e, 0x16, 0x91, 0x71,
103103
};
104104

105-
int __real_secp256k1_anti_klepto_sign(
105+
int __real_secp256k1_anti_exfil_sign(
106106
const secp256k1_context* ctx,
107107
secp256k1_ecdsa_signature* sig,
108108
const unsigned char* msg32,
@@ -112,7 +112,7 @@ int __real_secp256k1_anti_klepto_sign(
112112

113113
static const unsigned char* _sign_expected_msg = NULL;
114114
static const unsigned char* _sign_expected_seckey = NULL;
115-
int __wrap_secp256k1_anti_klepto_sign(
115+
int __wrap_secp256k1_anti_exfil_sign(
116116
const secp256k1_context* ctx,
117117
secp256k1_ecdsa_signature* sig,
118118
const unsigned char* msg32,
@@ -128,7 +128,7 @@ int __wrap_secp256k1_anti_klepto_sign(
128128
assert_memory_equal(_sign_expected_seckey, seckey, 32);
129129
_sign_expected_seckey = NULL;
130130
}
131-
return __real_secp256k1_anti_klepto_sign(ctx, sig, msg32, seckey, host_data32, recid);
131+
return __real_secp256k1_anti_exfil_sign(ctx, sig, msg32, seckey, host_data32, recid);
132132
}
133133

134134
bool __wrap_salt_hash_data(

test/unit-test/test_keystore_antiklepto.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ static void _test_keystore_antiklepto(void** state)
116116
// Anti-Klepto Protocol".
117117

118118
// Protocol step 1.
119-
assert_true(secp256k1_ecdsa_anti_klepto_host_commit(
119+
assert_true(secp256k1_ecdsa_anti_exfil_host_commit(
120120
wally_get_secp_context(), host_nonce_commitment, host_nonce));
121121

122122
{ // Commit - protocol step 2.
@@ -178,7 +178,7 @@ static void _test_keystore_antiklepto(void** state)
178178
secp256k1_ecdsa_s2c_opening opening;
179179
assert_true(secp256k1_ecdsa_s2c_opening_parse(
180180
wally_get_secp_context(), &opening, signer_commitment));
181-
assert_true(secp256k1_anti_klepto_host_verify(
181+
assert_true(secp256k1_anti_exfil_host_verify(
182182
wally_get_secp_context(),
183183
&parsed_signature,
184184
msg,

0 commit comments

Comments
 (0)