8
8
[ ![ Github Actions] [ gha-release-badge ]] [ gha-release-url ] [ ![ Foundry] [ foundry-badge ]] [ foundry ]
9
9
[ ![ License: MIT] [ license-badge ]] [ license ] ![ Is it audited?] [ audit ]
10
10
11
- [ github-editor-url ] : https://github.dev/0x90d2b2b7fb7599eebb6e7a32980857d8 /secp256r1-verify/tree/main
11
+ [ github-editor-url ] : https://github.dev/get-smooth /secp256r1-verify/tree/main
12
12
[ github-editor-badge ] : https://img.shields.io/badge/Github-Open%20the%20Editor-purple?logo=github
13
13
[ gha-quality-url] :
14
- https://github.com/0x90d2b2b7fb7599eebb6e7a32980857d8 /secp256r1-verify/actions/workflows/quality-checks.yml
14
+ https://github.com/get-smooth /secp256r1-verify/actions/workflows/quality-checks.yml
15
15
[ gha-quality-badge] :
16
- https://github.com/0x90d2b2b7fb7599eebb6e7a32980857d8 /secp256r1-verify/actions/workflows/quality-checks.yml/badge.svg?branch=main
17
- [ gha-test-url ] : https://github.com/0x90d2b2b7fb7599eebb6e7a32980857d8 /secp256r1-verify/actions/workflows/tests.yml
16
+ https://github.com/get-smooth /secp256r1-verify/actions/workflows/quality-checks.yml/badge.svg?branch=main
17
+ [ gha-test-url ] : https://github.com/get-smooth /secp256r1-verify/actions/workflows/tests.yml
18
18
[ gha-test-badge] :
19
- https://github.com/0x90d2b2b7fb7599eebb6e7a32980857d8 /secp256r1-verify/actions/workflows/tests.yml/badge.svg?branch=main
19
+ https://github.com/get-smooth /secp256r1-verify/actions/workflows/tests.yml/badge.svg?branch=main
20
20
[ gha-static-analysis-url] :
21
- https://github.com/0x90d2b2b7fb7599eebb6e7a32980857d8 /secp256r1-verify/actions/workflows/static-analysis.yml
21
+ https://github.com/get-smooth /secp256r1-verify/actions/workflows/static-analysis.yml
22
22
[ gha-static-analysis-badge] :
23
- https://github.com/0x90d2b2b7fb7599eebb6e7a32980857d8 /template-foundry/actions/workflows/static-analysis.yml/badge.svg?branch=main
23
+ https://github.com/get-smooth /template-foundry/actions/workflows/static-analysis.yml/badge.svg?branch=main
24
24
[ gha-release-url] :
25
- https://github.com/0x90d2b2b7fb7599eebb6e7a32980857d8 /secp256r1-verify/actions/workflows/release-package.yml
25
+ https://github.com/get-smooth /secp256r1-verify/actions/workflows/release-package.yml
26
26
[ gha-release-badge] :
27
- https://github.com/0x90d2b2b7fb7599eebb6e7a32980857d8 /secp256r1-verify/actions/workflows/release-package.yml/badge.svg
27
+ https://github.com/get-smooth /secp256r1-verify/actions/workflows/release-package.yml/badge.svg
28
28
[ foundry ] : https://book.getfoundry.sh/
29
29
[ foundry-badge ] : https://img.shields.io/badge/Built%20with-Foundry-FFDB1C.svg
30
30
[ license ] : ./LICENSE.md
@@ -46,31 +46,16 @@ Renaud Dubois' [FreshCryptoLib](https://github.com/rdubois-crypto/FreshCryptoLib
46
46
To install the ` secp256r1-verify ` package in a Foundry project, execute the following command:
47
47
48
48
``` sh
49
- forge install https://github.com/0x90d2b2b7fb7599eebb6e7a32980857d8 /secp256r1-verify
49
+ forge install https://github.com/get-smooth /secp256r1-verify
50
50
```
51
51
52
52
This command will install the latest version of the package in your lib directory. To install a specific version of the
53
53
library, follow the instructions in the
54
54
[ official Foundry documentation] ( https://book.getfoundry.sh/reference/forge/forge-install?highlight=forge%20install#forge-install ) .
55
55
56
- ### Hardhat or Truffle
57
-
58
- To install the ` secp256r1-verify ` package in a Hardhat or Truffle project, use ` npm ` to run the following command:
59
-
60
- ``` sh
61
- npm install @0x90d2b2b7fb7599eebb6e7a32980857d8/secp256r1-verify
62
- ```
63
-
64
- After the installation, import the package into your project and use it.
65
-
66
- > ⚠️ Note: This package is not published on the npm registry, and is only available on GitHub Packages. You need to be
67
- > authenticated with GitHub Packages to install it. For more information, please refer to the
68
- > [ troubleshooting section] ( #setup-github-registry ) . We are willing to deploy it on the npm registry if there is a need.
69
- > Please open an issue if you would like to see this package on the npm registry.
70
-
71
56
## Usage
72
57
73
- This repository provides an unique verification implementation. After you've integrated this library into your project,
58
+ This repository provides a unique verification implementation. After you've integrated this library into your project,
74
59
you can freely import the ` ECDSA256r1 ` and use it.
75
60
76
61
> 🚨 The implementations have not been audited. DO NOT USE IT IN PRODUCTION.
@@ -98,9 +83,9 @@ scripts are expected to be run using the `forge script` command.
98
83
99
84
These gas reports were produced using the ` 0.8.19 ` version of the Solidity compiler (with 100k optimizer runs),
100
85
specifically for the
101
- [ ` 0.4.1 ` ] ( https://github.com/0x90d2b2b7fb7599eebb6e7a32980857d8 /secp256r1-verify/releases/tag/v0.4.1 ) version of the
86
+ [ ` 0.4.1 ` ] ( https://github.com/get-smooth /secp256r1-verify/releases/tag/v0.4.1 ) version of the
102
87
library. The library version corresponds to commit
103
- [ 4d0716f] ( https://github.com/0x90d2b2b7fb7599eebb6e7a32980857d8 /secp256r1-verify/commit/4d0716fc6fd14a92488442e1dd0c18bb2c24ff41 ) .
88
+ [ 4d0716f] ( https://github.com/get-smooth /secp256r1-verify/commit/4d0716fc6fd14a92488442e1dd0c18bb2c24ff41 ) .
104
89
105
90
> ℹ️ If you import the library into your project, we strongly recommend you to enable the optimizer with 100k in order
106
91
> to have the best gas consumption.
@@ -238,7 +223,7 @@ The tests use two different `cheatcodes` you should be aware of:
238
223
calculates 256 points on the secp256r1 elliptic curve from a public key. This is required for the variants that need
239
224
these points to be deployed on-chain. Therefore, even if it's not explicit, every time you run the test suite, a
240
225
Node.js script is executed multiple times. You can learn more about the library we use
241
- [ here] ( https://github.com/0x90d2b2b7fb7599eebb6e7a32980857d8 /secp256r1-computation ) .
226
+ [ here] ( https://github.com/get-smooth /secp256r1-computation ) .
242
227
243
228
> 📖 Cheatcodes are special instructions exposed by Foundry to enhance the developer experience. Learn more about them
244
229
> [ here] ( https://book.getfoundry.sh/cheatcodes/ ) .
@@ -261,32 +246,6 @@ make quality # run both
261
246
262
247
> ℹ️ By adding the sufix ` -fix ` the linter and the formatter will try to fix the issues automatically.
263
248
264
- ## Troubleshootings
265
-
266
- ### Setup Github registry
267
-
268
- You need to configure npm to use the Github registry. You can do so using the following command in your terminal:
269
-
270
- ``` sh
271
- npm config set @0x90d2b2b7fb7599eebb6e7a32980857d8:registry=https://npm.pkg.github.com
272
- ```
273
-
274
- This will instruct npm to use the Github registry for packages deployed by ` @0x90d2b2b7fb7599eebb6e7a32980857d8 ` .
275
-
276
- Once the Github registry is configured, you have to create a ** classic** token on Github. To do so, go to your
277
- [ Github settings] ( https://github.com/settings/tokens ) . The token must have the read: packages scope. Once you have
278
- created the token, use the following command in your terminal to authenticate to the Github registry:
279
-
280
- ``` sh
281
- npm login --auth-type=legacy --registry=https://npm.pkg.github.com
282
- ```
283
-
284
- Your Github username is the username, and the password is the token you just created. At this point, your git should be
285
- configured to use the Github Package Registry for our packages.
286
-
287
- > ⚠️ For more information, please refer to the
288
- > [ GitHub documentation] ( https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-npm-registry#installing-a-package )
289
-
290
249
## Acknowledgements
291
250
292
251
Special thanks to [ rdubois-crypto] ( https://github.com/rdubois-crypto ) for developing the reference implementation
0 commit comments