threshold_crypto/examples
Weiliang Li 036b720b7f Clean up and add parity codec support (#91)
* clean Cargo.toml and add parity codec support

* upgrade parity codec

* fix travis

* make clippy happy

* use zeroize instead of memsec

* fix zeroize and add test

* Update .travis.yml

* improve codec support

* fix

* add TODO for removing clear_fr
2019-11-08 10:53:40 +01:00
..
README.md Minor README modifications, added environment variables section 2018-08-29 10:35:12 -06:00
basic_pkc.rs using serde derive feature instead of separate crate 2019-04-01 18:45:13 +02:00
threshold_enc.rs Clean up and add parity codec support (#91) 2019-11-08 10:53:40 +01:00
threshold_sig.rs Clean up and add parity codec support (#91) 2019-11-08 10:53:40 +01:00

README.md

Examples

Run examples using:

$ MLOCK_SECRETS=false cargo run --example <example name>
  • Public-Key Cryptography - Demonstrates how to generate a random secret-key and corresponding public-key, sign some bytes using a secret-key, validate the signature for some bytes using a public-key, encrypt some bytes using a public-key, and how to decrypt a ciphertext using a secret-key.

  • Threshold Encryption - Demonstrates how to encrypt a message to a group of actors with a master public-key, where the number of actors collaborating in the decryption process must exceed a given threshold number before the ciphertext can be successfully decrypted. This example also demonstrates the idea of a "trusted dealer", i.e. some trusted entity that is responsible for generating the keys.

  • Threshold Signing - Demonstrates how threshold signing can be used to generate an append-only ledger of chat messages. Each node running our chat protocol receives and signs messages (using its share of the network's master secret-key). The network adds a new message to the ledger once enough nodes (threshold + 1) have signed a given message.