Contains executables, created with Nexe, for generating a keypair, signing a message, and verifying a message.
This repo relies entirely on Paul Miller's @noble/secp256k1 and @noble/hashes libraries.
You don't need to use the executables at all, you can interact with the source code directly.
node create.js
Remove the 0x
prefix from hex strings before calling the function.
node sign.js
The public key, pubKey
, can be compressed or uncompressed. When inputting a hex string, remove the 0x
prefix before calling the function.
node verify.js
- Platform: Windows
- Arch: x64
- Node: v16.17.1
There are scripts
inside the package.json
for both Powershell and Bash.
Powershell:
Get-FileHash -Algorithm SHA256 <FILE_PATH>
Bash:
shasum -a256 <FILE_PATH>
Package.json:
"scripts": {
"create": "node create.js",
"sign": "node sign.js",
"verify": "node verify.js",
"build-create": "nexe create.js -o _create.exe --build --target windows-x64-16.17.1",
"build-sign": "nexe sign.js -o _sign.exe --build --target windows-x64-16.17.1",
"build-verify": "nexe verify.js -o _verify.exe --build --target windows-x64-16.17.1",
"hash-shell-create": "powershell -Command \"get-FileHash _create.exe\"",
"hash-shell-sign": "powershell -Command \"get-FileHash _sign.exe\"",
"hash-shell-verify": "powershell -Command \"get-FileHash _verify.exe\"",
"hash-bash-create": "bash -c \"shasum -a 256 _create.exe\"",
"hash-bash-sign": "bash -c \"shasum -a 256 _sign.exe\"",
"hash-bash-verify": "bash -c \"shasum -a 256 _verify.exe\""
}
Create.exe
4512a3362ad6f1ecfa9d9b45c47f228af40b7913b20cd69951bc4d01bad8beee
Sign.exe
a1c9a30819671974b03300cf9479a04499664661f857a2977fe9804451a88e6c
Verify.exe
f9de2672e75ed022516556efeccef46675d601491718308ae9886884c366f421
The steps I took to build the executables are listed below.
Install nexe globally (I used version 4.0.0-rc.6
):
npm i -g nexe
Create.js:
nexe create.js -o _create.exe --build --target windows-x64-16.17.1
Sign.js:
nexe sign.js -o _sign.exe --build --target windows-x64-16.17.1
Verify.js:
nexe verify.js -o _verify.exe --build --target windows-x64-16.17.1
Images of what will be displayed in the terminal after running the scripts/executables.