[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4779: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3887)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4781: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3887)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4782: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3887)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4783: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3887)
Gentoo Taiwan 討論區 • 檢視主題 - 使用gpg public/private key為備份資料加解密

使用gpg public/private key為備份資料加解密

發現了什麼好東西?來這裡告訴大家吧!

版主: Forums Team

使用gpg public/private key為備份資料加解密

文章pahud » 週四 8月 19, 2004 2:48 pm

記錄一下剛剛測出來的方式, 搭配cron跟shell script使用的話,可以讓備份資料更安全地保存。

使用public key為備份資料加密, 解密需用相對應之
private key and passphrase:

$ gpg -o etc.tar.gpg -e -r Pahud etc.tar
(使用public keyring中'Pahud'的pubkey來為etc.tar加密,並存成etc.tar.gpg)

$ gpg -o etc.tar -d etc.tar.gpg
(同上,將gpg加密過的資料還原,需要相對應的private key and passphrase)

好玩的應用:

$ tar cpvf - /etc | gpg -o etc.tar.gpg -e -r Pahud
將/etc 一邊tar起來一邊同時gpg加密保存成etc.tar.gpg,
這好處是未加密資料直接pipe處理,不會存在filesystem中。

同上,直接解回去(我還沒測過, 或許可以用.)
$ gpg -d etc.tar.gpg | tar xvf -C /
(其他歡迎補充)
pahud
24hr 義工
 
文章: 1251
註冊時間: 週二 11月 26, 2002 10:22 pm

文章wangjim » 週二 8月 31, 2004 10:00 pm

今天開始研究GunPG這一個東西,如果有太奇怪的問題敬請見諒.

[1] 在製造key的時候,會指定什麼時候過期.那如果今天我指定了一年,那一年後我如果要將之前加密的檔案回覆的話是不是會有問題?所以如果我只是要製造一對key拿來做檔案的加密,我是不是要設定永遠不會過期.
[2]
a. 在解密的過程中,需要 private key and passphrase.如果我今天要在另一台電腦解密,那我一定得將private key拿到這台電腦來.那我要怎麼把它匯入到這台電腦?
b. 但使用a,感覺起來相當不安全. 所以我想問,如果我今天將private key存到隨身碟裡,當gpg需要private key時我只要將它指向到隨身碟的目錄內的private key.如果是這樣的話可以嗎?
[3] private key 和 passphrase哪一比較重要? 如果我今天知道pubkey和private key後是否能"容易"的得到passphrase.或者是知道pubkey和passphrase後,是否能"容易"的得到private key?
wangjim
 
文章: 116
註冊時間: 週四 1月 16, 2003 1:08 am


回到 好康報報

誰在線上

正在瀏覽這個版面的使用者:沒有註冊會員 和 17 位訪客

cron