Git Product home page Git Product logo

keysmith's Introduction

Migrate to quill

To provide a unified user experience, we recommand quill which provide more comprehensive support for ledger and governance on the Internet Computer.

We will not add new features to keysmith or release new versions.

Please refer to this migration guide to get the quill equivalents of keysmith commands.

Note that some sophasicated functionalities are not available in quill yet. If your workflow relies on those keysmith commands, you can keep using it.

Keysmith

Hierarchical Deterministic Key Derivation for the Internet Computer

Build Status

Disclaimer

YOU EXPRESSLY ACKNOWLEDGE AND AGREE THAT USE OF THIS SOFTWARE IS AT YOUR SOLE RISK. AUTHORS OF THIS SOFTWARE SHALL NOT BE LIABLE FOR DAMAGES OF ANY TYPE, WHETHER DIRECT OR INDIRECT.

Introduction

Keysmith lets you derive cryptographic keys and identifiers for the Internet Computer. Among these identifiers includes an account identifier, which indicates the source or destination of an ICP token transfer. Keysmith does not sign or send messages to the Internet Computer. Hence, Keysmith does not facilitate ICP token transfer, but rather only ICP token custody. For use cases other than custody, such as payments, consider using Keysmith in conjunction with other software, such as the DFINITY Canister SDK.

Download

Download the latest tarball here.

Verify

If you want to verify the authenticity of the tarball, then please also download the supplementary SHA256.SIG and SHA256.SUM files, as well as my public key, which you can find here.

Verify the SHA256 checksum of the tarball.

grep "$(openssl dgst -sha256 keysmith-*.tar.gz)" SHA256.SUM

Verify the signature on the tarball.

openssl dgst -sha256 -verify public.key -signature SHA256.SIG SHA256.SUM

The command above should display the following output.

Verified OK

Install

Extract the executable from the tarball.

tar -f keysmith-*.tar.gz -x 

Add the executable to your PATH.

sudo install -d /usr/local/bin
sudo install keysmith /usr/local/bin

Usage

Below is list of commands and their behavior.

  • account prints your account identifier.
  • generate generates your mnemonic seed and writes it to a file.
  • legacy-address prints your legacy address.
  • principal prints your principal identifier.
  • private-key derives your private key and writes it to a file.
  • public-key prints your public key.
  • shortlist prints the available commands.
  • version prints the version number.
  • x-private-key derives your extended private key and writes it to a file.
  • x-public-key prints your extended public key.

Integration with the DFINITY Canister SDK

The DFINITY Canister SDK can sign and send messages to the Internet Computer. Versions 0.7.0-beta.6 and greater provide a convenient ledger command that facilitates ICP token transfer. Consider the workflow below.

# Generate your mnemonic seed.
keysmith generate
# Derive your private key.
keysmith private-key
# Create an empty project.
echo {} > dfx.json
# Import your private key.
dfx identity import alternate identity.pem
# Use your private key to sign messages.
dfx identity use alternate
# Print your account identifier.
dfx ledger account-id
# Check your balance.
dfx ledger --network=https://ic0.app balance
# Send me some tokens.
dfx ledger --network=https://ic0.app transfer \
    --amount=1.23456789 \
    --memo=0 \
    --to=89e99f79ec4d81f77a6c8cb243e536e7b3244d7294fb803bcd77b3dd4e32ae36

keysmith's People

Contributors

enzoh avatar lwshang avatar nithalak avatar roman-kashitsyn 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

keysmith's Issues

Issues installing on MacOS

Issue

Was recently following this wiki installing both quill and keysmith to create an NNS Proposal and wasn't able to get keysmith installed (but Quill works fine).

My Setup

MacBook Pro 2019 - 2.3 GHz 8-Core Intel Core i9
macOS Monterey - Version 12.2.1

Steps taken (keysmith-darwin-arm64.tar.gz)

  1. Download keysmith-darwin-arm64.tar.gz from releases.
  2. Follow the installation instructions in the README.
  3. Attempt to invoke keysmith with % keysmith
  4. Result: zsh: bad CPU type in executable: keysmith

After the darwin-arm64 seemed to not be compatible, I tried the linux-arm64 executable just to make sure, but of course no cigar there.

Question

I see that quill has a specific mac-os release but keysmith does not. Does this mean that MacOS users should use any capable tool to generate a SHA256 key pair and pass the public key to quill, or should we specifically use keysmith?

Confusing error when building with older Golang

Trying to build with an older Golang results in a weird error

build github.com/dfinity/keysmith: cannot load io/fs: malformed module path "io/fs": missing dot in first path element

Having a note of this in the readme would have saved some Googling (since apparently Golang 1.13, at least, ignores the go 1.16 in go.mod)

Build arm32 binaries

In #11 I made an attempt to build for Raspberry 2/3 (which are 32 bit). Turns out env GOOS=linux GOARCH=arm go build creates the right binary. This has the advantage that it runs on the original raspi too.

So adding a step to build for 32-bit ARM should be a matter of a few lines.

All the Pi owners are anxiously awaiting keysmith-linux-arm32.tar.gz!

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.