Skip to content

feat(go): U128 Mul/Div/Mod + exported FalconVerify (alpha.11) - #19

Merged
zarah-s merged 1 commit into
mainfrom
go-sdk/alpha11-arith-falcon
Jul 29, 2026
Merged

feat(go): U128 Mul/Div/Mod + exported FalconVerify (alpha.11)#19
zarah-s merged 1 commit into
mainfrom
go-sdk/alpha11-arith-falcon

Conversation

@zarah-s

@zarah-s zarah-s commented Jul 29, 2026

Copy link
Copy Markdown
Member

Adds the arithmetic and signature primitives the Go source-template ports need:

  • U128.Mul / MulChecked / DivMod / Div / Mod — math/bits only (no math/big), cross-checked against math/big over edge cases + 800 pseudo-random values. Unblocks vesting (MulChecked then Div).
  • FalconVerify(publicKey, msg, sig) bool — pointer-free wrapper over the falcon_verify host fn. Unblocks simple-multisig and dao-governance.

Additive, backward-compatible. Verified: native tests green, tinygo smoke build links, go vet clean. Publishes as go/v0.1.0-alpha.11.

Adds the arithmetic and signature primitives the source-template ports
need: vesting's linear math (MulChecked then Div) and FALCON-verifying
contracts (multisig, DAO governance).

- U128.Mul (wrapping), MulChecked (256-bit product, overflow-detecting),
  DivMod/Div/Mod (64-bit-divisor fast path + binary long division).
  math/bits only — no math/big, so contracts stay small. Cross-checked
  against math/big over edge cases + 800 pseudo-random values.
- FalconVerify(publicKey, msg, sig) bool — pointer-free wrapper over the
  falcon_verify host fn; verification runs host-side.

Additive and backward-compatible → go/v0.1.0-alpha.11.
@zarah-s
zarah-s merged commit 65d64b6 into main Jul 29, 2026
0 of 5 checks passed
@zarah-s
zarah-s deleted the go-sdk/alpha11-arith-falcon branch July 29, 2026 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant