GithubHelp home page GithubHelp logo

zig-minisign's Introduction

zig-minisign

A Zig implementation of Minisign.

minizign was primarily designed to verify signatures, although signing is likely to be implemented next.

Compilation

Requires the current master version of Zig.

Compile with:

zig build -Doptimize=ReleaseSmall

for a size-optimized version, or

zig build -Doptimize=ReleaseFast

for a speed-optimized version.

Usage

Usage:
    -h, --help                  Display this help and exit
    -p, --publickey-path <PATH> Public key path to a file
    -P, --publickey <STRING>    Public key, as a BASE64-encoded string
    -l, --legacy                Accept legacy signatures
    -m, --input <PATH>          Input file
    -q, --quiet                 Quiet mode
    -V, --verify                Verify
    -C, --convert               Convert the given public key to SSH format

Example

Verify public-resolvers.md using public-resolvers.md.minisig and the public key file minisig.pub:

minizign -p minisign.pub -Vm public-resolvers.md

Verify public-resolvers.md by directly providing the public key on the command-line:

minizign -P RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3 -Vm public-resolvers.md

SSH-encoded public keys

minizign can encode public keys in SSH format, so that they can be uploaded to GitHub:

minizign -p minisign.pub -C
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHmlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3 minisign key E7620F1842B4E81F

GitHub makes public SSH keys available at https://github.com/<username>.keys.

SSH-encoded keys can be loaded by minizign the same way as native keys, with -p <key file>. They will be automatically recognized as such.

Features

minizign supports prehashing (which can be forced if you know this is how the signature was created), has zero dependencies and can be cross-compiled to anything that Zig can cross-compile to, including WebAssembly.

zig-minisign's People

Contributors

desttinghim avatar jedisct1 avatar mckael avatar tarruda avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

zig-minisign's Issues

Build failed on zig master

Hi!

zig-minisign build fails on zig master:

$ zig build -Drelease-safe -freference-trace
/home/me/.local/zig-linux-x86_64-0.11.0-dev.148+df7223c7f/lib/std/crypto/25519/ed25519.zig:488:24: error: deprecated; use PublicKey.verify instead
    pub const verify = @compileError("deprecated; use PublicKey.verify instead");
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
referenced by:
    verify: /home/me/p/infra/zig-minisign/src/main.zig:171:24
    verify: /home/me/p/infra/zig-minisign/src/main.zig:191:19
    doit: /home/me/p/infra/zig-minisign/src/main.zig:279:9
    main: /home/me/p/infra/zig-minisign/src/main.zig:294:9

Related to Revamp the ed25519 API in zig std/crypto.

License?

Hi! There doesn't seem to be a license in this repository, it would be nice to have one!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.