Skip to content

elliptic curves specification via JSON (neuromancer.sk)#346

Draft
thecyberfred wants to merge 10 commits into
developmentfrom
feature/ECMath
Draft

elliptic curves specification via JSON (neuromancer.sk)#346
thecyberfred wants to merge 10 commits into
developmentfrom
feature/ECMath

Conversation

@thecyberfred
Copy link
Copy Markdown

the website https://neuromancer.sk provides many elliptic curve standards with explicit parameters in JSON format and sagemath examples (just install+run sagemath, copy and paste - easy usage). the NIST page for example lists 15 standards, and provides a common JSON file, which specifies all in a signle file. and many further cathegories are available - all fulfilling a common JSON scheme.

at the moment, three NIST curves are specified in our kotlin code - this small list could be significantly extended, but major changes will be required. currently an enum is used in ECCurve, but it should be refactored to an interface. this however requires some decisions - in which order should we implement what? ECMath will require new code - how much is already there and where can we find the details for the remaining parts? how should we test?

one explicit test could be as following: since neuromancer provides sagemath examples, we could compare our results with the output from sage. this should be easy to implement as python/sage allowes simple wrappers from kotlin.

a major question might be on non-prime fields: at the moment we only support prime fields (F_p with p prime) but some curves might require binary fields (F_{2^k}) - or even more generally F_{p^k}, but not sure if those are used in practice. one approach would be to - for the begging - stick to prime field arithmetics and provide the corresponding curves. if all this is done (will be a lot of work), we could then in a second phase, generalize the code to general non-prime fields.

@github-actions
Copy link
Copy Markdown

⚠️⚠️ This pull request targets main. I am re-targeting it to development. ⚠️⚠️

@github-actions github-actions Bot changed the base branch from main to development August 29, 2025 13:40
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