https://github.com/jazzdotdev/file-witness
The Jazz Code Signing App
https://github.com/jazzdotdev/file-witness
curve25519 curve25519xsalsa20poly1305 file-signature jazz
Last synced: 11 months ago
JSON representation
The Jazz Code Signing App
- Host: GitHub
- URL: https://github.com/jazzdotdev/file-witness
- Owner: jazzdotdev
- Created: 2018-11-19T16:32:36.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2021-12-05T20:39:00.000Z (about 4 years ago)
- Last Synced: 2025-02-01T19:30:21.345Z (about 1 year ago)
- Topics: curve25519, curve25519xsalsa20poly1305, file-signature, jazz
- Language: Lua
- Homepage:
- Size: 17.6 KB
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 8
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README

## Generate detached signature
### Generating private key
To generate a shared key-pair we have to call `torchbear`'s `crypto.sign.new_keypair()` function. To do so, create a file named `init.lua` and add this:
```[lua]
local sign_priv, sign_pub = crypto.sign.new_keypair()
local file = io.open("private_key", "w")
local file2 = io.open("public_key", "w")
file:write(tostring(sign_priv), "\n")
file2:write(tostring(sign_pub), "\n")
```
## Creating the signature file from binary file
To create a signature file, we have to first set some environment variables, here's the list:
```
PROJECT = name of project
TRAVIS_TAG = release tag
ARCH = architecture
PLATFORM = x86/arm/...
CHANNEL = stable/beta
```
After setting them, we will have to run `torchbear` binary in the directory where we have `private_key` and [init.lua](https://github.com/foundpatterns/file-witness/blob/master/init.lua).
This should create the `.sig` file with following name format: `${PROJECT}-${TRAVIS_TAG}-${ARCH}-${PLATFORM}-${CHANNEL}.sig`
## Credits
Icon made by [Freepik](https://www.freepik.com/) and published by [Flaticon](https://www.flaticon.com/)