22 Commits

Author SHA1 Message Date
Jonas Nick
0d540ec942
Merge commits '88e80722 ff8edf89 f29a3270 a7a7bfaf a01a7d86 b1579cf5 ad7433b1 233822d8 5fbff5d3 2b77240b 1bff2005 e1817a6f 5596ec5c 8ebe5c52 1cca7c17 1b21aa51 cbd25559 09b1d466 57573187 8962fc95 9d1b458d eb8749fc 6048e6c0 ' into temp-merge-1222 2023-07-20 16:29:40 +00:00
Jonas Nick
6c54db1987
Merge commits '2286f809 751c4354 477f02c4 e3f84777 5c789dcd 8c949f56 21ffe4b2 ' into temp-merge-1055 2023-07-18 12:51:17 +00:00
Tim Ruffing
5757318782
Merge bitcoin-core/secp256k1#1212: Prevent dead-store elimination when clearing secrets in examples
5660c137552c657da5265691dea0fb10faae6a76 prevent optimization in algorithms (Harshil Jani)

Pull request description:

  Signed-off-by: Harshil Jani <harshiljani2002@gmail.com>

ACKs for top commit:
  sipa:
    utACK 5660c137552c657da5265691dea0fb10faae6a76
  real-or-random:
    utACK 5660c137552c657da5265691dea0fb10faae6a76

Tree-SHA512: 90024b7445c04e18a88af4099fc1ac6d1b9b2309b88dd22ae2b1f50aed7bac28b2c180cc28e1a95d5e9ec94b4c4adc44b9ada1477e6abe8efae7884c2382645c
2023-03-02 23:30:20 +01:00
Harshil Jani
5660c13755 prevent optimization in algorithms
Signed-off-by: Harshil Jani <harshiljani2002@gmail.com>

Add secure_erase function to clear secrets

Signed-off-by: Harshil Jani <harshiljani2002@gmail.com>

Update the function with good practices

Signed-off-by: Harshil Jani <harshiljani2002@gmail.com>

Renaming random.h to examples_util.h

Signed-off-by: Harshil Jani <harshiljani2002@gmail.com>
2023-03-02 15:36:41 +05:30
Jonas Nick
36621d13be
musig: update to BIP v1.0.0-rc.2 "Add ''pk'' arg to ''NonceGen''" 2023-02-13 14:03:51 +00:00
Jonas Nick
d717a4980b
musig: update to BIP v0.8 "Switch from X-only to plain pk inputs." 2023-02-13 14:03:51 +00:00
Jonas Nick
060887e9d7
musig: update to BIP v0.5.1 "Rename ordinary tweaking to plain" 2023-02-13 14:03:51 +00:00
Tim Ruffing
739c53b19a examples: Extend sig examples by call that uses static context
Besides improving the examples, this makes sure that the examples
import a variable (instead of a function), namely the static context,
from the library. This is helpful when testing MSVC builds, because
the MSVC linker tends to be awkward when importing variables.
2023-02-06 21:44:56 +01:00
Tim Ruffing
4386a2306c examples: Switch to NONE contexts 2022-12-05 11:26:44 +01:00
Jonas Nick
645d9c53c4 examples: let musig use random.h instead of /dev/urandom 2022-03-31 13:38:30 +00:00
Jonas Nick
eccba5b4e5 examples: relicense musig example to CC0 public domain 2022-03-31 13:33:30 +00:00
Jonas Nick
8298c0c79b Merge commits 'c8aa516b 0a40a486 d8a24632 85b00a1c 59547943 5dcc6f8d 07752831 3ef94aa5 1253a277 64b34979 ac83be33 0e5cbd01 e0508ee9 587239db 1ac7e31c d0ad5814 912b7ccc 8746600e ' into temp-merge-1093
Revert: util: Remove endianness detection
2022-03-30 15:00:03 +00:00
Tim Ruffing
f813bb0df3 schnorrsig: Adapt example to new API 2022-03-17 22:41:36 +01:00
Tim Ruffing
99e6568fc6 schnorrsig: Rename schnorrsig_sign to schnorsig_sign32 and deprecate 2022-03-17 22:41:36 +01:00
Elichai Turkel
7c9502cece
Add a copy of the CC0 license to the examples 2022-02-23 16:15:00 +02:00
Elichai Turkel
422a7cc86a
Add a ecdh shared secret example
Co-authored-by: Jonas Nick <jonasd.nick@gmail.com>
2022-02-23 16:14:57 +02:00
Elichai Turkel
b0cfbcc143
Add a Schnorr signing and verifying example
Co-authored-by: Jonas Nick <jonasd.nick@gmail.com>
2022-02-23 16:14:55 +02:00
Elichai Turkel
fee7d4bf9e
Add an ECDSA signing and verifying example
Co-authored-by: Jonas Nick <jonasd.nick@gmail.com>
2022-02-23 16:14:53 +02:00
Tim Ruffing
8fd97d8116
Merge ElementsProject/secp256k1-zkp#158: Small musig improvements
d895b10c18b8aa19a77f0a80f318e1a2052e7c9b musig: mention musig.md in example (Jonas Nick)
588009d26ffc58864b6e9fc3f1ab2eae633476c3 musig: improve doc of partial_sig_verify regarding signing sessions (Jonas Nick)
b1094953c4497947222df12ef8f9adb2191e2b17 musig: remove superfluous comment (Jonas Nick)

Pull request description:

ACKs for top commit:
  robot-dreams:
    ACK d895b10c18b8aa19a77f0a80f318e1a2052e7c9b
  real-or-random:
    ACK d895b10c18b8aa19a77f0a80f318e1a2052e7c9b

Tree-SHA512: 35169240868500bb27e5a6b8779f090d3f33a6c0cb1a4574e6e53e9c52782f454fe7df6d49b68e0acdd174e25a756bf6267339f0d4e94f28d5ae49145f21e298
2022-01-25 10:53:38 +01:00
Jonas Nick
57a17929fc musig: add ordinary and xonly tweaking to the example 2022-01-21 17:07:06 +00:00
Jonas Nick
d895b10c18 musig: mention musig.md in example 2022-01-02 19:42:15 +00:00
Jonas Nick
22c88815c7 musig: replace MuSig(1) with MuSig2 2021-12-17 13:47:23 +00:00