2 * Helper utilities for LUKS in cryptsetup
4 * Copyright (C) 2018-2023 Red Hat, Inc. All rights reserved.
5 * Copyright (C) 2018-2023 Milan Broz
6 * Copyright (C) 2018-2023 Ondrej Kozina
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
28 const char *luksType(const char *type);
30 bool isLUKS1(const char *type);
32 bool isLUKS2(const char *type);
34 int verify_passphrase(int def);
36 void set_activation_flags(uint32_t *flags);
38 int set_pbkdf_params(struct crypt_device *cd, const char *dev_type);
40 int set_tries_tty(void);
42 int get_adjusted_key_size(const char *cipher_mode, uint32_t default_size_bits, int integrity_keysize);
44 int luksFormat(struct crypt_device **r_cd, char **r_password, size_t *r_passwordLen);
46 int reencrypt(int action_argc, const char **action_argv);
48 int reencrypt_luks1(const char *device);
50 int reencrypt_luks1_in_progress(const char *device);
52 #endif /* UTILS_LUKS_H */