• This repository has been archived on 21/May/2019
  • Stars
    star
    173
  • Rank 220,124 (Top 5 %)
  • Language
    Go
  • Created about 9 years ago
  • Updated over 8 years ago

Reviews

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

Repository Details

The minilock file encryption system, ported to pure Golang. Includes CLI utilities.

Go-miniLock

A pure-Go reimplementation of the miniLock asymmetric encryption system.

by Cathal Garvey, Copyright Oct. 2015, proudly licensed under the GNU AGPL.

Support via Gratipay

Or, Tip me a few bits? - 32ddsuR73CHH8igCNCLvRE3UwBqL8yU2ag

What

TL;DR: go-miniLock is a total Golang rewrite of miniLock, enabling native code performance, more platform flexibility, and downstream potential for automation and novel communication media not available to the original miniLock Chromium app.

See miniLock.io for information on miniLock. It's a file encryption system designed by Nadim Kobaissi and reviewed for security and soundness by experts. It's pretty well-put together, but as if that weren't enough it was released as an easy-to-use, user-focused Chrome App. In many respects it achieves what PGP was supposed to achieve, while dodging all the nastiness of PGP: Minilock gives:

  • Tiny identities: At ~40 characters, miniLock ID keys can be shared trivially through any medium.
  • Authenticated, Private communication between people without requiring a third-party
  • Easy verification of respective key:identity matchings.
  • Minimised metadata within the encrypted files; only recipients can see the identity of the sender and themselves, they cannot identify other valid recipients, and outsiders cannot determine, given a miniLock file, who sent it or who was the recipient.
  • No persistent keys: miniLock is designed to use deterministic keys that are generated from the user's memorable, highly secure passphrase and their email address (or a fake one..)
  • Transport agnostic: miniLock just encrypts files, it doesn't insist on a particular way of transmitting them.

The big disadvantage of miniLock has been how tied it is to Chrome; this limits platforms to laptops and desktops only, to GUI-enabled systems only, and makes integrating miniLock into other systems impossible. If you wanted to create a logging application that sends encrypted reports to your email daily using miniLock, forget it. If you wanted to build a P2P social network using miniLock for authentication and privacy, forget it.

See deadLock for my past efforts towards creating a shell-scriptable version of miniLock, but Python isn't much better than a Chrome app, due to version wars (thanks, fossilised 2.X users..), lack of pre-installation on Windows, and difficulty of C-extension compilation on WinMac. Oh, and the bug-prone-ness of Python in general!

Golang, as a language, addresses all the needs I forsee for a more versatile miniLock: it compiles to any platform extremely quickly, it has growing support for building native mobile apps, it can transpile to JS, it's fast, and it offers useful tools and concurrency primitives that facilitate the underlying, highly paralleliseable activity of miniLock. And, for a developer, it's very good at catching common bugs at compile-time; forgotten or renamed variables, typing errors, mismatched return types, etcetera.

So here's go-minilock; it sets out to be both an easy-to-use alternative to PGP, a native answer to the miniLock browser extension, and a library for easily constructing tools that go beyond manual human-to-human cryptography and extend into the automated, networked, or decentralised sphere.

Usage

Documentation for the library can be found at godoc. Functionality is deliberately broken into construction of the encrypted data itself and constructing the headers that assist in decryption and obfuscation of communicating parties; this is to enable use of the library for more than just miniLock-of-files, but also because other systems built atop miniLock (such as Peerio) use detached, updateable headers as a way to facilitate social file-sharing.

Much of the slightly-lower-level crypto stuff is in a sub-package called "taber", which can be imported separately with import "github.com/cathalgarvey/go-minilock/taber", and documentation for which is here on Godoc.

For terminal usage of go-miniLock, you can install the tool with: go get -u github.com/cathalgarvey/go-minilock/minilock-cli. Usage is simple enough and needs improvement:

minilock-cli encrypt <file> <your email> <recipient1> [<recipient2>...]
minilock-cli decrypt <file> <your email>

A number of flags modify usual behaviour. The most important is probably the "-p" flag which allows the passphrase for the user's key to be provided directly instead of being requested interactively; this allows shell-scripting using minilock-cli, or simply aliasing to create a rapid way of encrypting or decrypting things using your key. Beware, obviously, that for personal uses this breaks one of the security features of minilock, namely that personal keys are not stored but remembered! This feature, therefore, was more intended for server-side or scripting uses than for individuals.

A UI would be really nice but isn't yet on the cards. Watch this space. Meanwhile, use miniLock.

Where from Here

Here are things I'd really enjoy, if you're feeling creative. I may start on some of these, also..

  • Python bindings to go-miniLock, to enable a drastic refactor of deadlock. Current Go:Python binding solutions I've seen have involved some very ugly C shimming, but I suspect using FFI or Ctypes might work since Go 1.5 introduced C-ABI library compilation?
  • Integration of go-miniLock with desktop mail clients.
  • Transpiling usefully to JS using GopherJS, with a comparable library interface.
  • An Android client using the new Go:Android Bindings introduced in Go 1.5. Integration of said Android client into K9 Mail.
  • A self-hostable, federating Peerio server that respects your fundamental rights.
    • Bonus: Federates with other such servers in a robust way.
    • Bonus: Generates chaff traffic.
    • Bonus: Offers option to delete correspondance in same way as shared files.
    • Bonus: Talks to email servers, receives email and stores/delivers miniLock..and vice-versa.
  • A total rewrite of Peerio Client that doesn't require Chromium, could run headlessly.
    • Bonus: IMAP/SMTP adaptor 'client' for mail client alternative.
    • Bonus: IRC/XMPP adaptor 'client' for chat client alternatives.
    • Bonus: "Sync Folder Contents" option for dropbox-style crypto-extension to Peerio.

Credits Reel

More Repositories

1

sqrape

Simple Query Scraping with CSS and Go Reflection (MOVED to Gitlab)
Go
139
star
2

deadlock

Python implementation of minilock.io, an encryption utility for sharing files privately. (MOVED to Gitlab)
Python
60
star
3

go-termux

Termux-API layer ported to a Go library; write pseudo-apps for Android in pure Go with Termux/API/Widget!
Go
44
star
4

fmtless

A toolkit for replacing fmt's output funcs, plus fmt-free stdlib replacements (MOVED to Gitlab)
Go
39
star
5

tinystatus

A peer to peer microstatus system written in 30 lines of pure python. (MOVED to Gitlab)
Python
29
star
6

biohacking-protocols

Easy, explicit DIYbio protocols
25
star
7

OpenPyCR

Python controller for OpenPCR. (MOVED to Gitlab)
Python
24
star
8

listless

A monolithic, lua-scripted discussion list engine over IMAP/SMTP (MOVED to Gitlab)
Go
23
star
9

whatlang-py

Simple bindings to the whatlang Rust package
Rust
14
star
10

lamport_signatures

A novice's implementation of the Quantum-Computer-Resistant Lamport Signature scheme.
Python
12
star
11

PySplicer

Evidence-based Gene Optimisation (MOVED to Gitlab)
Python
10
star
12

pyqgrams

PQ-Grams in Python, with the heavy lifting in Rust (still WIP)
Python
9
star
13

formadoor

A TOTP-based, PiFace powered door lock for Cork's Forma Labs makerspace.
Go
9
star
14

rssfilter

Fetch, filter, and re-render RSS feeds for more useful consumption.
Python
7
star
15

jltool

Tools for working with JSON-Lines data, including diff, dedupe, grep and cleanup
Python
6
star
16

dremelfuge

A one-piece, 3D printable centrifuge rotor for lean biotechs or deprived medics. (MOVED to Gitlab)
6
star
17

DIYbio-IE-SOPs

Class 1 GMM Standard Operating Procedures
6
star
18

KettleKontroller

Arduino Water Bath for DIYbio
5
star
19

pqgrams

The PQ-Gram algorithm for approximating tree edit distance, in Rust, with generic interfaces.
Rust
5
star
20

dna2way

A bi-directional hash function for nucleotide sequences. Generates same output for forward or reverse complement.
Go
4
star
21

DNAmespace

A Python module for presenting bacterial genomes (from NCBI/Genbank files) as namespaces in Python.
Python
4
star
22

python-letschat

A Python API for the Lets-Chat group chat server (https://github.com/sdelements/lets-chat)
Python
4
star
23

fastac

Fasta Compiler: a simple, extensible bash-style scripting language for synthetic biology. (MOVED to Gitlab)
Python
4
star
24

req2vec

Data collection and SKLearn pipeline transformers for Scrapy projects
Python
3
star
25

dncode

A rapid 4x compression encoding tool for DNA (MOVED to Gitlab)
Python
3
star
26

gzlines

A small Go helper-library for iterating lines from one or more Gzipped files
Go
2
star
27

androidam

A Go wrapper for the Android 'am' shell command
Go
2
star
28

ultralite

A tiny, inline-able http module mimicing requests' core API (MOVED to Gitlab)
Python
1
star
29

blackburn-mod

My tracker-free modification of the Blackburn theme for Hugo
CSS
1
star
30

comparator

An Interface and Minhash-based Implementation for Estimating Document Similarity
Go
1
star
31

GMM-Logger

A set of log templates, and a pair of handy scripts, for managing logs for a GMO/GMM containment lab.
1
star
32

vcardenc

A terrible pure-Go vCard format generator/parser, currently incomplete
Go
1
star
33

buckfast

Spritzy speed-reader for terminal use, written in Go
Go
1
star
34

rt--scrapy

Scrapy project to pull episode info from RTÉ Player to facilitating Flash-free viewing
Python
1
star
35

vcardgen

A simple vcard generation system for Go.
Go
1
star
36

PyGame-Py3k-Script

A Bash script that installs dependencies, downloads/converts/installs source code for PyGame to Py3k.
Shell
1
star
37

go-freeboard

GopherJS bindings for FreeBoard.io including plugin wrappers.
JavaScript
1
star