Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/sysinst Add aes-xts to sysinst(8).
details: https://anonhg.NetBSD.org/src/rev/fce238227190
branches: trunk
changeset: 349452:fce238227190
user: alnsn <alnsn%NetBSD.org@localhost>
date: Sun Dec 11 00:56:34 2016 +0000
description:
Add aes-xts to sysinst(8).
diffstat:
usr.sbin/sysinst/menus.mi | 3 ++-
usr.sbin/sysinst/partman.c | 13 ++++++++++---
2 files changed, 12 insertions(+), 4 deletions(-)
diffs (58 lines):
diff -r 9291a6ad9e52 -r fce238227190 usr.sbin/sysinst/menus.mi
--- a/usr.sbin/sysinst/menus.mi Sun Dec 11 00:34:39 2016 +0000
+++ b/usr.sbin/sysinst/menus.mi Sun Dec 11 00:56:34 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: menus.mi,v 1.10 2015/05/11 13:07:57 martin Exp $ */
+/* $NetBSD: menus.mi,v 1.11 2016/12/11 00:56:34 alnsn Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -731,6 +731,7 @@
option MSG_raid5, exit, action { *(int *)arg = 5; };
menu cgd_enctype;
+ option "aes-xts", exit, action { *(const char**)arg = "aes-xts"; };
option "aes-cbc", exit, action { *(const char**)arg = "aes-cbc"; };
option "3des-cbc", exit, action { *(const char**)arg = "3des-cbc"; };
option "blowfish-cbc", exit, action { *(const char**)arg = "blowfish-cbc"; };
diff -r 9291a6ad9e52 -r fce238227190 usr.sbin/sysinst/partman.c
--- a/usr.sbin/sysinst/partman.c Sun Dec 11 00:34:39 2016 +0000
+++ b/usr.sbin/sysinst/partman.c Sun Dec 11 00:56:34 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: partman.c,v 1.13 2016/05/30 17:03:21 dholland Exp $ */
+/* $NetBSD: partman.c,v 1.14 2016/12/11 00:56:34 alnsn Exp $ */
/*
* Copyright 2012 Eugene Lozovoy
@@ -1023,12 +1023,19 @@
case PMC_MENU_ENCTYPE:
process_menu(MENU_cgd_enctype, &retstring);
dev_ptr->enc_type = retstring;
+ if (! strcmp(retstring, "aes-xts"))
+ dev_ptr->key_size = 256;
+ if (! strcmp(retstring, "aes-cbc"))
+ dev_ptr->key_size = 192;
if (! strcmp(retstring, "blowfish-cbc"))
dev_ptr->key_size = 128;
if (! strcmp(retstring, "3des-cbc"))
dev_ptr->key_size = 192;
return 0;
case PMC_MENU_KEYSIZE:
+ if (! strcmp(dev_ptr->enc_type, "aes-xts"))
+ dev_ptr->key_size +=
+ (dev_ptr->key_size < 512)? 256 : -256;
if (! strcmp(dev_ptr->enc_type, "aes-cbc"))
dev_ptr->key_size +=
(dev_ptr->key_size < 256)? 64 : -128;
@@ -1071,9 +1078,9 @@
.pm_part = 0,
.keygen_type = "pkcs5_pbkdf2/sha1",
.verify_type = "disklabel",
- .enc_type = "aes-cbc",
+ .enc_type = "aes-xts",
.iv_type = "encblkno1",
- .key_size = 192,
+ .key_size = 256,
};
if (disk_entrie != NULL) {
pm_getdevstring(disk_entrie->fullname, SSTRSIZE,
Home |
Main Index |
Thread Index |
Old Index