3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

GnuPG

Last updated at Posted at 2017-02-28

GnuPG

gpgでファイル暗号化
encrypt files by cmd line.

パスワードでの暗号化

gpg -c <file>

デコード

gpg -d <file>

Encrypt with passwd

RSAで暗号化する

RSAでpublicキーprivateキーを生成する

gpg --gen-key
 # it will show options.

生成後 ~/.gnupgにpub, pri キーが保存

gpg --encrypt --recipient <USER Name> <file>
#User nameはファイルをデコードしてほしい人をさせている、自分であればgen-keyで使った名前を入力
#これで、.gpgファイルが生成、暗号化されたファイル
 
 
#もしascii形式がほしいであれば
gpg --encrypt --armor --recipient <User name> <file>

デコード

gpg <-d|--decrypt> <file>

GnuPGサーバからpublicキーをもらう

gpg --search-keys --keyserver <server url> 'KEY_ID|E-Mail_ID|REAL_NAME'

More detail

3
2
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?