{"_id":"@crema-labs/ecdsa-p384-circom","name":"@crema-labs/ecdsa-p384-circom","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"@crema-labs/ecdsa-p384-circom","description":"ECDSA P384 implementation for circom","license":"MIT","main":"index.js","version":"0.0.1","scripts":{"start":"npx ts-node ./src/index.ts","test":"NODE_OPTIONS=--max-old-space-size=51200 npx mocha --timeout 1000000000"},"keywords":["ecdsa-p384","ecdsa","secp384r1","p384-circom","ecdsa-circom","circom","zk","zk-snarks"],"repository":{"type":"git","url":"git+https://github.com/crema-labs/ecdsa-p384-circom.git"},"contributors":[{"name":"Vikas Rushi","email":"0xvikas@gmail.com"},{"name":"Ayman Mohammed","email":"aymanshaik1015@gmail.com"}],"dependencies":{"bip66":"^2.0.0","circomkit":"^0.0.22","circomlib":"^2.0.5","elliptic":"^6.5.7","node-forge":"^1.3.1"},"devDependencies":{"@types/elliptic":"^6.4.18","@types/mocha":"^10.0.1","@types/node":"^20.3.0","mocha":"^10.2.0","ts-node":"^10.9.1","typescript":"^5.1.3"},"_id":"@crema-labs/ecdsa-p384-circom@0.0.1","gitHead":"4ca54b30d118754ac5097e63daeaa560408ee20d","bugs":{"url":"https://github.com/crema-labs/ecdsa-p384-circom/issues"},"homepage":"https://github.com/crema-labs/ecdsa-p384-circom#readme","_nodeVersion":"21.4.0","_npmVersion":"10.2.4","dist":{"integrity":"sha512-7GT/e2iCoKQns0Kh7QwkJolffRm2dUcy+OxhXl6vZkWcMlHXLvBDNSeDBsBGKlCkM9ohcd8EyZmQQcdyuX6g+A==","shasum":"98d8cc2568394e6877874744956d26e59508c7b4","tarball":"https://registry.npmjs.org/@crema-labs/ecdsa-p384-circom/-/ecdsa-p384-circom-0.0.1.tgz","fileCount":160,"unpackedSize":9866730,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE/8FmzTuaXdSJhdEe3dlxD1zw89B80UtG6RwXZRgcRiAiEAvsfIy0CSKVRyLirBRob2Qp/8uJmJAAXealavxGv4APM="}]},"_npmUser":{"name":"vikas_rushi","email":"vikasrushi@outlook.com"},"directories":{},"maintainers":[{"name":"immabeyeet","email":"coarse.00baggage@icloud.com"},{"name":"vikas_rushi","email":"vikasrushi@outlook.com"},{"name":"aymanm","email":"aymanshaik1015@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ecdsa-p384-circom_0.0.1_1724495609738_0.3048880775770042"},"_hasShrinkwrap":false}},"time":{"created":"2024-08-24T10:33:29.621Z","0.0.1":"2024-08-24T10:33:29.986Z","modified":"2024-08-24T10:33:30.306Z"},"maintainers":[{"name":"immabeyeet","email":"coarse.00baggage@icloud.com"},{"name":"vikas_rushi","email":"vikasrushi@outlook.com"},{"name":"aymanm","email":"aymanshaik1015@gmail.com"}],"description":"ECDSA P384 implementation for circom","homepage":"https://github.com/crema-labs/ecdsa-p384-circom#readme","keywords":["ecdsa-p384","ecdsa","secp384r1","p384-circom","ecdsa-circom","circom","zk","zk-snarks"],"repository":{"type":"git","url":"git+https://github.com/crema-labs/ecdsa-p384-circom.git"},"contributors":[{"name":"Vikas Rushi","email":"0xvikas@gmail.com"},{"name":"Ayman Mohammed","email":"aymanshaik1015@gmail.com"}],"bugs":{"url":"https://github.com/crema-labs/ecdsa-p384-circom/issues"},"license":"MIT","readme":"# ecdsa-p384-circom\n\nThis repository provides implementations of Elliptic Curve Digital Signature Algorithm (ECDSA) operations for the P-384 curve using Circom. These implementations are designed for use in zero-knowledge proofs and other cryptographic applications.\n\n> Note: These circuits not audited and not yet recommended for production use.\n\n## Setup\n\n```sh\n$ git clone https://github.com/crema-labs/ecdsa-p384-circom\n$ cd ecdsa-p384-circom\n$ yarn\n```\n\n## Project Structure\n\nIn this repository, we are using [Circomkit](https://github.com/erhant/circomkit) to test some example circuits using Mocha. The circuits and the statements that they prove are as follows:\n\n## Circuits\n\n1. [`ecdsa.circom`](https://github.com/crema-labs/ecdsa-p384-circom/blob/main/circuits/ecdsa.circom): Implements the ECDSA signature verification and private key to public key conversion for the P-384 curve.\n   - [ECDSAPrivToPub](https://github.com/crema-labs/ecdsa-p384-circom/blob/main/circuits/ecdsa.circom#L13) - Converts a private key to a public key in P-384.\n   - [ECDSAVerifyNoPubkeyCheck](https://github.com/crema-labs/ecdsa-p384-circom/blob/main/circuits/ecdsa.circom#L131) - Verifies an ECDSA signature for a given message and public key.\n2. [`p384.circom`](https://github.com/crema-labs/ecdsa-p384-circom/blob/main/circuits/p384.circom): Implements the basic operations for the P-384 curve.\n   - [P384AddUnequal](https://github.com/crema-labs/ecdsa-p384-circom/blob/main/circuits/p384.circom#L14) - Adds two unequal points on the P-384 curve.\n   - [P384Double](https://github.com/crema-labs/ecdsa-p384-circom/blob/main/circuits/p384.circom#L34) - Doubles a point on the P-384 curve.\n   - [P384ScalarMult](https://github.com/crema-labs/ecdsa-p384-circom/blob/main/circuits/p384.circom#L56) - Multiplies a point on the P-384 curve by a scalar.\n\n### Testing\n\nYou can use the following commands to test the circuits:\n\n```sh\n# test everything\nyarn test\n\n# test a specific circuit\nyarn test -g <template-name>\n```\n\n## Benchmarks\nAll tests were performed on a MacBook Pro M1 2020 with 8GB RAM. \n| Operation                      | Constraints | Time (ms) |\n| ------------------------------ | ----------- | --------- |\n| ECDSA Signature Verification   | 4,429,227   | 4,21,394 |\n| ECDSA Point Addition (Unequal) | 4,352       | 850       |\n| ECDSA Point Addition (Equal)   | 6,000       | 573       |\n| ECDSA Scalar Multiplication    | 3,977,848   | 4,20,964    |\n\n\n# Credits\nThis project was made possible thanks to the support of [ZK Email](https://github.com/zkemail) and [OpenPassport](https://github.com/zk-passport) for the grant.\n# Acknowledgments\n\nThis project builds upon the excellent work of the [circom-ecdsa-p256](https://github.com/privacy-scaling-explorations/circom-ecdsa-p256) by PSE and [circom-ecdsa](https://github.com/0xPARC/circom-ecdsa) by 0xPARC. We are grateful for their contributions to implementation of ECDSA in Circom, which formed the foundation for our work.\n\n## Contribution\n\nFeel free to contribute to this repository by creating issues or pull requests. We are open to any suggestions or improvements.\n","readmeFilename":"README.md"}