문서의 선택한 두 판 사이의 차이를 보여줍니다.
양쪽 이전 판 이전 판 다음 판 | 이전 판 | ||
pgp [2014/06/09 23:06] kwon37xi |
pgp [2015/03/17 00:51] (현재) kwon37xi |
||
---|---|---|---|
줄 1: | 줄 1: | ||
====== PGP ====== | ====== PGP ====== | ||
- | ===== GnuPG로 | + | ===== GnuPG로 |
* https:// | * https:// | ||
- | * 키 생성 | + | * [[https:// |
+ | |||
+ | ==== Key 생성 | ||
+ | <code sh> | ||
# key 생성 | # key 생성 | ||
gpg --gen-key | gpg --gen-key | ||
</ | </ | ||
* 질문에 대답하고 가능하면 passphrase도 지정해줄것. | * 질문에 대답하고 가능하면 passphrase도 지정해줄것. | ||
+ | * '' | ||
+ | |||
+ | ==== Key 목록 보기 ==== | ||
+ | <code sh> | ||
+ | # 공개키 보기 | ||
+ | gpg --list-keys | ||
+ | |||
+ | # 비밀키 보기 | ||
+ | gpg --list-sceret-keys | ||
+ | </ | ||
+ | |||
+ | ==== Sign a file ==== | ||
+ | <code sh> | ||
+ | gpg -ab somefile.txt | ||
+ | |||
+ | # somefile.txt.asc 파일 생성됨 | ||
+ | </ | ||
+ | * '' | ||
+ | * '' | ||
+ | |||
+ | ==== 사인 된 파일 검증 ==== | ||
+ | <code sh> | ||
+ | gpg --verify somefile.txt.asc | ||
+ | </ | ||
+ | * Maven 저장소에 artifact를 올릴 때는 Primary Key만 사용할 것. | ||
+ | |||
+ | ==== subkey 삭제 ==== | ||
+ | 일부 PGP 툴은 subkey를 사용해 사인을 하는데 Maven은 이를 인식하지 못한다. 그래서 subkey를 삭제해 버리고 사인할 것. | ||
+ | <code sh> | ||
+ | gpg --list-keys # 여기서 pub key의 ID를 가지고 아래에서 사용 | ||
+ | |||
+ | gpg --edit-key [KEYID] # 예 A6BAB25C | ||
+ | |||
+ | # 아래와 같은 화면이 나왔다고 할 때 | ||
+ | gpg (GnuPG/ | ||
+ | This is free software: you are free to change and redistribute it. | ||
+ | There is NO WARRANTY, to the extent permitted by law. | ||
+ | |||
+ | Secret key is available. | ||
+ | |||
+ | pub 2048R/ | ||
+ | | ||
+ | sub 2048R/ | ||
+ | sub 2048R/ | ||
+ | [ultimate] (1). Juven Xu (for testing) < | ||
+ | </ | ||
+ | * 여기서 '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | |||
+ | ==== PGP Public Key 업로드 ==== | ||
+ | * PGP key Servers 중에 하나 선택해서 올리기 | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | |||
+ | * 올리기< | ||
+ | gpg --keyserver hkp:// | ||
+ | </ | ||
+ | * 남이 올린 키 받아서 import< | ||
+ | gpg --keyserver hkp:// | ||
+ | </ |