Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cryptsetup failed with code 22 #2

Open
matrob opened this issue Jan 31, 2020 · 1 comment
Open

cryptsetup failed with code 22 #2

matrob opened this issue Jan 31, 2020 · 1 comment

Comments

@matrob
Copy link

matrob commented Jan 31, 2020

I have followed the instructions from the readme exactly, but stop at the following point:
cryptsetup -v --type luks --cipher aes-xts-plain64 --key-size 512 --hash sha512 --iter-time 2000 --use-random --verify-passphrase luksFormat /dev/md0

I receive the following command line output:
# command failed with code 22: invalid argument

EDIT:
The ArchWiki helped me to better understand cryptsetup and helped to solve the problem.
https://wiki.archlinux.org/index.php/Dm-crypt/Device_encryption#Cryptsetup_usage

@matrob matrob closed this as completed Feb 2, 2020
@vzhilov vzhilov reopened this Apr 21, 2020
@vzhilov
Copy link
Owner

vzhilov commented Apr 21, 2020

Ex2 Ultra device has hardware CESA enctyption built-in: https://wiki.kobol.io/helios4/cesa/

So I found it is better to use aes-cbc-essiv, that is about twice faster than the cipher above. So the correct command should be:

cryptsetup -v -y -c aes-cbc-essiv:sha256 luksFormat /dev/sda1

I have fixed the README.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants