]> Cypherpunks.ru repositories - gohpenc.git/blob - README
9aca2bfc71b7b18cc64cd3971fedecd02ce48aa7
[gohpenc.git] / README
1 Go high-performance encryption utility.
2
3 gohpenc highly resembles hpenc tool (https://github.com/vstakhov/hpenc).
4 hpenc solves the problem that there is no simple tool to quickly
5 transfer data with encryption and authentication:
6
7 * openssl enc -- non-parallelized, no authentication
8 * GnuPG -- non-parallelized, complex key generation/management
9 * age -- non-parallelized
10 * OpenSSH -- non-parallelized, not very fast
11 * encpipe -- slow
12
13 Why gohpenc was written? hpenc has some problems: it does not work on
14 aarch64 and sparc64 architectures under FreeBSD (as seen in the port's
15 Makefile) and produces incompatible output (unauthenticated after 8192
16 blocks) between FreeBSD and HardenedBSD systems somehow. Instead of
17 painful debugging I decided to write something similar on the Go
18 language, widening supported platforms. But with loose of compatibility
19 with hpenc.
20
21 Also hpenc won't fail if transmission was truncated (in valid block
22 bounds).
23
24 It uses ChaCha20-Poly1305, parallelized AEAD encryption of blocks.
25
26     $ key=`gohpenc -psk`
27     $ echo "message to be transmitted" | gohpenc -k $key > encrypted
28     $ gohpenc -d -k $key < encrypted
29
30 Blocksize can be specified with -b option (in KiBs). By default it uses
31 1MiB blocks. By default all CPUs are used, that can be overriden with -c
32 option. If you have got 8 CPUs, then you require (8+1)*1MiB=9MiB of
33 memory for buffers allocation.
34
35 There is random number generation mode (-r option), that just generates
36 random key and encrypt dummy data in the buffers.
37
38 gohpenc is free software: see the file COPYING for copying conditions.