Skip to content

Add BigInteger support for EC arithmetic - #14

Merged
diehoq merged 7 commits into
mainfrom
feature/biginteger-support
Apr 4, 2026
Merged

Add BigInteger support for EC arithmetic#14
diehoq merged 7 commits into
mainfrom
feature/biginteger-support

Conversation

@diehoq

@diehoq diehoq commented Mar 23, 2026

Copy link
Copy Markdown
Owner

Summary

Add BigInteger support for the elliptic-curve arithmetic integration.

Included in this PR

  • initial BigInteger integration work for EC arithmetic
  • smoke-test coverage for the current integrated path

Notes

This PR is opened from the current committed branch state only.
Local uncommitted work was intentionally left out.

diehoq added 7 commits March 22, 2026 20:54
Restructure all EC arithmetic functions to work with both int and
BigInteger moduli. This enables compilation for 256-bit primes.

Key changes:
- to_montgomery/to_standard: accept Python int p_int directly
- inpl_rsub: accept Python int p_int, extract concrete modulus from aux_data
- kaliski_mod_inv: p is static Python int, _mk_bi only for QuantumModulus
- q_ec_add_inpl: extract concrete modulus via _p_int for classical ops
- Add _p_int() and _bi() helpers for BigInteger/int interop
- Add BigInteger test cases (k=1,2,3) using boolean_simulation
@diehoq
diehoq merged commit 3b90848 into main Apr 4, 2026
1 check failed
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