Repository navigation
crypto: foundation increment 2, libsecp256k1's ECDH forms, recovery, ElligatorSwift, MuSig2 and silent payments - #5
Merged
Conversation
added 30 commits
November 19, 2026 17:21
…dinate and the shared point
…l says what a raw x costs; the session example wipes its shared secrets once the ciphers are made Task 2.1's review, Minors 2 to 7: crypto.json gains the sources sec1 and wycheproof; the uncompressed encoding is cited to SEC 1, not SEC 2; the raw x coordinate's pitfall cites SEC 1 for the points' x and names the cost; the ECDH test returns when libsecp256k1 refuses a point webcpp took, instead of reaching its illegal callback; ecdh_session scopes its shared secrets; the memory page's edited line is rewrapped.
…nt's jam-comments rule asks
…ed public key in both forms
…2.2 added; recover reads the canary before the id's check; the changelog's secp256k1 line reads plainly
…as the rest of it does
…ry first; a workspace is wiped whole, off-alignment ones tested; the tweak example wipes on every path; the pages cite OpenSSL and name tweaks and key files
…tweak it computes
…dd, one item each
…the header lint's world rule asks
…ce its signature consumes
…rtial signature of the wrong length
…and a labelled spend key at infinity
… log n), sorting the workspace's pointers
…der the same layout guard
…e change label, which scan_outputs leaves out by default
…d says what an overflow costs
…ilies of their own, refused and defaulted by the generated table
…ly's comment names the namespace of its header
… so its refusals read as a sentence
… is and what the page does not state
added 24 commits
November 19, 2026 17:21
…256k1 module families
…s both linked and not linked
… keys, not an address
…re size_t and the access helper returns {}
…as its specialization, which clang-tidy reads without a cast
… NOLINT the other oracle tests carry
…maller functions, unsigned flips, a const moved-to key pair
…ons, reserved vectors, trailing commas, unsigned flips
…eserved vector, trailing commas, main's complexity named
… keeps raw and hashed ECDH in the secp256k1 line
…, its verdicts and the key pairs' public keys marked public where webcpp reads them, and dudect times ecdh_x
…atorSwift's BIP 324 exchange, a two-signer MuSig2 signature and a silent payment output, from release builds
…tures, MuSig2, silent payments, Nostr's shared key and BIP 324's handshake, and the curves pages list secp256k1's functions by header
…that dudect's names ecdh_x alone and MemorySanitizer's the paths memcheck runs
…it answers, so that llms.txt keeps its Use it to for recover, ElligatorSwift, MuSig2 and silent payments
… dudect_secp256k1 checks the peer's public key, and the constant-time paths check the decoded PKCS#8 pair and the MuSig2 secret nonce traced
…network as bytes and checked before they are added, and a Taproot key-path output tweaked before any nonce
…an into bytes it owns, so that a tweak returned by value, which libsecp256k1 would read after it is gone, is refused at compile time on every standard library
…y guide names ElligatorSwift, MuSig2 and silent payments among what allocates nothing, and the Taproot example says the session and the parts need the tweaked key
… damaged one, so that the refusal reads as the same check's
…<std::uint8_t> lists, not braced int lists, whose conversion to std::uint8_t MSVC warns of (C4244, an error under /WX)
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What this brings
webcpp::crypto's foundation, increment 2: libsecp256k1's remaining modules over the same patterns as increment 1.
ecdhreturnssecret<32>,ecdh_xandecdh_point(raw and hashed forms).public_key(ordered, both point forms), parse and serialize, recoverable ECDSA andrecover, hedged ECDSA with extra entropy.Verification (local, on the final heads, before this PR)
-a, test and example: native 344, gcc-15 307, wasip2 303, wasip3 291, emscripten 230; 0 failed, 0 warnings.For the owner
std::optional<std::span<const std::uint8_t, 32>>: a by-value result left the span dangling on libstdc++ and MSVC. Pinned by static_asserts on every lane and a compile-fail case per compiler.Related PRs
🤖 Generated with Claude Code