Code Monkey home page Code Monkey logo

quorum's People

Contributors

gkelly avatar ragona avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

gkelly bcmyers

quorum's Issues

Additional metadata in container?

Is it worth adding additional metadata in the output container? With the current construction I think you can successfully mix and match shares from different quorums to accidentally produce novel 'secrets'. Even just putting a shared random 32bit value in the container as a quorum tag and checking at decrypt-time that they're all the same would prevent this.

I tested this locally and because you're using authenticated encryption you're not getting random spew on the output, but it's a fairly unsatisfying: Error: Failed to decrypt ciphertext: ring::error::Unspecified

let pem = Pem {

Ergonomics of ChaCha20-Poly1305

One thing that strikes me as potentially useful for a tool like this is the ability to encrypt a value to the quorum without having to assemble the quorum, which potentially increases the exposure of the key material. If you generated instead an ed25519 private key and Shamir split it and also output the public key then you could encrypt to the quorum without needing the key assembled.

I can also see the argument that needing quorum to create sealed values is a feature.

let key = match UnboundKey::new(&CHACHA20_POLY1305, secret) {

This is an unhelpful issue, it's just philosophizing around decision decisions you've already made. Sorry!

Nightly Clippy Issues

    Checking quorum v0.1.0 (/home/gkelly/p/quorum)
error: pub(crate) function inside private module
  --> src/encrypt.rs:12:1
   |
12 | pub(crate) fn encrypt(args: &Encrypt) -> Result<()> {
   | ----------^^^^^^^^^^^
   | |
   | help: consider using: `pub`
   |
note: the lint level is defined here
  --> src/main.rs:3:9
   |
3  | #![deny(clippy::nursery)]
   |         ^^^^^^^^^^^^^^^
   = note: `#[deny(clippy::redundant_pub_crate)]` implied by `#[deny(clippy::nursery)]`
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pub_crate

error: pub(crate) function inside private module
  --> src/encrypt.rs:34:1
   |
34 | pub(crate) fn decrypt(args: &Decrypt) -> Result<()> {
   | ----------^^^^^^^^^^^
   | |
   | help: consider using: `pub`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pub_crate

error: pub(crate) function inside private module
 --> src/quorum.rs:9:1
  |
9 | pub(crate) fn generate(args: &Generate) -> Result<()> {
  | ----------^^^^^^^^^^^^
  | |
  | help: consider using: `pub`
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pub_crate

error: pub(crate) function inside private module
  --> src/quorum.rs:36:1
   |
36 | pub(crate) fn recover_secret(share_paths: Vec<String>, threshold: u8) -> Result<[u8; 32]> {
   | ----------^^^^^^^^^^^^^^^^^^
   | |
   | help: consider using: `pub`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pub_crate

error: could not compile `quorum` due to 4 previous errors

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.