Gentoo Archives: gentoo-user

From: "J. Roeleveld" <joost@××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Encrypting a hard drive's data. Best method.
Date: Sat, 06 Jun 2020 07:14:21
Message-Id: E6C5C36A-01F7-4666-9C27-2EEB47C093CC@antarean.org
In Reply to: [gentoo-user] Encrypting a hard drive's data. Best method. by Dale
1 On 6 June 2020 06:37:23 CEST, Dale <rdalek1967@×××××.com> wrote:
2 >Howdy,
3 >
4 >I think I got a old 3TB hard drive to work.  After dd'ing it, redoing
5 >partitions and such, it seems to be working.  Right now, I'm copying a
6 >bunch of data to it to see how it holds up.  Oh, it's a PMR drive too. 
7 >lol  Once I'm pretty sure it is alive and working well, I want to play
8 >with encryption.  At some point, I plan to encrypt /home.  I found a
9 >bit
10 >of info with startpage but some is dated.  This is one link that seems
11 >to be from this year, at least updated this year. 
12 >
13 >https://linoxide.com/linux-how-to/encrypt-linux-filesystem/
14 >
15 >It seems like a nice one since it has commands and what it should look
16 >like when it is performing the commands.  I like knowing what I'm doing
17 >sort of matches what the howto shows.  It also seems to use LVM which I
18 >will be using as well.  I think I can follow that and get a working
19 >encrypted storage.  Later, I can attempt this on /home without doing it
20 >blind.  I also have the options in the kernel as well.  I'll post them
21 >at the bottom.  I enabled quite a lot a while back.  ;-) 
22 >
23 >Is this a secure method or is there a more secure way?  Is there any
24 >known issues with using this?  Anyone here use this method?  Keep in
25 >mind, LVM.  BTFRS, SP?, may come later. 
26 >
27 >One other question, can one change the password every once in a while? 
28 >Or once set, you stuck with it from then on? 
29 >
30 >If anyone has links to even better howtos, I'd love to check them out. 
31 >
32 >Dale
33 >
34 >:-)  :-) 
35 >
36 >
37 >root@fireball / # zcat /proc/config.gz | grep crypt | grep =y
38 >CONFIG_ARCH_HAS_MEM_ENCRYPT=y
39 >CONFIG_DM_CRYPT=y
40 >CONFIG_CRYPTO=y
41 >CONFIG_CRYPTO_ALGAPI=y
42 >CONFIG_CRYPTO_ALGAPI2=y
43 >CONFIG_CRYPTO_AEAD=y
44 >CONFIG_CRYPTO_AEAD2=y
45 >CONFIG_CRYPTO_SKCIPHER=y
46 >CONFIG_CRYPTO_SKCIPHER2=y
47 >CONFIG_CRYPTO_HASH=y
48 >CONFIG_CRYPTO_HASH2=y
49 >CONFIG_CRYPTO_RNG=y
50 >CONFIG_CRYPTO_RNG2=y
51 >CONFIG_CRYPTO_RNG_DEFAULT=y
52 >CONFIG_CRYPTO_AKCIPHER2=y
53 >CONFIG_CRYPTO_AKCIPHER=y
54 >CONFIG_CRYPTO_KPP2=y
55 >CONFIG_CRYPTO_ACOMP2=y
56 >CONFIG_CRYPTO_MANAGER=y
57 >CONFIG_CRYPTO_MANAGER2=y
58 >CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y
59 >CONFIG_CRYPTO_GF128MUL=y
60 >CONFIG_CRYPTO_NULL=y
61 >CONFIG_CRYPTO_NULL2=y
62 >CONFIG_CRYPTO_CRYPTD=y
63 >CONFIG_CRYPTO_AUTHENC=y
64 >CONFIG_CRYPTO_SIMD=y
65 >CONFIG_CRYPTO_GLUE_HELPER_X86=y
66 >CONFIG_CRYPTO_RSA=y
67 >CONFIG_CRYPTO_ECHAINIV=y
68 >CONFIG_CRYPTO_CBC=y
69 >CONFIG_CRYPTO_ECB=y
70 >CONFIG_CRYPTO_LRW=y
71 >CONFIG_CRYPTO_XTS=y
72 >CONFIG_CRYPTO_NHPOLY1305=y
73 >CONFIG_CRYPTO_NHPOLY1305_SSE2=y
74 >CONFIG_CRYPTO_NHPOLY1305_AVX2=y
75 >CONFIG_CRYPTO_ESSIV=y
76 >CONFIG_CRYPTO_HMAC=y
77 >CONFIG_CRYPTO_CRC32C=y
78 >CONFIG_CRYPTO_XXHASH=y
79 >CONFIG_CRYPTO_BLAKE2B=y
80 >CONFIG_CRYPTO_CRCT10DIF=y
81 >CONFIG_CRYPTO_MD5=y
82 >CONFIG_CRYPTO_RMD128=y
83 >CONFIG_CRYPTO_RMD160=y
84 >CONFIG_CRYPTO_RMD256=y
85 >CONFIG_CRYPTO_RMD320=y
86 >CONFIG_CRYPTO_SHA1=y
87 >CONFIG_CRYPTO_SHA1_SSSE3=y
88 >CONFIG_CRYPTO_SHA256_SSSE3=y
89 >CONFIG_CRYPTO_SHA512_SSSE3=y
90 >CONFIG_CRYPTO_SHA256=y
91 >CONFIG_CRYPTO_SHA512=y
92 >CONFIG_CRYPTO_WP512=y
93 >CONFIG_CRYPTO_AES=y
94 >CONFIG_CRYPTO_AES_TI=y
95 >CONFIG_CRYPTO_ARC4=y
96 >CONFIG_CRYPTO_BLOWFISH=y
97 >CONFIG_CRYPTO_BLOWFISH_COMMON=y
98 >CONFIG_CRYPTO_BLOWFISH_X86_64=y
99 >CONFIG_CRYPTO_CAMELLIA=y
100 >CONFIG_CRYPTO_CAMELLIA_X86_64=y
101 >CONFIG_CRYPTO_CAMELLIA_AESNI_AVX_X86_64=y
102 >CONFIG_CRYPTO_CAMELLIA_AESNI_AVX2_X86_64=y
103 >CONFIG_CRYPTO_DES=y
104 >CONFIG_CRYPTO_SERPENT=y
105 >CONFIG_CRYPTO_SERPENT_SSE2_X86_64=y
106 >CONFIG_CRYPTO_TWOFISH=y
107 >CONFIG_CRYPTO_TWOFISH_COMMON=y
108 >CONFIG_CRYPTO_TWOFISH_X86_64=y
109 >CONFIG_CRYPTO_TWOFISH_X86_64_3WAY=y
110 >CONFIG_CRYPTO_ANSI_CPRNG=y
111 >CONFIG_CRYPTO_DRBG_MENU=y
112 >CONFIG_CRYPTO_DRBG_HMAC=y
113 >CONFIG_CRYPTO_DRBG=y
114 >CONFIG_CRYPTO_JITTERENTROPY=y
115 >CONFIG_CRYPTO_USER_API=y
116 >CONFIG_CRYPTO_USER_API_HASH=y
117 >CONFIG_CRYPTO_USER_API_SKCIPHER=y
118 >CONFIG_CRYPTO_USER_API_RNG=y
119 >CONFIG_CRYPTO_LIB_AES=y
120 >CONFIG_CRYPTO_LIB_ARC4=y
121 >CONFIG_CRYPTO_LIB_DES=y
122 >CONFIG_CRYPTO_LIB_POLY1305_GENERIC=y
123 >CONFIG_CRYPTO_LIB_SHA256=y
124 >CONFIG_CRYPTO_HW=y
125 >root@fireball / #
126 >
127 >Just wanted to have a few extras.  ROFL 
128
129 Dale,
130
131 I didn't read the full page, but as it uses LUKS to manage the encryption, it is (at least similar) to what I do on my laptops.
132
133 A LUKS volume has support for multiple (I think 4) key slots (passwords that will decrypt the volume)
134
135 So, in order to change the password you would do:
136 1) add the new password into an unused slot
137 2) test the new password works
138 3) delete the old password (freeing the slot)
139
140 --
141 Joost
142
143 --
144 Sent from my Android device with K-9 Mail. Please excuse my brevity.