“Multi-Precision Arithmetic for Cryptology in C++, at Run-Time and at Compile-Time”
summary
A new C++17 header-only library (ctbignum, Apache‑2, GitHub) provides compile-time big-integer computations for 100–500 bit operands and uses std::array/constexpr/user-defined literals to bake moduli into types. Benchmarks show performance that matches or outperforms common libraries for small sizes (close to GMP’s internal mul routine in the 64–320‑bit regime) while still working at run-time. Addition is formally verified with SAW; some functions pass ct-verif constant-time checks; multiplication proofs are still outstanding. Designed for crypto and MPC use.
AI-written summary · about
chapters (12)
- 0:00Introduction and demo
- 1:30Context in cryptography
- 4:43Library purpose and scope
- 6:52Compile-time optimizations
- 8:23Natural C++ API design
- 13:14Function parameter passing
- 15:50Runtime performance
- 18:25Correctness verification
- 22:04Constant-time security
- 25:03Modular reduction techniques
- 26:54Library integration
- 27:15Key takeaways and Q&A
related talks
58mFast Cryptographic Code via Partial Evaluation
01h 00mint != safe && int != ℤ
24mbig number small computer
49mCompiling to preserve our privacy
33mEfficient Modular Arithmetic using Vectorization on CPUs and GPUs
22mPRBMath: A Modern Smart Contract Library for Fixed-Point Math
17mRobust Constant-Time Cryptography
24mWhy you shouldn't write crypto functions yourself
