• This repository has been archived on 03/Jun/2020
  • Stars
    star
    140
  • Rank 253,122 (Top 6 %)
  • Language
    Rust
  • License
    Apache License 2.0
  • Created about 6 years ago
  • Updated almost 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Key Management service for Tendermint Validator nodes

🚨 DEPRECATED 🚨

This repo has been deprecated. Development work continues in iqlusioninc/tmkms. Please reference that repository in the future.


Tendermint KMS 🔐

Crate Build Status Apache 2.0 Licensed MSRV

Key Management System for Tendermint applications, initially targeting Cosmos Validators.

About

This repository contains tmkms, a key management service intended to be deployed in conjunction with Tendermint applications (ideally on separate physical hosts) which provides the following:

  • High-availability access to validator signing keys
  • Double-signing prevention even in the event the validator process is compromised
  • Hardware security module storage for validator keys which can survive host compromise

Status

Tendermint KMS is currently beta quality. It has undergone one security audit with only one low-severity finding.

Double Signing / High Availability

Tendermint KMS implements beta quality double signing detection. It has undergone some testing, however we do not (yet) recommend using the KMS in conjunction with multiple simultaneously active validators on the same network for prolonged periods of time.

In particular, there is presently no double signing defense in the case that multiple KMS instances are running simultaneously and connecting to multiple validators on the same network.

Signing Providers

You MUST select one or more signing provider(s) when compiling the KMS, passed as the argument to the --features flag (see below for more instructions on how to build Tendermint KMS).

The following signing backend providers are presently supported:

Hardware Security Modules (recommended)

Software-Only (not recommended)

Supported Platforms

tmkms should build on any supported Rust platform which is also supported by libusb, however there are some platforms which meet those criteria which are unsuitable for cryptography purposes due to lack of constant-time CPU instructions. Below are some of the available tier 1, 2, and 3 Rust platforms which meet our minimum criteria for KMS use.

NOTE: tmkms is presently tested on Linux/x86_64. We don't otherwise guarantee support for any of the platforms below, but they theoretically meet the necessary prerequisites for support.

Operating Systems

  • Linux (recommended)
  • FreeBSD
  • NetBSD
  • OpenBSD
  • macOS

CPU Architectures

  • x86_64 (recommended)
  • arm (32-bit ARM)
  • aarch64 (64-bit ARM)
  • riscv32 (32-bit RISC-V)
  • riscv64 (64-bit RISC-V)

Installation

You will need the following prerequisites:

  • Rust (stable; 1.40+): https://rustup.rs/
  • C compiler: e.g. gcc, clang
  • pkg-config
  • libusb (1.0+). Install instructions for common platforms:
    • Debian/Ubuntu: apt install libusb-1.0-0-dev
    • RedHat/CentOS: yum install libusb1-devel
    • macOS (Homebrew): brew install libusb

NOTE (x86_64 only): Configure RUSTFLAGS environment variable: export RUSTFLAGS=-Ctarget-feature=+aes,+ssse3

There are two ways to install tmkms: either compiling the source code after cloning it from git, or using Rust's cargo install command.

Compiling from source code (via git)

tmkms can be compiled directly from the git repository source code using the following method.

The following example adds --features=yubihsm to enable YubiHSM 2 support.

$ git clone https://github.com/iqlusioninc/tmkms.git && cd tmkms
[...]
$ cargo build --release --features=yubihsm

Alternatively, substitute --features=ledgertm to enable Ledger support.

If successful, this will produce a tmkms executable located at ./target/release/tmkms

Installing with the cargo install command

With Rust (1.40+) installed, you can install tmkms with the following:

cargo install tmkms --features=yubihsm

Or to install a specific version (recommended):

cargo install tmkms --features=yubihsm --version=0.4.0

Alternatively, substitute --features=ledgertm to enable Ledger support.

Usage

After compiling, start tmkms with the following:

$ tmkms start

This will read the configuration from the tmkms.toml file in the current working directory.

To explicitly specify the path to the configuration, use the -c flag:

$ tmkms start -c /path/to/tmkms.toml

Development

The following are instructions for setting up a development environment. They assume you've already followed steps 1 & 2 from the Installation section above.

  • Install rustfmt: rustup component add rustfmt
  • Install clippy: rustup component add clippy

Alternatively, you can build a Docker image from the Dockerfile in the top level of the repository, which is what is used to run tests in CI.

Before opening a pull request, please run the checks below:

Testing

Run the test suite with:

cargo test --all-features -- --test-threads 1

Format checking (rustfmt)

Make sure your code is well-formatted by running:

cargo fmt

Lint (clippy)

Lint your code (i.e. check it for common issues) with:

cargo clippy

License

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

More Repositories

1

tendermint

⟁ Tendermint Core (BFT Consensus) in Go
Go
5,643
star
2

go-amino

Protobuf3 with Interface support - Designed for blockchains (deterministic, upgradeable, fast, and compact)
Go
260
star
3

abci

DEPRECATED: Merged into https://github.com/tendermint/tendermint under `abci`
Go
254
star
4

signatory

Multi-provider digital signature library for Rust
Rust
141
star
5

liquidity

Cosmos SDK Liquidity module
Go
133
star
6

spec

TeX
132
star
7

go-p2p

DEPRECATED (moved to tendermint/tendermint): Golang P2P library
Go
120
star
8

rust-abci

A rust implementation of the ABCI protocol for tendermint core
Rust
117
star
9

spn

A blockchain to launch blockchains.
Go
112
star
10

awesome

Collection of resources for all things Tendermint
94
star
11

tm-db

Common database interface for various database backends for Tendermint Core and Cosmos SDK
Go
88
star
12

js-abci

Javascript ABCI libraries
JavaScript
86
star
13

yubihsm-rs

Pure Rust client for YubiHSM2 devices
70
star
14

dex-demo

DeX Demo
HTML
49
star
15

clearchain

Cosmos app for clearing and settlements
Go
47
star
16

merkleeyes

DEPRECATED: Merkle-ized data store
Go
46
star
17

go-crypto

DEPRECATED: Merged into https://github.com/tendermint/tendermint under `crypto`
Go
45
star
18

tmlibs

DEPRECATED: Merged into https://github.com/tendermint/tendermint under `libs`
Go
45
star
19

basecoin

DEPRECATED: see https://github.com/cosmos/cosmos-sdk
Go
44
star
20

cns

Chain Name System
Go
38
star
21

tools

DEPRECATED: Merged into https://github.com/tendermint/tendermint under `tools`
Go
38
star
22

atom_one

ATOM ONE CONSTITUTION
28
star
23

sig

A signing library for Cosmos.
TypeScript
27
star
24

faucet

A faucet for cosmos-sdk apps that uses the app binary only
Go
27
star
25

amino_rs

Rust implementation of Amino
Rust
26
star
26

tendermint2

Tendermint2
Go
26
star
27

cosmos-rosetta-gateway

Rosetta Libraries for Cosmos SDK apps
Go
24
star
28

flutter

Dart
23
star
29

fundraising

Go
22
star
30

budget

Budget is a Cosmos SDK module that implements budget functionality.
Go
20
star
31

farming

Farming is a Cosmos SDK module that implements farming functionality
Go
19
star
32

cosmos-ui

UI component library
Vue
18
star
33

testnets

Config files for connecting to testnets
Python
17
star
34

governmint

DEPRECATED: TMSP Governance App
Go
17
star
35

light-client

DEPRECATED: A light client for tendermint, supporting signatures, proofs, and validation (see github.com/tendermint/tendermint/lite)
Go
17
star
36

coding

Shell
15
star
37

interchange

Interchain Exchange Module
TypeScript
14
star
38

basecoin-examples

DEPRECATED: Example code, showing how you can build your own cryptocurrency on top of basecoin
Go
10
star
39

ecosystem

Tendermint forks geneology and directory
10
star
40

nomnomcoin

DEPRECATED: A TMSP cryptocurrency in NodeJS
JavaScript
9
star
41

classic

canonical blockchain infrastructure
Go
8
star
42

dither

Decentralized messaging for all Cosmos blockchains
7
star
43

alpha

Tiny web app to help you form a genesis file
Go
6
star
44

networks

Deploying and testing Tendermint networks
Go
6
star
45

network_testing

DEPRECATED: Benchmarking tendermint networks
Shell
6
star
46

ledger-validator-app

C
5
star
47

fault-tolerance-demo

DEPRECATED: A demo of tendermint's fault tolerance
Shell
4
star
48

homebrew-tendermint

Homebrew Tap for Tendermint, Ethermint, Basecoin and all related projects.
Ruby
4
star
49

images

Shell
4
star
50

docs

Docs deployment
3
star
51

spm

Go
3
star
52

devdoc

Docker environment for development
Makefile
3
star
53

backend

Backend stuff for design
JavaScript
3
star
54

go-amino-x

Go
3
star
55

mintkey

DEPRECATED: Tendermint key management
Go
2
star
56

go-process

DEPRECATED (moved to tendermint/tmlibs): Process libraries for Golang
Go
2
star
57

identity

Identity and authentication for the blockchain. Public domain work.
2
star
58

js-merkleeyes

DEPRECATED: Javascript library for MerkleEyes
JavaScript
1
star
59

js-wire

Javascript library for go-wire codec
JavaScript
1
star
60

go-alert

DEPRECATED (moved to tendermint/tmlibs)
Go
1
star
61

lunie-ng

Lunie Next Generation
Vue
1
star
62

spm-extras

Additional packages that we can not keep under tendermint/spm because of incompatibilities.
Go
1
star
63

fuzz

Go
1
star
64

homebrew-tap

Homebrew tap for Cosmos
Ruby
1
star
65

go-keys

DEPRECATED (moved to tendermint/go-crypto and tendermint/basecoin): Key manager for tendermint clients
Go
1
star