emill / p256-cortex-ecdh Goto Github PK
View Code? Open in Web Editor NEWP256 ECDH for Cortex-M0 and Cortex-M4
License: BSD 2-Clause "Simplified" License
P256 ECDH for Cortex-M0 and Cortex-M4
License: BSD 2-Clause "Simplified" License
Hi Emil,
first of all thanks a lot for releasing these nice UMAAL-based implementations of the base field of P256 under a permissive license! I'm building a Rust implementation of P256 ECDH/ECDSA around them, using your speed optimized P256_{add,sub,mul,sqr}mod
routines as computational core.
I now find myself in the strange situation where the entire ephemeral (public) point calculation in ECDSA is twice as fast as inverting the ephemeral scalar k
with Euler's theorem and my own Barrett reduction-based Rust implementation ๐คฆโโ๏ธ. Did you ever put thought into speeding up the scalar field, or know of an existing UMAAL-based implementation for it? I think any "N256_mulmod
" assembly routine would give a major speed bump, even if not completely optimized - my lack of assembly skills are currently preventing me from adapting your P256_mulmod
to n = 0xffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551
.
I'm trying to adapt this project to the RISC-V platform, but RISC-V doesn't have overflow handling when computing.
It means that the assembly on Cortex cannot be simply replaced and then run on RISC-V.
My current idea is to create a global variable for storing the overflow flag, but this will greatly reduce the calculation speed.
Do you have any good solution?
Thanks!
Hi Emill,
your assembly implementation of P256 is very fast...
incredible work :)
do you have some news about the "Future work" you mentioned on the description about the ECDSA?
...and again very cool work
Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.