All Projects → square → luks2crypt

square / luks2crypt

Licence: GPL-3.0 license
Manage linux luks client devices and escrow recovery keys to crypt-server

Programming Languages

go
31211 projects - #10 most used programming language
Dockerfile
14818 projects
Makefile
30231 projects

Projects that are alternatives of or similar to luks2crypt

pam panic
A PAM module that protects sensitive data and provides a panic function for emergency situations. Authentication through passwords or removable media.
Stars: ✭ 35 (+9.38%)
Mutual labels:  luks
tpm futurepcr
Calculate future (next boot) TPM PCRs after a kernel upgrade
Stars: ✭ 19 (-40.62%)
Mutual labels:  luks
disk-encryption-hetzner
Encrypt a hetzner server from the "serverbörse" and unlock it remote via ssh
Stars: ✭ 122 (+281.25%)
Mutual labels:  luks
trezorLuks
A wrapper around "cryptsetup" to use a key from a Trezor device instead of a password
Stars: ✭ 20 (-37.5%)
Mutual labels:  luks
scripts
Collection of useful scripts for Linux (git, docker, LUKS, Archlinux...)
Stars: ✭ 36 (+12.5%)
Mutual labels:  luks
open-securekos
Open Secure-K OS is an operating system booting from a USB key in which you can safely create and store your personal and private data. It is a next generation live operating system following liveng patterns. Please refer to Resilient Linux, a fork of Open Secure-K OS which is actively developed.
Stars: ✭ 23 (-28.12%)
Mutual labels:  luks
udiskie-dmenu
Manage removable devices in couple of keystrokes!
Stars: ✭ 30 (-6.25%)
Mutual labels:  luks
unlock-luks-partition
Unlock a LUKS partition via SSH
Stars: ✭ 31 (-3.12%)
Mutual labels:  luks
cryptctl
A disk encryption utility that helps setting up LUKS-based disk encryption using randomly generated keys, and keeps all keys on a dedicated key server.
Stars: ✭ 23 (-28.12%)
Mutual labels:  luks
ansible-archlinux
Automated arch linux desktop environment
Stars: ✭ 56 (+75%)
Mutual labels:  luks
LUKS-OPs
A bash script to automate the most basic usage of LUKS volumes in Linux VPS
Stars: ✭ 30 (-6.25%)
Mutual labels:  luks
u2f-luks
No description or website provided.
Stars: ✭ 29 (-9.37%)
Mutual labels:  luks
arch-config
Scripts and Ansible playbook to setup Arch Linux on ZFS.
Stars: ✭ 36 (+12.5%)
Mutual labels:  luks
arch-install
A highly configurable script automatically installing Arch Linux.
Stars: ✭ 32 (+0%)
Mutual labels:  luks
escrow-eth
Escrow contract
Stars: ✭ 41 (+28.13%)
Mutual labels:  escrow
bitescrow.org
An implementation of the Bitcoin Escrow proposal
Stars: ✭ 33 (+3.13%)
Mutual labels:  escrow
tellerbot
Telegram Bot for over-the-counter trading
Stars: ✭ 17 (-46.87%)
Mutual labels:  escrow

Luks2Crypt

Luks2crypt is used to manage luks client devices and allow escrowing to a crypt-server. Currently, it implements some functionality similar to Crypt2.

postimaging:

  • gathers system info (serial number, username, hostname)

  • generates a random password

  • test if the password passed in on the cli unlocks the disk

  • caches the new password to /etc/luks2crypt/crypt_recovery_key.json

  • uploads the new password to your local crypt-server

  • changes the luks password passed in on the cli to the newly generated one

Dependencies

Luks2crypt requires a pre-existing crypt-server to escrow keys. Crypt-server is a Django web service for centrally storing recovery keys for full disk encryption. See: https://github.com/grahamgilbert/Crypt-Server for more details.

Usage

Setting the admin password and escrowing it post imaging:

sudo luks2crypt postimaging \
  --luksdevice "<device_to_manage>" \
  --currentpassword "<password_to_replace>" \
  --cryptserver "<cryptserver.example.com>"

If your Crypt server uses basic authentication to protect the checkin endpoint:

sudo luks2crypt postimaging \
  --luksdevice "<device_to_manage>" \
  --currentpassword "<password_to_replace>" \
  --cryptserver "<cryptserver.example.com>" \
  --authuser "<basic auth username>" \
  --authpass "<basic auth password>"

If you omit the password, luk2crypt will prompt for one.

Development

  • This repository uses go modules (https://github.com/golang/go/wiki/Modules). You should be able to simply go get the repo and the dependencies will auto install. You will need to be using go version 1.11 or higher.

  • The cryptsetup libs are required to build. Cryptsetup C libraries are used through cgo to manage the encrypted devices. On debian/ubuntu you can run:

    sudo apt install libcryptsetup-dev
    
  • To prepare for a release by cleaning up the unused dependencies run:

    make deps
    
  • Use the Makefile to test and build luks2crypt:

    make
    
  • If you would like to use a mock crypt server to test client changes on is included in this project:

    make mockserver
    
  • If you need a test enviornment, the provided Vagrantfile creates an ubuntu vm. The vagrantfile has a provision script that creates a luks disk image at /home/vagrant/luks-dev-disk.img. The image is then encrypted with the password "devpassword" and mounted at /mnt.

    make devup       # create the dev vm
    make devssh      # connect to the consule of the vm
    make devclean    # delete the vm
    

    This also includes a mock implimentation of crypt-server to log the form data to stdout. You can launch the dev environment as follows:

    make devup
    make devssh
    sudo cryptservermock  # start the mock crypt-server
    
    # in a new term window test the client
    make devssh
    sudo /vagrant/bin/luks2crypt postimaging \
      -l ./luks-dev-disk.img \
      -p devpassword \
      -s ubuntu-focal:8443
    

    You should then see the form post data printed to stdout from cryptservermock.

License

  Copyright 2018 Square Inc.

  This program is free software: you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation, either version 3 of the License, or
  (at your option) any later version.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].