nistp256-cairo
nistp256-cairo copied to clipboard
A cairo implementation of NIST P-256.
nistp256-cairo
A cairo implementation of NIST P-256(AKA Secp256R1).
We use canonical ECC way to make this implementation.
implementation notes
Outsourcing computing
We use python to compute the complex field computing, and verify the correctness in cairo. Start from src/p256_example.cairo
.
ECDSA-Verify in Projective coordinates
For a signature , pubkey
, base point
and msg hash
, we have to verify that:
and if
or
In this form, we avoid division method.