github.com/mavryk-network/mvgo@v1.19.9/examples/key/README.md (about)

     1  ## Create and use private keys in Tezos
     2  
     3  Use MvGo to generate and use private keys for joy and pleasure.
     4  
     5  ### Usage
     6  
     7  ```sh
     8  Usage: key <cmd> [args]
     9  
    10  Commands
    11    gen <type>                           generate a new key of type
    12                                           normal: edsk [mv1], spsk [mv2], p2sk [mv3]
    13                                           encrypted: edesk, spesk, p2esk
    14    info <key>                           prints info about `key`
    15    encrypt <key>                        encrypt private `key`
    16    sign <sk> <msg> [generic]            sign blake2b hash of message `msg` with key
    17                                           outputs typed signature by default
    18                                           use `generic` to create a generic signature
    19    sign-digest <sk> <digest> [generic]  sign blake2b digest with key
    20                                           outputs typed signature by default
    21                                           use `generic` to create a generic signature
    22    verify <pk> <sig> <msg>              verify signature `sig` using pubkey `pk` against blake2b hash of message `msg`
    23    -password string
    24        password for encrypted keys (may also use env TEZOS_KEY_PASSPHRASE)
    25    -v  be verbose
    26    ```
    27  
    28  ### Examples
    29  
    30  ```sh
    31  # create new private key
    32  go run . gen edsk
    33  
    34  # show address and pubkey
    35  go run . info edsk4KVDTs6J69y5EYELh1WRPBsuj5fRRJdRonyE2P5uaeEi7hqSNc
    36  
    37  # encyrpt the private key to pretoct ot
    38  go run . encrypt edsk4KVDTs6J69y5EYELh1WRPBsuj5fRRJdRonyE2P5uaeEi7hqSNc
    39  
    40  # sign a message (actually, this signs the blake2b hash of the message)
    41  go run . sign edsk4KVDTs6J69y5EYELh1WRPBsuj5fRRJdRonyE2P5uaeEi7hqSNc "Cool stuff"
    42  
    43  # verify a signature
    44  go run . verify edpkuHNzxQnjV5jNAKWBDjmb2fyEZH2KrsFywwBHELMKozTGU9RDEU edsigtjPe9hmQvYcn9P24zEHT4neheDQ39jCwAoKF4pLxqYyq9cVpkLBHUvivmEVdXKDYE2s1cqQd8YEpD2irG13W6d7LdeYbSs "Cool stuff"
    45  ```
    46