Go to file
Johannes Bauer 3478fa4555 Unlocking LUKS volumes works
First complete technical round-trip complete, can unlock the LUKS
volumes described in the server/client databases successfully.
2019-10-25 12:19:01 +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 Implemented finding of keyserver and unlocking of volumes 2019-10-25 11:08:20 +02:00
testdata Unlocking LUKS volumes works 2019-10-25 12:19:01 +02:00
.gitignore Integrate editor properly from command line 2019-10-23 11:34:40 +02:00
argparse_client.c Implemented finding of keyserver and unlocking of volumes 2019-10-25 11:08:20 +02:00
argparse_client.h Implemented finding of keyserver and unlocking of volumes 2019-10-25 11:08:20 +02:00
argparse_edit.c Implemented finding of keyserver and unlocking of volumes 2019-10-25 11:08:20 +02:00
argparse_edit.h Implemented finding of keyserver and unlocking of volumes 2019-10-25 11:08:20 +02:00
argparse_server.c Implemented finding of keyserver and unlocking of volumes 2019-10-25 11:08:20 +02:00
argparse_server.h Implemented finding of keyserver and unlocking of volumes 2019-10-25 11:08:20 +02:00
blacklist.c Unlocking LUKS volumes works 2019-10-25 12:19:01 +02:00
blacklist.h Unlocking LUKS volumes works 2019-10-25 12:19:01 +02:00
ChangeLog Release v0.02 2019-10-19 15:08:30 +02:00
client.c Unlocking LUKS volumes works 2019-10-25 12:19:01 +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 Unlocking LUKS volumes works 2019-10-25 12:19:01 +02:00
keydb.c Implemented finding of keyserver and unlocking of volumes 2019-10-25 11:08:20 +02:00
keydb.h Implemented finding of keyserver and unlocking of volumes 2019-10-25 11:08:20 +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 Client and server commnunication now works 2019-10-23 21:54:10 +02:00
log.h Client and server commnunication now works 2019-10-23 21:54:10 +02:00
luks.c Unlocking LUKS volumes works 2019-10-25 12:19:01 +02:00
luks.h Unlocking LUKS volumes works 2019-10-25 12:19:01 +02:00
luksrku-config.c LICENSE added (GPLv3) 2016-09-22 20:47:43 +02:00
luksrku.c More disabled code removal 2019-10-24 16:57:35 +02:00
Makefile Unlocking LUKS volumes works 2019-10-25 12:19:01 +02:00
msg.h Receiving broadcast messages and plausibility-checking 2019-10-25 09:33:20 +02:00
openssl.c Consolidated session establishment for client and server 2019-10-23 22:06:47 +02:00
openssl.h Consolidated session establishment for client and server 2019-10-23 22:06:47 +02: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 Implemented finding of keyserver and unlocking of volumes 2019-10-25 11:08:20 +02:00
pgmopts.h Implemented finding of keyserver and unlocking of volumes 2019-10-25 11:08:20 +02:00
README.md Implemented finding of keyserver and unlocking of volumes 2019-10-25 11:08:20 +02:00
server.c Unlocking LUKS volumes works 2019-10-25 12:19:01 +02:00
server.h Add client code back in 2019-10-23 20:13:25 +02:00
signals.c Client and server commnunication now works 2019-10-23 21:54:10 +02:00
signals.h Client and server commnunication now works 2019-10-23 21:54:10 +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
udp.c Unlocking LUKS volumes works 2019-10-25 12:19:01 +02:00
udp.h Implemented finding of keyserver and unlocking of volumes 2019-10-25 11:08:20 +02:00
util.c Implemented finding of keyserver and unlocking of volumes 2019-10-25 11:08:20 +02:00
util.h Implemented finding of keyserver and unlocking of volumes 2019-10-25 11:08:20 +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. It exclusively uses fixed message lengths.

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