mirror of
https://github.com/arnaucube/blindsecp256k1-js.git
synced 2026-02-07 11:26:40 +01:00
Add GHA, package to v0.0.2
This commit is contained in:
23
.github/workflows/test.yml
vendored
Normal file
23
.github/workflows/test.yml
vendored
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
name: Test
|
||||||
|
|
||||||
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
node-tests:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Use Node.js ${{ matrix.node-version }}
|
||||||
|
uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: 10.x
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
npm install
|
||||||
|
npm run build
|
||||||
|
- name: Run tests
|
||||||
|
run: npm run test
|
||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,3 +1,2 @@
|
|||||||
node_modules
|
node_modules
|
||||||
blindsecp256k1-browser.js
|
|
||||||
dist
|
dist
|
||||||
|
|||||||
@@ -1,10 +1,7 @@
|
|||||||
# blindsecp256k1-js [](https://img.shields.io/npm/v/blindsecp256k1)
|
# blindsecp256k1-js [](https://img.shields.io/npm/v/blindsecp256k1) [](https://github.com/arnaucube/blindsecp256k1-js/actions?query=workflow%3ATest)
|
||||||
|
|
||||||
Javascript implementation compatible with https://github.com/arnaucube/go-blindsecp256k1
|
Javascript implementation compatible with https://github.com/arnaucube/go-blindsecp256k1
|
||||||
|
|
||||||
Blind signature over [secp256k1](https://en.bitcoin.it/wiki/Secp256k1), based on *"[New Blind Signature Schemes Based on the (Elliptic Curve) Discrete Logarithm Problem](https://sci-hub.do/10.1109/ICCKE.2013.6682844)"* paper by Hamid Mala & Nafiseh Nezhadansari.
|
Blind signature over [secp256k1](https://en.bitcoin.it/wiki/Secp256k1), based on *"[New Blind Signature Schemes Based on the (Elliptic Curve) Discrete Logarithm Problem](https://sci-hub.do/10.1109/ICCKE.2013.6682844)"* paper by Hamid Mala & Nafiseh Nezhadansari.
|
||||||
|
|
||||||
**WARNING**: this repo is experimental, do not use in production.
|
**WARNING**: this repo is experimental, do not use in production.
|
||||||
|
|
||||||
## Build for browser
|
|
||||||
By running `npm run browserify`, and the file `blindsecp256k1-browser.js` will be generated, which can be imported in the html and used as `blindsecp256k1`.
|
|
||||||
|
|||||||
1754
package-lock.json
generated
1754
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "blindsecp256k1",
|
"name": "blindsecp256k1",
|
||||||
"version": "0.0.1",
|
"version": "0.0.2",
|
||||||
"description": "Blind signatures over secp256k1, compatible with https://github.com/arnaucube/go-blindsecp256k1",
|
"description": "Blind signatures over secp256k1, compatible with https://github.com/arnaucube/go-blindsecp256k1",
|
||||||
"main": "dist/index",
|
"main": "dist/index",
|
||||||
"types": "dist/index",
|
"types": "dist/index",
|
||||||
|
|||||||
@@ -75,7 +75,6 @@ export function blind(m: BigNumber, signerR: Point): { mBlinded: BigNumber, user
|
|||||||
const ainv = u.a.invm(n)
|
const ainv = u.a.invm(n)
|
||||||
const ainvrx = ainv.mul(rx)
|
const ainvrx = ainv.mul(rx)
|
||||||
|
|
||||||
// const mHex = m.toString(16)
|
|
||||||
const hHex = hashBigNumber(m)
|
const hHex = hashBigNumber(m)
|
||||||
|
|
||||||
const h = new BigNumber(Buffer.from(hHex, "hex"))
|
const h = new BigNumber(Buffer.from(hHex, "hex"))
|
||||||
|
|||||||
Reference in New Issue
Block a user