Go to file
Johannes Bauer 425e2dcd66 Add client code back in
Client code basis back in, parsing of command line options as well.
Client does not do anything yet, though.
2019-10-23 20:13:25 +02:00
codegen Cleanups 2016-09-24 20:14:53 +02:00
initramfs Only execute luksrku when an actual server config is present 2018-01-16 19:01:55 +01:00
parsers Add client code back in 2019-10-23 20:13:25 +02:00
.gitignore Integrate editor properly from command line 2019-10-23 11:34:40 +02:00
argparse_client.c Add client code back in 2019-10-23 20:13:25 +02:00
argparse_client.h Add client code back in 2019-10-23 20:13:25 +02:00
argparse_edit.c Add client code back in 2019-10-23 20:13:25 +02:00
argparse_edit.h Add client code back in 2019-10-23 20:13:25 +02:00
argparse_server.c Add client code back in 2019-10-23 20:13:25 +02:00
argparse_server.h Add client code back in 2019-10-23 20:13:25 +02:00
blacklist.c LICENSE added (GPLv3) 2016-09-22 20:47:43 +02:00
blacklist.h LICENSE added (GPLv3) 2016-09-22 20:47:43 +02:00
ChangeLog Release v0.02 2019-10-19 15:08:30 +02:00
client.c Add client code back in 2019-10-23 20:13:25 +02:00
client.h Add client code back in 2019-10-23 20:13:25 +02:00
editor.c Also print OpenSSL command line to debug the server 2019-10-23 16:03:58 +02:00
editor.h Started with server implementation 2019-10-23 13:18:51 +02:00
exec.c Fix comment 2018-01-16 19:42:22 +01:00
exec.h Show log output even in verbose mode 2018-01-16 19:40:13 +01:00
file_encryption.c Implemented export of key database 2019-10-21 22:47:58 +02:00
file_encryption.h Implemented export of key database 2019-10-21 22:47:58 +02:00
gen_config Initial import 2016-09-22 20:40:58 +02:00
global.h Implemented export of key database 2019-10-21 22:47:58 +02:00
keydb.c Server implementation seems to work 2019-10-23 15:56:06 +02:00
keydb.h Server implementation seems to work 2019-10-23 15:56:06 +02:00
LICENSE LICENSE added (GPLv3) 2016-09-22 20:47:43 +02:00
LICENSE-header LICENSE added (GPLv3) 2016-09-22 20:47:43 +02:00
licensify Script to add LICENSE headers to all files 2016-09-22 20:48:11 +02:00
log.c Fix bug with commandline parsing 2019-10-23 20:01:54 +02:00
log.h Fix bug with commandline parsing 2019-10-23 20:01:54 +02:00
luks.c Show log output even in verbose mode 2018-01-16 19:40:13 +01:00
luks.h LICENSE added (GPLv3) 2016-09-22 20:47:43 +02:00
luksrku-config.c LICENSE added (GPLv3) 2016-09-22 20:47:43 +02:00
luksrku.c Add client code back in 2019-10-23 20:13:25 +02:00
Makefile Add client code back in 2019-10-23 20:13:25 +02:00
msg.h Started with server implementation 2019-10-23 13:18:51 +02:00
openssl.c TLS-PSK connection is working in TLSv1.3 2019-10-23 14:28:42 +02:00
openssl.h Remove references to SSL and replace by TLS. 2017-03-07 21:48:00 +01:00
parse-keyfile.c LICENSE added (GPLv3) 2016-09-22 20:47:43 +02:00
parse-keyfile.h LICENSE added (GPLv3) 2016-09-22 20:47:43 +02:00
pgmopts.c Add client code back in 2019-10-23 20:13:25 +02:00
pgmopts.h Add client code back in 2019-10-23 20:13:25 +02:00
README.md Rewrite README 2019-10-23 16:13:23 +02:00
server.c Add client code back in 2019-10-23 20:13:25 +02:00
server.h Add client code back in 2019-10-23 20:13:25 +02:00
thread.c Added detached thread handling code 2019-10-23 19:47:26 +02:00
thread.h Added detached thread handling code 2019-10-23 19:47:26 +02:00
util.c Also print OpenSSL command line to debug the server 2019-10-23 16:03:58 +02:00
util.h Also print OpenSSL command line to debug the server 2019-10-23 16:03:58 +02:00
uuid.c Further work on creating correct type-4 UUIDs 2019-10-20 17:45:21 +02:00
uuid.h Implement actual lookup of luksrku entry 2019-10-23 15:28:38 +02:00
vault.c More tests to show key changes 2019-10-19 11:32:32 +02:00
vault.h Make vault iteration count adaptible to hardware 2019-10-19 11:29:39 +02:00

luksrku

luksrku is a tool that allows you to remotely unlock LUKS disks during bootup from within your initrd. The intention is to have full-disk-encryption with LUKS-rootfs running headlessly. You should be able to remotely unlock their LUKS cryptographic file systems when you know they have been (legitimately) rebooted.

This works as follows: The luksrku client (which needs unlocking) and luksrku server (which holds all the LUKS keys) share a secret. The client either knows the address of the server or it can issue a broadcast in the network to find the correct one. With the help of the shared secret, a TLS connection is established betweem the client and a legitimate server (who also knows the same secret). The server then tells the client all the LUKS passphrases, which performs luksOpen on all volumes.

Security

luksrku uses TLSv1.3-PSK with forward-secrecy key shares (i.e., ECDHE). The curves that are used are X448 and X25519 for key agreement and TLS_CHACHA20_POLY1305_SHA256 or TLS_AES_256_GCM_SHA384 as cipher suites. PSKs are 256 bit long and randomly generated (/dev/urandom). Likewise, the LUKS passphrases are based on 256 bit long secrets and are converted to Base64 for easier handling (when setting up everything initially).

The binary protocol that runs between both is intentionally extremely simple to allow for easy code review.

The key database is encrypted itself, using AES256-GCM, a 128 bit randomized initialization vector and authenticated with a 128 bit authentication tag. Key derivation is done using scrypt with N = 131072 = 2^18, r = 8, p = 1.

Dependencies

OpenSSL v1.1 is required for luksrku.

Example

TODO