File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -222,7 +222,9 @@ install_dom0()
222222 #
223223 # config
224224 #
225- cryptsetup -q -i 600 --cipher=aes-xts-plain64 luksFormat ${config_lv} ${RECOVERY_KEY} >&2 || {
225+ cryptsetup -q --cipher=aes-xts-plain64 --hash sha512 \
226+ --pbkdf pbkdf2 --pbkdf-force-iterations $(( 1000 * 1000 )) \
227+ --type luks2 luksFormat ${config_lv} ${RECOVERY_KEY} >&2 || {
226228 rm -f ${RECOVERY_KEY}
227229 set +x
228230 return 1
@@ -254,12 +256,13 @@ install_dom0()
254256 # prepare lvm directory to store lvm metadata backups.
255257 do_cmd mkdir -p -m 755 ${DOM0_MOUNT} /config/etc/lvm >&2 || return 1
256258
259+ local CIPHER=" --cipher=aes-xts-plain64 --key-size=512"
257260 #
258261 # log
259262 #
260263 set -x
261264 local LOG_KEY=$( gen_log_key ${DOM0_MOUNT} )
262- cryptsetup -q -d ${LOG_KEY} create log /dev/xenclient/log >&2 || {
265+ cryptsetup -q -d ${LOG_KEY} ${CIPHER} create log /dev/xenclient/log >&2 || {
263266 set +x
264267 return 1
265268 }
@@ -268,10 +271,11 @@ install_dom0()
268271 # cores
269272 #
270273 local CORES_KEY=$( gen_cores_key ${DOM0_MOUNT} )
271- cryptsetup -q -d ${CORES_KEY} create cores /dev/xenclient/cores >&2 || {
274+ cryptsetup -q -d ${CORES_KEY} ${CIPHER} create cores /dev/xenclient/cores >&2 || {
272275 set +x
273276 return 1
274277 }
278+ unset CIPHER
275279
276280 # device key (used to tie encrypted disks to this host)
277281 local DEVICE_KEY=$( gen_device_key ${DOM0_MOUNT} )
You can’t perform that action at this time.
0 commit comments