Git Product home page Git Product logo

pqpg's Introduction

PQPG: POST QUANTUM PRIVACY GUARD

a little GnuPG-like command line tool for post-quantum cryptography

License: GNU GPLv3 or later

Requirements:
  * rust-nightly (because of dependencies)
  * a lot of rust libraries (see Cargo.toml)

Compile/install:
  git clone https://github.com/txp0wer/pqpg
  cd pqpg
  cargo run --release [--features x86simd] <subcommand> [args]
  cargo install [--features x86simd] # if you decide you like it
  # "--features x86simd" may increase performance, but requires an x86 CPU

Usage:
  pqpg keygen <name>
    generates a key and asks for a passphrase
    returns the fingerprint of your key
  pqpg import <public_key_file> <name> [address],
      adds a public key file to your database
  pqpg export <name_or_fingerprint> [public_key_file]
    extracts a public key from your database and writes it to stdout or a specified file
  pqpg encrypt <name_or_fingerprint> <input_file> <output_file>
  pqpg decrypt <input_file> <output_file>
    asks for the passphrase, fails if the private key is missing
  pqpg chpass <name_or_fingerprint>
    changes the passphrase
  pqpg list [name_or_fingerprint]
    list all or search known keys
  pqpg test
    runs some self-tests

Crypto: only encryption so far
  * Public-Key encryption: "new hope" (Ring-LWE; 14592 bits; through sarkara library; see module SealedBox)
  * symmetric encryption: SCrypt (through rust-crypto; to protect the private key files)
  * Hash: Blake2b (sarkara; for the PK fingerprints)

To do:
  * implement an address book (name->fingerprint) (WIP)
  * implement an optional "ASCII armor"
  * implement the usual key management features (delete keys, rename keys)
  * refactor the builtin help function
  * migrate key material to the database

Known bugs:
  * file size is limited by available RAM (blame sarkara::SealedBox for that)

WARNING:
  * this tool is not yet production ready, so don't trust it with any sensitive/important data
  * I assume that the algorithms are really secure against quantum computers
    and that their implementations have neither significant flaws nor backdoors
  * the file formats may change in the future

pqpg's People

Contributors

txp0wer avatar

Stargazers

ひるき avatar  avatar  avatar Aesistril avatar ДНК avatar Lachlan Mitchell avatar  avatar Ken Nickerson avatar

Watchers

Dario More Escamez avatar  avatar

Forkers

dmore

pqpg's Issues

Alternative to Codecrypt

This is a wonderful project. I hope this doesn't become vapourware or that you don't abandon it. Keep up the good work. This is the second tool I have found after Codecrypt which uses QC-MDPC McEliece,Your's is something "different". However I would be glad if you implement the ASCII armour and Address Book feature soon. Ciao.

Compile errors

I'm attempting to get pqpg running but get the following errors:

user@ubuntu:~/rust/pqpg-master$ cargo run --release
Compiling rust-crypto v0.2.36
Compiling libgcrypt-sys v0.4.0
Compiling newhope v0.1.6
Compiling blissb v0.1.0
Compiling seckey v0.2.6
Compiling rusqlite v0.7.4
error: use of unstable library feature 'iterator_step_by': unstable replacement of Range::step_by (see issue #27741)
--> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/newhope-0.1.6/src/ntt.rs:100:22
|
100 | for i in (0..10).step_by(2) {
| ^^^^^^^
|
= help: add #![feature(iterator_step_by)] to the crate attributes to enable

error: use of unstable library feature 'iterator_step_by': unstable replacement of Range::step_by (see issue #27741)
--> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/newhope-0.1.6/src/ntt.rs:103:45
|
103 | for (jt, j) in (start..(N - 1)).step_by(2 * distance).enumerate() {
| ^^^^^^^
|
= help: add #![feature(iterator_step_by)] to the crate attributes to enable

error: use of unstable library feature 'iterator_step_by': unstable replacement of Range::step_by (see issue #27741)
--> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/blissb-0.1.0/src/utils.rs:61:26
|
61 | for i in (0..64).step_by(2) {
| ^^^^^^^
|
= help: add #![feature(iterator_step_by)] to the crate attributes to enable

error: use of unstable library feature 'iterator_step_by': unstable replacement of Range::step_by (see issue #27741)
--> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/newhope-0.1.6/src/ntt.rs:115:45
|
115 | for (jt, j) in (start..(N - 1)).step_by(2 * distance).enumerate() {
| ^^^^^^^
|
= help: add #![feature(iterator_step_by)] to the crate attributes to enable

error: use of unstable library feature 'iterator_step_by': unstable replacement of Range::step_by (see issue #27741)
--> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/blissb-0.1.0/src/ntt.rs:43:25
|
43 | for k in (0..N).step_by(i + i) {
| ^^^^^^^
|
= help: add #![feature(iterator_step_by)] to the crate attributes to enable

error: use of unstable library feature 'iterator_step_by': unstable replacement of Range::step_by (see issue #27741)
--> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/blissb-0.1.0/src/ntt.rs:51:29
|
51 | for k in (j..N).step_by(i + i) {
| ^^^^^^^
|
= help: add #![feature(iterator_step_by)] to the crate attributes to enable

error: use of unstable library feature 'iterator_step_by': unstable replacement of Range::step_by (see issue #27741)
--> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/newhope-0.1.6/src/newhope.rs:53:21
|
53 | for i in (0..N).step_by(4) {
| ^^^^^^^
|
= help: add #![feature(iterator_step_by)] to the crate attributes to enable

error: aborting due to 4 previous errors

error: Could not compile newhope.
warning: build failed, waiting for other jobs to finish...
error: aborting due to 3 previous errors

error: Could not compile blissb.
warning: build failed, waiting for other jobs to finish...
error: build failed

This seems to be related to this rust issue: rust-lang/rust#27741

Any help would be appreciated. Thanks.

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.