Numerology
Numerology: Optimized ECC arithmetic library for secp256k1 in Solidity
Install / Use
/learn @nucypher/NumerologyREADME
Numerology
Optimized ECC arithmetic library for secp256k1 in Solidity
WARNING: Don't use it with any private input (e.g., a private key), as it's going to be exposed. Don't ever use this to sign something! Also, this is experimental -- Use at your own risk!
Numerology is a Solidity library for elliptic curve arithmetic on secp256k1. Its original goal is to support NuCypher smart contracts for Re-Encryption Verification of Umbral ciphertexts, which is done by means of Non-Interactive Zero Knowledge Proofs of Knowledge. In particular, Numerology provides optimized ECC algorithms useful for verifying Schnorr-like NIZKs. These algorithms are honed to spend as little gas as possible. For this reason, and also to bypass some EVM and Solidity limitations, the code can be ugly as hell sometimes (sorry for that!).
It's initially based on the ECCMath library, although it's completely rewritten.
Features:
- Point addition and doubling in Jacobian coordinates with optimized formulas.
- Simultaneous scalar multiplication with several optimizations (interleaving, WNAF representation, curve endomorphism).
- Verifying an equation of the form
aP + bQ = Rtakes approximately 500,000 gas.
Related Skills
node-connect
343.3kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
92.1kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
343.3kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
343.3kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
