Cryptsetup

    Cipher a new device

    cryptsetup --batch-mode --cipher "aes-xts-plain64" --key-size 256 --hash "sha256" --iter-time NUMBER --use-random luksFormat "<device>"
    

    Then you have to open it (see uncipher), and make the filesystem (e.g. mkfs.ext4 /dev/mapper/<name>)

    Uncipher and mount a device

    cryptsetup --batch-mode --cipher "aes-xts-plain64" --key-size 256 --hash "sha256" --iter-time <number> open "<device>" "<name>"
    

    Note: adapt the different parameters