Blame docs/v1.6.0-ReleaseNotes

Packit 94f725
Cryptsetup 1.6.0 Release Notes
Packit 94f725
==============================
Packit 94f725
Packit 94f725
Changes since version 1.6.0-rc1
Packit 94f725
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Packit 94f725
Packit 94f725
 * Change LUKS default cipher to to use XTS encryption mode,
Packit 94f725
   aes-xts-plain64 (i.e. using AES128-XTS).
Packit 94f725
Packit 94f725
   XTS mode becomes standard in hard disk encryption.
Packit 94f725
Packit 94f725
   You can still use any old mode:
Packit 94f725
    - compile cryptsetup with old default:
Packit 94f725
      configure --with-luks1-cipher=aes --with-luks1-mode=cbc-essiv:sha256 --with-luks1-keybits=256
Packit 94f725
    - format LUKS device with old default:
Packit 94f725
      cryptsetup luksFormat -c aes-cbc-essiv:sha256 -s 256 <device>
Packit 94f725
Packit 94f725
Packit 94f725
 * Skip tests and fix error messages if running on old systems (or with old kernel).
Packit 94f725
Packit 94f725
 * Rename configure.in to configure.ac and fix issues with new automake and pkgconfig
Packit 94f725
   and --disable-kernel_crypto option to allow compilation with old kernel headers.
Packit 94f725
Packit 94f725
 * Allow repair of 512 bits key header.
Packit 94f725
Packit 94f725
 * Fix status of device if path argument is used and fix double path prefix
Packit 94f725
   for non-existent device path.
Packit 94f725
Packit 94f725
Packit 94f725
Changes since version 1.5.1
Packit 94f725
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Packit 94f725
Packit 94f725
Important changes
Packit 94f725
~~~~~~~~~~~~~~~~~
Packit 94f725
Packit 94f725
 * Cryptsetup and libcryptsetup is now released under GPLv2+
Packit 94f725
   (GPL version 2 or any later).
Packit 94f725
   Some internal code handling files (loopaes, verity, tcrypt
Packit 94f725
   and crypto backend wrapper) are LGPLv2+.
Packit 94f725
Packit 94f725
   Previously code was GPL version 2 only.
Packit 94f725
Packit 94f725
Packit 94f725
 * Introducing new unified command open and close.
Packit 94f725
Packit 94f725
   Example:
Packit 94f725
      cryptsetup open --type plain|luks|loopaes|tcrypt <device> <name>
Packit 94f725
      (type defaults to luks)
Packit 94f725
Packit 94f725
   with backward-compatible aliases plainOpen, luksOpen, loopaesOpen,
Packit 94f725
   tcryptOpen. Basically "open --type xyz" has alias "xyzOpen".
Packit 94f725
Packit 94f725
   The "create" command (plain device create) is DEPRECATED but will
Packit 94f725
   be still supported.
Packit 94f725
   (This command is confusing because of switched arguments order.)
Packit 94f725
Packit 94f725
   The close command is generic command to remove mapping and have
Packit 94f725
   backward compatible aliases (remove, luksClose, ...) which behaves
Packit 94f725
   exactly the same.
Packit 94f725
Packit 94f725
   While all old syntax is still supported, I strongly suggest to use
Packit 94f725
   new command syntax which is common for all device types (and possible
Packit 94f725
   new formats added in future).
Packit 94f725
Packit 94f725
Packit 94f725
 * cryptsetup now support directly TCRYPT (TrueCrypt and compatible tc-play)
Packit 94f725
   on-disk format
Packit 94f725
   (Code is independent implementation not related to original project).
Packit 94f725
Packit 94f725
   Only dump (tcryptDump command) and activation (open --type tcrypt or tcryptOpen)
Packit 94f725
   of TCRYPT device are supported. No header changes are supported.
Packit 94f725
Packit 94f725
   It is intended to easily access containers shared with other operating systems
Packit 94f725
   without need to install 3rd party software. For native Linux installations LUKS
Packit 94f725
   is the preferred format.
Packit 94f725
Packit 94f725
   WARNING: TCRYPT extension requires kernel userspace crypto API to be
Packit 94f725
   available (introduced in Linux kernel 2.6.38).
Packit 94f725
   If you are configuring kernel yourself, enable "User-space interface
Packit 94f725
   for symmetric key cipher algorithms" in "Cryptographic API" section
Packit 94f725
   (CRYPTO_USER_API_SKCIPHER .config option).
Packit 94f725
Packit 94f725
   Because  TCRYPT  header  is encrypted, you have to always provide valid
Packit 94f725
   passphrase and keyfiles. Keyfiles are handled exactly the same as in original
Packit 94f725
   format (basically, first 1MB of every keyfile is mixed using CRC32 into pool).
Packit 94f725
Packit 94f725
   Cryptsetup should recognize all TCRYPT header variants ever released, except
Packit 94f725
   legacy  cipher chains  using LRW encryption mode with 64 bits encryption block
Packit 94f725
   (namely Blowfish in LRW mode is not recognized, this is limitation of kernel
Packit 94f725
   crypto API).
Packit 94f725
Packit 94f725
   Device activation is supported only for LRW/XTS modes (again, limitation
Packit 94f725
   of kernel dmcrypt which do not implements TCRYPT extensions to CBC mode).
Packit 94f725
   (So old containers cannot be activated, but you can use libcryptsetup
Packit 94f725
   for lost password search, example of such code is included in misc directory.)
Packit 94f725
Packit 94f725
   Hidden header are supported using --tcrypt-hidden option, system encryption
Packit 94f725
   using --tcrypt-system option.
Packit 94f725
Packit 94f725
   For detailed description see man page.
Packit 94f725
Packit 94f725
   EXAMPLE:
Packit 94f725
     * Dump device parameters of container in file:
Packit 94f725
Packit 94f725
     # cryptsetup tcryptDump tst
Packit 94f725
       Enter passphrase: 
Packit 94f725
Packit 94f725
     TCRYPT header information for tst
Packit 94f725
     Version:        5
Packit 94f725
     Driver req.:    7
Packit 94f725
     Sector size:    512
Packit 94f725
     MK offset:      131072
Packit 94f725
     PBKDF2 hash:    sha512
Packit 94f725
     Cipher chain:   serpent-twofish-aes
Packit 94f725
     Cipher mode:    xts-plain64
Packit 94f725
     MK bits:        1536
Packit 94f725
Packit 94f725
     You can also dump master key using --dump-master-key.
Packit 94f725
     Dump does not require superuser privilege.
Packit 94f725
Packit 94f725
     * Activation of this container
Packit 94f725
Packit 94f725
     # cryptsetup tcryptOpen tst tcrypt_dev
Packit 94f725
       Enter passphrase: 
Packit 94f725
      (Chain of dmcrypt devices is activated as /dev/mapper/tcrypt_dev.)
Packit 94f725
Packit 94f725
     * See status of active TCRYPT device
Packit 94f725
Packit 94f725
     # cryptsetup status tcrypt_dev
Packit 94f725
Packit 94f725
     /dev/mapper/tcrypt_dev is active.
Packit 94f725
     type:    TCRYPT
Packit 94f725
     cipher:  serpent-twofish-aes-xts-plain64
Packit 94f725
     keysize: 1536 bits
Packit 94f725
     device:  /dev/loop0
Packit 94f725
     loop:    /tmp/tst
Packit 94f725
     offset:  256 sectors
Packit 94f725
     size:    65024 sectors
Packit 94f725
     skipped: 256 sectors
Packit 94f725
     mode:    read/write
Packit 94f725
Packit 94f725
    * And plaintext filesystem now ready to mount
Packit 94f725
Packit 94f725
    # blkid /dev/mapper/tcrypt_dev
Packit 94f725
    /dev/mapper/tcrypt_dev: SEC_TYPE="msdos" UUID="9F33-2954" TYPE="vfat"
Packit 94f725
Packit 94f725
Packit 94f725
 * Add (optional) support for lipwquality for new LUKS passwords.
Packit 94f725
Packit 94f725
   If password is entered through terminal (no keyfile specified)
Packit 94f725
   and cryptsetup is compiled with --enable-pwquality, default
Packit 94f725
   system pwquality settings are used to check password quality.
Packit 94f725
Packit 94f725
   You can always override this check by using new --force-password option.
Packit 94f725
Packit 94f725
   For more info about pwquality project see http://libpwquality.fedorahosted.org/
Packit 94f725
Packit 94f725
Packit 94f725
 * Proper handle interrupt signals (ctrl+c and TERM signal) in tools
Packit 94f725
Packit 94f725
   Code should now handle interrupt properly, release and explicitly wipe
Packit 94f725
   in-memory key materials on interrupt.
Packit 94f725
   (Direct users of libcryptsetup should always call crypt_free() when
Packit 94f725
   code is interrupted to wipe all resources. There is no signal handling
Packit 94f725
   in library, it is up to the tool using it.)
Packit 94f725
Packit 94f725
 
Packit 94f725
 * Add new benchmark command
Packit 94f725
Packit 94f725
   The "benchmark" command now tries to benchmark PBKDF2 and some block
Packit 94f725
   cipher variants. You can specify you own parameters (--cipher/--key-size
Packit 94f725
   for block ciphers, --hash for PBKDF2).
Packit 94f725
Packit 94f725
   See man page for detailed description.
Packit 94f725
Packit 94f725
   WARNING: benchmark command requires kernel userspace crypto API to be
Packit 94f725
   available (introduced in Linux kernel 2.6.38).
Packit 94f725
   If you are configuring kernel yourself, enable "User-space interface
Packit 94f725
   for symmetric key cipher algorithms" in "Cryptographic API" section
Packit 94f725
   (CRYPTO_USER_API_SKCIPHER .config option).
Packit 94f725
Packit 94f725
   EXAMPLE:
Packit 94f725
     # cryptsetup benchmark
Packit 94f725
     # Tests are approximate using memory only (no storage IO).
Packit 94f725
     PBKDF2-sha1       111077 iterations per second
Packit 94f725
     PBKDF2-sha256      53718 iterations per second
Packit 94f725
     PBKDF2-sha512      18832 iterations per second
Packit 94f725
     PBKDF2-ripemd160   89775 iterations per second
Packit 94f725
     PBKDF2-whirlpool   23918 iterations per second
Packit 94f725
            #  Algorithm | Key | Encryption | Decryption
Packit 94f725
          aes-cbc   128b  212.0 MiB/s  428.0 MiB/s
Packit 94f725
      serpent-cbc   128b   23.1 MiB/s   66.0 MiB/s
Packit 94f725
      twofish-cbc   128b   46.1 MiB/s   50.5 MiB/s
Packit 94f725
          aes-cbc   256b  163.0 MiB/s  350.0 MiB/s
Packit 94f725
      serpent-cbc   256b   23.1 MiB/s   66.0 MiB/s
Packit 94f725
      twofish-cbc   256b   47.0 MiB/s   50.0 MiB/s
Packit 94f725
          aes-xts   256b  190.0 MiB/s  190.0 MiB/s
Packit 94f725
      serpent-xts   256b   58.4 MiB/s   58.0 MiB/s
Packit 94f725
      twofish-xts   256b   49.0 MiB/s   49.5 MiB/s
Packit 94f725
          aes-xts   512b  175.0 MiB/s  175.0 MiB/s
Packit 94f725
      serpent-xts   512b   59.0 MiB/s   58.0 MiB/s
Packit 94f725
      twofish-xts   512b   48.5 MiB/s   49.5 MiB/s
Packit 94f725
Packit 94f725
     Or you can specify cipher yourself:
Packit 94f725
     # cryptsetup benchmark --cipher cast5-cbc-essiv:sha256 -s 128
Packit 94f725
     # Tests are approximate using memory only (no storage IO).
Packit 94f725
     #  Algorithm | Key | Encryption | Decryption
Packit 94f725
        cast5-cbc   128b   32.4 MiB/s   35.0 MiB/s
Packit 94f725
Packit 94f725
     WARNING: these tests do not use dmcrypt, only crypto API.
Packit 94f725
     You have to benchmark the whole device stack and you can get completely
Packit 94f725
     different results. But is is usable for basic comparison.
Packit 94f725
     (Note for example AES-NI decryption optimization effect in example above.)
Packit 94f725
Packit 94f725
Features
Packit 94f725
~~~~~~~~
Packit 94f725
Packit 94f725
 * Do not maintain ChangeLog file anymore, see git log for detailed changes,
Packit 94f725
   e.g. here http://code.google.com/p/cryptsetup/source/list
Packit 94f725
Packit 94f725
 * Move change key into library, add crypt_keyslot_change_by_passphrase().
Packit 94f725
   This change is useful mainly in FIPS mode, where we cannot
Packit 94f725
   extract volume key directly from libcryptsetup.
Packit 94f725
Packit 94f725
 * Add verbose messages during reencryption.
Packit 94f725
Packit 94f725
 * Default LUKS PBKDF2 iteration time is now configurable.
Packit 94f725
Packit 94f725
 * Add simple cipher benchmarking API.
Packit 94f725
Packit 94f725
 * Add kernel skcipher backend.
Packit 94f725
Packit 94f725
 * Add CRC32 implementation (for TCRYPT).
Packit 94f725
Packit 94f725
 * Move PBKDF2 into crypto backend wrapper.
Packit 94f725
   This allows use it in other formats, use library implementations and
Packit 94f725
   also possible use of different KDF function in future.
Packit 94f725
Packit 94f725
 * New PBKDF2 benchmark using getrusage().
Packit 94f725
Packit 94f725
Fixes
Packit 94f725
~~~~~
Packit 94f725
Packit 94f725
 * Avoid O_DIRECT open if underlying storage doesn't support it.
Packit 94f725
Packit 94f725
 * Fix some non-translated messages.
Packit 94f725
Packit 94f725
 * Fix regression in header backup (1.5.1) with container in file.
Packit 94f725
Packit 94f725
 * Fix blockwise read/write for end writes near end of device.
Packit 94f725
   (was not used in previous versions)
Packit 94f725
Packit 94f725
 * Ignore setpriority failure.
Packit 94f725
Packit 94f725
 * Code changes to fix/ignore problems found by Coverity static analysis, including
Packit 94f725
   - Get page size should never fail.
Packit 94f725
   - Fix time of check/use (TOCTOU test) in tools
Packit 94f725
   - Fix time of check/use in loop/wipe utils.
Packit 94f725
   - Fix time of check/use in device utils.
Packit 94f725
Packit 94f725
 * Disallow header restore if context is non-LUKS device.