Commit Graph

360 Commits

Author SHA1 Message Date
Milan Broz
153aed3d16 Fix key-size descriptions
For compatibility reasons, cryptsetup uses key size in BITS
while integritysetup in BYTES.

The help is confusing here, this patch fixes it.

Thanks Daniel Tang for notification.
2025-11-21 16:34:47 +01:00
Milan Broz
dc2251b88d man: Fix typo in integritysetup man page. 2025-10-31 08:31:21 +01:00
Milan Broz
d0312d6c34 man: Install fvault2Open man page in Meson. 2025-08-01 15:27:27 +02:00
Milan Broz
267de08586 man: Try to explain PBKDF hardcoded limits. 2025-07-29 09:14:56 +02:00
Milan Broz
e0a5fb2c25 man: Add better explanation for automatic integrity tag recalculation. 2025-07-29 09:14:56 +02:00
Milan Broz
b995ab243c man: Mention crypt/verity/integritytab. 2025-07-29 09:14:56 +02:00
Milan Broz
a498757fd4 man: Use *WARNING* only for serious issues.
Use highlighted warning only for possibility of data loss or serious security issues.

No need to scary people everywhere :)
2025-07-29 09:14:56 +02:00
Milan Broz
349912fec2 man: Do not use *NOTE*, it is just a normal description. 2025-07-29 09:14:56 +02:00
Milan Broz
b0e3b94839 man: Remove mentions about archeologic kernel 2.6 and kernel 4.x 2025-07-29 09:14:56 +02:00
Milan Broz
c66c520e26 man: Always mention <options> as the last paragraph.
Move all notes and warnings to description text.
Refine some small clarification.

Do not use NOTE/WARNING unless there is a serious reason (data loss).
2025-07-29 09:14:56 +02:00
Milan Broz
2c95933bb5 man: Clarify that commands do not wipes data, unify OPAL reset wording. 2025-07-29 09:14:56 +02:00
Milan Broz
bc1b149ee4 man: Better mark option --align-payload as deprecated. 2025-07-29 09:14:56 +02:00
Milan Broz
55272bee98 man: Make --sector-size option description more clear. 2025-07-29 09:14:56 +02:00
Milan Broz
9590d6fe62 man: Clarify --label option. 2025-07-29 09:14:56 +02:00
Milan Broz
5af06cb6cc man: Weaken warning about /dev/urandom as recent kernels behave much better. 2025-07-29 09:14:56 +02:00
Milan Broz
a9e245f68c man: Update and clarify cryptsetup man page notes. 2025-07-29 09:14:56 +02:00
Milan Broz
74a4de9fdd man: Unify tools description and add some context. 2025-07-29 09:14:56 +02:00
Milan Broz
2cf4c9a360 man: Avoid forced line breaks where not necessary. 2025-07-17 15:18:21 +02:00
Milan Broz
360f85dde7 man: Grammar and simple stylistic fixes.
This is based mainly on Grammarly.

It unifies man pages to at least some level of grammar,
so later we can focus on adding more readable content.
2025-07-17 15:01:39 +02:00
Milan Broz
1438140ce3 man: Do not wrap sentences in man pages.
This helps to use external tools for language checking.
2025-07-17 12:38:17 +02:00
Milan Broz
a52e1aadca man: unify formatting of options
- do not use bold if option is the text
- unify argument format
- do not highlight obsolete syntax
2025-07-17 11:51:18 +02:00
Milan Broz
19a4f53c07 man: Do not use bold font in text/URL to avoid format issues. 2025-07-17 11:39:57 +02:00
Ondrej Kozina
04ca5087f8 man: Add cryptsetup-reencrypt token usage examples. 2025-06-23 14:10:16 +02:00
Ondrej Kozina
10ab6be262 Allow --reduce-device-size and --device-size in encrypt action.
Fixes: #822
2025-06-02 17:10:02 +02:00
Milan Broz
6b832b8d03 Add keyslot check code.
This patch adds keyslot randomness analysis to cryptsetup repair command
to check for a detectable corruption of binary area.

It uses Chi2 analysis. This check basically replaces external keyslot
checker program.
2025-05-22 16:09:50 +02:00
Milan Broz
324926e2d8 LUKS2: support Inline tags format and activation for integrity protection 2025-05-22 14:53:16 +02:00
Milan Broz
006ebd832f integrity: support Inline tags format and activation
Support inline format in API with crypt_format_inline().

Add --integrity-inline option to integritysetup.
2025-05-22 14:48:56 +02:00
Milan Broz
50b762ab94 Add note to man page for LUKS convert requirements. 2025-05-20 18:23:55 +02:00
Ondrej Kozina
ad21502d06 Extend options for initializing reencrypiton from cli.
This patch extends available options for LUKS2 reencryption
initialization.

When no specific keyslot is selected by --key-slot option, all active
keyslots needs to be refreshed. With current patch user does not
have to provide passphrase via interactive prompt when token is
available and can unlock assigned keyslot. Only keyslots not assigned
to tokens (and unlocked by tokens) must be provided with passphrase.

Furthermore user may directly narrow down selection of keyslots
suitable for reencryption by specifying either --token-id, --token-type
or --token-only option. In that case only keyslots associated to the
specific token (--token-id) or specific type (--token-type) or any token
specified in LUKS2 metadata (--token-only) will be used for
reencryption and refreshed with new volume key. All other keyslots will
not be refreshed and will be erased after reencryption is finished. The token
association will be carried over to refreshed keyslots.

The third new method available in this patch is support for reencryption
by passing volume keys directly. The LUKS2 device may be reencrypted
by passing volume keys by --volume-key-file, --new-volume-key-file,
--volume-key-keyring or --new-volume-key-keyring options. With this
options user may reencrypt device with no active keyslots. If there's
any active keyslot and volume keys are passed directly user may enforce
volume key based reencryption by passing --force-no-keyslots option.
If --force-no-keyslots option is passed all active keyslots will be
erased after reencryption operation is finished and the device may be
unlocked only by passing new volume key directly.

Fixes: #774, #780.
2025-05-20 15:29:14 +02:00
Ondrej Kozina
0dc630b911 Allow reencryption resume by new methods.
The reencryption operation can now be resumed
using tokens or by specifying volume keys
directly.
2025-05-20 15:29:14 +02:00
Ondrej Kozina
cbcb8c6ee3 Allow device in reencryption to be activated by volume keys in files.
Allow to use up to two --volume-key-file options (paired with
two --key-size options) for device in-reencryption activation.
2025-05-20 15:29:14 +02:00
Milan Broz
9e6fcefefc Remove redundant --verify-passphrase in man.
Fixes: #938
2025-03-09 20:23:12 +01:00
Vojtech Trefny
848f16bb5e man: Fix link for --allow-discards option explanation
--allow-discards is documented only in open and refresh man pages
not in luksFormat.
2025-03-06 17:15:41 +01:00
nl6720
52c63b5de1 Note the need to omit separator characters from the PSID 2025-02-19 12:42:27 +02:00
Milan Broz
dded9b3305 veritysetup: Support --error-as-corruption option.
The panic/restart_on_error options were introduces in kernel 6.12.

As it does not make sense to set these flags without
data corruption handling, only one option error-as-corruption
is implemented that must be used in combination with
panic/restart on corruption.
2025-02-16 20:53:35 +01:00
Milan Broz
b201a62987 Add a note about OPAL PSID sensitivity to manual pages. 2024-12-12 22:44:35 +00:00
Milan Broz
491f31c4d4 Add --integrity-key-size option to cryptsetup.
This patch adds support for --integrity-key-size option that can be used
to setup non-standard HMAC integrity key size.
2024-12-03 20:25:54 +01:00
Milan Broz
768bca1df5 Support plain resize with keyring key. 2024-11-25 14:55:51 +01:00
Milan Broz
4b7920975c Support trusted & encrypted keyring for plain device. 2024-11-25 14:55:47 +01:00
Jan Zerebecki
3c00305156 add warning to order luksChangeKey and reencrypt 2024-09-29 19:13:02 +00:00
Ondrej Kozina
002f73b360 Add --shared option in veritysetup open action.
The option allows data device to be used in multiple
DM table mappings and exclusive access is not checked
anymore in-before device activation.

It also allows correct concurrent verity device activation.
With --shared option if multiple processes compete for same DM
verity name using same underlying data device we can now guarantee
one process succeeds and all other fails with -EEXIST.
2024-07-24 09:39:21 +00:00
Milan Broz
0cc686af59 TCRYPT: Clear mapping of system encrypted partitions.
TrueCrypt/VeraCrypt supports full system encryption (only a partition
table is not encrypted) or system partition encryption
(only a system partition is encrypted).
The metadata header then contains the offset and size of the encrypted area.
Cryptsetup needs to know the specific partition offset to calculate encryption parameters.
To properly map a partition, you must specify a real partition device so cryptsetup can calculate this offset.

As user can specify various combination, we need to determine the proper
IV and data offsets.

The logic for CRYPT_TCRYPT_SYSTEM_HEADER flag should be (in this order):
- if data device is a real partition, calculate offset from it.
- if --header is a real partition , calculate offset from it.
- if device is a real disk, try to search for partition using decrypted offset and size
(works only for system partition-only encryption).
- if data and metadata (header) device is the same, map whole encrypted area
(this is the ost confusing for user)
- if data and metadata (header) divice differs, expect data image contains
only partition (setting offset to 0, but using IV offset from header).

There are still situation that can end with wrong mapping, but user now has the option
to setup it properly.

Also this patch fixes use of stored encryption size in header,
so we do not map larger area.

Fixes:#889
2024-07-02 13:04:30 +00:00
Milan Broz
98b4243432 Add support for high-priority dm-crypt flag.
This patch add new --perf-high_priority cryptsetup option
for flga added in Linux kernel 6.10, dm-crypt target version 1.26.
2024-06-18 11:00:38 +00:00
Milan Broz
bd8cfe1efb Mention need for possible PSID reset for some OPAL drives in man page.
Fixes: #879
2024-05-23 06:29:20 +00:00
Milan Broz
1e58ad570e Add --key-description and --new-key-description for luksAddKey command. 2024-05-10 10:54:59 +02:00
Milan Broz
73975857a3 Add --key-description for luksResume command. 2024-05-10 10:54:55 +02:00
Milan Broz
3c79fd6c4b Add --key-description for open command. 2024-05-10 10:54:50 +02:00
Milan Broz
82118bdd5f Add --key-description for resize command. 2024-05-10 10:54:47 +02:00
Milan Broz
3e01e151f8 Add --key-description for luksFormat command. 2024-05-10 10:54:43 +02:00
Milan Broz
e085ae461f Add --key-description for luksDump command. 2024-05-10 10:54:37 +02:00