欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

CentOS安裝使用VeraCrypt及創(chuàng)建整個(gè)加密硬盤詳解

  發(fā)布時(shí)間:2017-03-13 16:41:43   作者:佚名   我要評論
今天小編將為大家?guī)淼氖荂entOS安裝使用VeraCrypt及創(chuàng)建整個(gè)加密硬盤詳解;希望對大家會(huì)有幫助,有需要的朋友一起去看看吧

(一)創(chuàng)建加密硬盤

創(chuàng)建加密硬盤使用veracrypt -t -c  -t的意思是使用文件向?qū)?chuàng)建加密盤,-c的意思是create創(chuàng)建加密盤

1、啟動(dòng)加密盤創(chuàng)建向?qū)?/strong>

[root@localhost src]# veracrypt -t -c

Volume type:

1) Normal

2) Hidden

Select [1]: 1

這里面是創(chuàng)建普通加密盤,還是隱藏加密盤。這里選擇第1項(xiàng),創(chuàng)建普通加密盤

2、輸入待加密磁盤的路徑

向?qū)?huì)提示你輸入加密的磁盤路徑,由于我們這里是加密整塊硬盤,然后只輸入設(shè)備名,不用輸入分區(qū)名:

Enter volume path: /dev/sdb

3、選擇加密算法

接下來,向?qū)?huì)提示你選擇加密算法和哈希算法,這里我們選擇AES SHA-512:

Encryption Algorithm:

1) AES

2) Serpent

3) Twofish

4) Camellia

5) Kuznyechik

6) AES(Twofish)

7) AES(Twofish(Serpent))

8) Serpent(AES)

9) Serpent(Twofish(AES))

10) Twofish(Serpent)

Select [1]: 1

Hash algorithm:

1) SHA-512

2) Whirlpool

3) SHA-256

4) Streebog

Select [1]: 1

4、選擇加密后的文件系統(tǒng)格式

由于我們將加密磁盤用于Linux系統(tǒng)的,因此選擇Linux Ext4

Filesystem:

1) None

2) FAT

3) Linux Ext2

4) Linux Ext3

5) Linux Ext4

6) NTFS

7) exFAT

Select [2]: 5

5、輸入密碼

Enter password:

WARNING: Short passwords are easy to crack using brute force techniques!

We recommend choosing a password consisting of 20 or more characters. Are you sure you want to use a short password? (y=Yes/n=No) [No]: yes

Re-enter password:

由于我這里用于演示的密碼太短,系統(tǒng)提示我當(dāng)前密碼很容易被暴力破解,建議使用20個(gè)字符以上的密碼,是否還要使用當(dāng)前密碼。這里輸入yes  接著系統(tǒng)會(huì)讓你再次輸入一次密碼:Re-enter password:

6、輸入PIM

接下來系統(tǒng)會(huì)讓你輸入PIM。

Enter PIM:

這個(gè)PIM是什么?我上網(wǎng)查了一下,就是Personal Iterations Multiplier”的縮寫。通俗地說就是:你可以自定義“加密盤的頭部密鑰生成時(shí)的迭代次數(shù)”。這個(gè)“迭代次數(shù)”越大,計(jì)算頭部密鑰的時(shí)間就越長,因此掛載加密盤的過程就越慢;表面上看,這是一個(gè)缺點(diǎn)。但其好處在于:如果某個(gè)攻擊者想要采用暴力破解的方式對“頭部”進(jìn)行窮舉解密,每次一次嘗試也同樣需要花很長時(shí)間(同樣要迭代 N 次)。所以,當(dāng) N 足夠大,暴力破解就變得不可行。  如果你設(shè)置的密碼過于簡短,那么 VeraCrypt 會(huì)強(qiáng)制讓你輸入一個(gè)比較大的 PIM 數(shù)值(大于 485)。  如果你創(chuàng)建加密盤的時(shí)候,指定了 PIM 數(shù)值,那么在掛載的時(shí)候,需要輸入【相同的】PIM 數(shù)值。 如果輸入的數(shù)值與創(chuàng)建時(shí)指定的 PIM 數(shù)值不一致,則掛載失敗。  這里我們直接回車就可以.

7、輸入keyfile

接下來,指定keyfile

Enter keyfile path [none]:

這里我們先不指定,所以直接回車。

8、輸入320個(gè)隨機(jī)字符

在鍵盤上隨意輸入字符,如果不知道輸入的數(shù)量夠不夠,可以回車,向?qū)Ь蜁?huì)提示你還剩多少個(gè)字符沒有輸入了:

Please type at least 320 randomly chosen characters and then press Enter:

Characters remaining: 277

Characters remaining: 172

Characters remaining: 88

Characters remaining: 31

當(dāng)輸入的隨機(jī)字符數(shù)量符合要求后,向?qū)Ь烷_始創(chuàng)建加密盤了:

Done: 9.946% Speed: 89 MB/s Left: 81 s

全部完成后會(huì)有如下提示

Done: 100.000% Speed: 88 MB/s Left: 0 s

The VeraCrypt volume has been successfully created.

(二)掛載加密磁盤

 1、掛載加密磁盤

掛載由veracrypt加密的磁盤和掛載普通磁盤的命令不一樣,不能使用mount。  在未掛載前使用fdisk -l命令查看的話,磁盤還是沒有分區(qū)和格式化的狀態(tài):

Disk /dev/sdb: 8589 MB, 8589934592 bytes

255 heads, 63 sectors/track, 1044 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x330ad122在這種狀態(tài)下是沒有辦法使用mount命令的。

正確的方法是使用命令 veracrypt /dev/sdb /mnt:

[root@localhost src]# veracrypt /dev/sdb /mnt

Enter password for /dev/sdb:

Enter PIM for /dev/sdb:

Enter keyfile [none]:

Protect hidden volume (if any)? (y=Yes/n=No) [No]:這時(shí)系統(tǒng)會(huì)提示是輸入加密磁盤時(shí)預(yù)留的密碼,后三項(xiàng)可以直接回車略過。

2、查看磁盤掛載情況

這里再使用fdisk -l命令查看的話,在原來的磁盤/dev/sda、/dev/sdb的基礎(chǔ)上會(huì)多出一個(gè)/dev/mapper/veracrypt1磁盤,這就是掛載上來加密磁盤:

Disk /dev/mapper/veracrypt1: 8589 MB, 8589672448 bytes

255 heads, 63 sectors/track, 1044 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x00000000

使用 df -h命令查看可以看到/dev/mapper/veracrypt1已經(jīng)掛載到/mnt目錄上了。

[root@localhost src]# df -h

Filesystem Size Used Avail Use% Mounted on

/dev/sda3 47G 1001M 43G 3% /

tmpfs 939M 0 939M 0% /dev/shm

/dev/sda1 976M 80M 845M 9% /boot

/dev/mapper/veracrypt1

7.8G 18M 7.4G 1% /mnt3、嘗試訪問和寫入文件

3、嘗試訪問和寫入文件

[root@localhost src]# cd /mnt

[root@localhost mnt]# ll

總用量 16

drwx------. 2 root root 16384 2月 6 21:35 lost+found

[root@localhost mnt]# touch 1.txt

[root@localhost mnt]# ll

總用量 16

-rw-r--r--. 1 root root 0 2月 6 21:48 1.txt

drwx------. 2 root root 16384 2月 6 21:35 lost+found

[root@localhost mnt]# echo "text" >2.txt

[root@localhost mnt]# ll

總用量 20

-rw-r--r--. 1 root root 0 2月 6 21:48 1.txt

-rw-r--r--. 1 root root 5 2月 6 21:49 2.txt

drwx------. 2 root root 16384 2月 6 21:35 lost+found

沒有問題,掛載成功。

(三)卸載加密硬磁盤

既然掛載加密磁盤有專用的命令,那么卸載加密磁盤也一定有專用的命令:

veracrypt -d /mnt

如果要卸載系統(tǒng)中掛載的全部veracrypt加密磁盤,則使用:

veracrypt -d

不指定掛載目錄即可。  再次查看系統(tǒng)中已經(jīng)掛載的磁盤:

[root@localhost ~]# df -h

Filesystem Size Used Avail Use% Mounted on

/dev/sda3 47G 1001M 43G 3% /

tmpfs 939M 0 939M 0% /dev/shm

/dev/sda1 976M 80M 845M 9% /boot

veracrypt加密磁盤已經(jīng)被卸載掉了。

相關(guān)文章

最新評論