Git Product home page Git Product logo

ed25519-cli's Introduction

ed25519-cli

FOSSA Status

This tool can be used to sign, verify, generate a keypair with ed25519 (both sha2 and sha3).

1. build and install

  1. build ed25519

    git clone https://github.com/hyperledger/iroha-ed25519
    cd iroha-ed25519
    mkdir build
    cd build
    cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD=STATIC -DHASH=sha3_brainhub
    sudo make install

    Note: this will install libed25519 with SHA3. If you need sha2 variant, then change sha3_brainhub to sha2_openssl.

  2. build ed25519-cli

    git clone https://github.com/Warchant/ed25519-cli
    cd ed25519-cli
    git submodule update --init
    mkdir build
    cd build
    cmake .. -DCMAKE_BUILD_TYPE=Release
    sudo make install
    

    Binary ed25519-cli will be installed.

2. use

./ed25519-cli --help                                                                                                                        bogdan@Bogdans-MacBook-Pro
SYNOPSIS
        ./ed25519-cli help
        ./ed25519-cli sign -pub <public key> -priv <private key>
        ./ed25519-cli verify -pub <public key> -sig <signature>
        ./ed25519-cli keygen [-priv <private key>]

OPTIONS
        help        Get documentation
        sign        Sign SDTIN input

        -pub, --public-key <public key>
                    32 bytes hexencoded public key (64 bytes in hex)

        -priv, --private-key <private key>
                    32 bytes hexencoded private key (64 bytes in hex)

        verify      Verify STDIN input

        -pub, --public-key <public key>
                    32 bytes hexencoded public key (64 bytes in hex)

        -sig, --signature <signature>
                    64 bytes hexencoded signature (128 bytes in hex)

        keygen      Generate a keypair

example:

$ ed25519-cli keygen
public key : 10b4b0f158afb93e3fd6111b564ad4c4054ae9a142362d8d9e05a9f2d6444530
private key: 7aa064fb575c861d5af00febf08c1c31620d5a70094c4bcb11cb2720630ee98a

$ echo "1" | ed25519-cli sign -pub 10b4b0f158afb93e3fd6111b564ad4c4054ae9a142362d8d9e05a9f2d6444530 -priv 7aa064fb575c861d5af00febf08c1c31620d5a70094c4bcb11cb2720630ee98a
c538752e628c9ca43b3328f68afc76af40cf68732db00a8c9a885a6d41045b495ef44fb625a6742895d6819a63c254e352537998961a6802687140115811a409

$ echo "1" | ed25519-cli verify -pub 10b4b0f158afb93e3fd6111b564ad4c4054ae9a142362d8d9e05a9f2d6444530 -sig c538752e628c9ca43b3328f68afc76af40cf68732db00a8c9a885a6d41045b495ef44fb625a6742895d6819a63c254e352537998961a6802687140115811a409
true

$ echo "2" | ed25519-cli verify -pub 10b4b0f158afb93e3fd6111b564ad4c4054ae9a142362d8d9e05a9f2d6444530 -sig c538752e628c9ca43b3328f68afc76af40cf68732db00a8c9a885a6d41045b495ef44fb625a6742895d6819a63c254e352537998961a6802687140115811a409
false

License

FOSSA Status

ed25519-cli's People

Contributors

fossabot avatar sudomann avatar warchant avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

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.