Commit graph

9 commits

Author SHA1 Message Date
Virgil
cb43082d18 feat(crypto): add Zarcanum verification context API
Some checks are pending
Security Scan / security (push) Waiting to run
Test / Test (push) Waiting to run
Co-Authored-By: Charon <charon@lethean.io>
2026-04-04 21:28:12 +00:00
Virgil
8e6dc326df feat(crypto): add generic double-Schnorr bridge
Some checks are pending
Security Scan / security (push) Waiting to run
Test / Test (push) Waiting to run
Expose generate/verify wrappers for generic_double_schnorr_sig and add a consensus helper for balance-proof checks.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-04 18:26:33 +00:00
Snider
34128d8e98 refactor: migrate module path to dappco.re/go/core/blockchain
Some checks failed
Security Scan / security (pull_request) Successful in 11s
Test / Test (pull_request) Failing after 19s
Update go.mod module line, all require/replace directives, and every
.go import path from forge.lthn.ai/core/go-blockchain to
dappco.re/go/core/blockchain. Add replace directives to bridge
dappco.re paths to existing forge.lthn.ai registry during migration.
Update CLAUDE.md, README, and docs to reflect the new module path.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-22 01:49:26 +00:00
Claude
dd04cc9dee
feat(crypto): wire BPP/BPPE/BGE proof verification with real testnet data
Add cn_bpp_verify for Bulletproofs++ (1 delta, bpp_crypto_trait_ZC_out)
used by zc_outs_range_proof in post-HF4 transactions. Distinguish from
cn_bppe_verify (2 deltas, bpp_crypto_trait_Zarcanum) used for Zarcanum
PoS proofs.

Key changes:
- Add deserialise_bpp() and cn_bpp_verify() to bridge.cpp
- Add VerifyBPP() Go wrapper in proof.go
- Wire BPPE and BGE stubs into real C++ verify functions
- Add try/catch to all proof verifiers (C++ throws on invalid points)
- Add nil/empty input guards to all Go proof functions
- Test with real BPP proof from testnet block 101 coinbase tx

The BPP proof from tx 543bc3c2... (first post-HF4 coinbase) verifies
successfully through the full CGo pipeline, confirming wire format
deserialisation matches the C++ daemon output.

Co-Authored-By: Charon <charon@lethean.io>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 18:37:08 +00:00
Claude
1c763a8c31
feat(crypto): CLSAG ring signatures (GG/GGX/GGXXG) and proof verification stubs
CLSAG_GG generation and verification with flat-buffer ring marshalling.
Cofactor helpers (PointMul8/PointDiv8) for 1/8 premultiplication handling.
CLSAG_GGX and CLSAG_GGXXG verify-only bindings (GGX sig size tests).
Bulletproofs+, BGE, and Zarcanum verification stubs — implementation
deferred to Phase 4 when RPC provides real on-chain proof data.

19 tests pass, 3 skipped (proof stubs), all clean with -race.

Co-Authored-By: Charon <charon@lethean.io>
2026-02-20 18:47:08 +00:00
Claude
f022e61da9
feat(crypto): standard and ring signature (NLSAG) generation/verification
Standard signature sign/verify round-trip with negative tests (wrong key,
wrong message). Ring signature (NLSAG) uses flat buffer C API to avoid
double-pointer indirection across CGo boundary. Round-trip with 4-member
ring and wrong-message negative test. All 15 tests pass with race detector.

Co-Authored-By: Charon <charon@lethean.io>
2026-02-20 18:30:53 +00:00
Claude
9821ea4d21
feat(crypto): key derivation, one-time addresses, and key images
Add ECDH shared secret, ephemeral key derivation (DerivePublicKey,
DeriveSecretKey), and key image generation/validation to the CGo bridge.
Tests verify ECDH commutativity, output scanning round-trip, and key
image determinism.

Co-Authored-By: Charon <charon@lethean.io>
2026-02-20 18:28:43 +00:00
Claude
a68926c45c
feat(crypto): key generation, validation, and secret-to-public derivation
Co-Authored-By: Charon <charon@lethean.io>
2026-02-20 18:24:06 +00:00
Claude
b759645724
feat(crypto): CGo bridge smoke test — FastHash via Keccak-256
Verify CGo link to libcryptonote.a works with a known-vector hash test.

Co-Authored-By: Charon <charon@lethean.io>
2026-02-20 18:22:25 +00:00