Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.78 KB | None | 0 0
  1. ## Starting Out:
  2. - Run the command `gpg --expert --full-generate-key`
  3. - Create a certified certificate
  4.  
  5. ```bash
  6. $ gpg --expert --full-generate-key
  7.  
  8. gpg (GnuPG) 2.2.4; Copyright (C) 2017 Free Software Foundation, Inc.
  9. This is free software: you are free to change and redistribute it.
  10. There is NO WARRANTY, to the extent permitted by law.
  11.  
  12. Please select what kind of key you want:
  13. (1) RSA and RSA (default)
  14. (2) DSA and Elgamal
  15. (3) DSA (sign only)
  16. (4) RSA (sign only)
  17. (7) DSA (set your own capabilities)
  18. (8) RSA (set your own capabilities)
  19. (9) ECC and ECC
  20. (10) ECC (sign only)
  21. (11) ECC (set your own capabilities)
  22. (13) Existing key
  23. Your selection? 8
  24.  
  25. Possible actions for a RSA key: Sign Certify Encrypt Authenticate
  26. Current allowed actions: Sign Certify Encrypt
  27.  
  28. (S) Toggle the sign capability
  29. (E) Toggle the encrypt capability
  30. (A) Toggle the authenticate capability
  31. (Q) Finished
  32.  
  33. Your selection? s
  34.  
  35. Possible actions for a RSA key: Sign Certify Encrypt Authenticate
  36. Current allowed actions: Certify Encrypt
  37.  
  38. (S) Toggle the sign capability
  39. (E) Toggle the encrypt capability
  40. (A) Toggle the authenticate capability
  41. (Q) Finished
  42.  
  43. Your selection? e
  44.  
  45. Possible actions for a RSA key: Sign Certify Encrypt Authenticate
  46. Current allowed actions: Certify
  47.  
  48. (S) Toggle the sign capability
  49. (E) Toggle the encrypt capability
  50. (A) Toggle the authenticate capability
  51. (Q) Finished
  52.  
  53. Your selection? Q
  54. RSA keys may be between 1024 and 4096 bits long.
  55. What keysize do you want? (3072) 2048
  56. Requested keysize is 2048 bits
  57. Please specify how long the key should be valid.
  58. 0 = key does not expire
  59. <n> = key expires in n days
  60. <n>w = key expires in n weeks
  61. <n>m = key expires in n months
  62. <n>y = key expires in n years
  63. Key is valid for? (0)
  64. Key does not expire at all
  65. Is this correct? (y/N) y
  66.  
  67. GnuPG needs to construct a user ID to identify your key.
  68.  
  69. Real name: Matt Wright
  70. Email address: test@nowhere.com
  71. Comment:
  72. You selected this USER-ID:
  73. "Matt Wright <test@nowhere.com>"
  74.  
  75. Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? O
  76. We need to generate a lot of random bytes. It is a good idea to perform
  77. some other action (type on the keyboard, move the mouse, utilize the
  78. disks) during the prime generation; this gives the random number
  79. generator a better chance to gain enough entropy.
  80. gpg: key AAAAAAAAAAAAAAAAAAA marked as ultimately trusted
  81. gpg: directory '/home/matt/.gnupg/openpgp-revocs.d' created
  82. gpg: revocation certificate stored as '/home/matt/.gnupg/openpgp-revocs.d/9B000EEXXXXXXXXXXXXXXXXXXXXXXXXXXXX.rev'
  83. public and secret key created and signed.
  84.  
  85. pub rsa2048 2019-06-14 [C]
  86. 9B000EEXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  87. uid Matt Wright <test@nowhere.com>
  88. ```
  89. ## Add Authentication Subkey
  90. - Run the command `gpg --expert --edit-key KEYID`, where KEYID is given in the previous step (above, it's AAAAAAAAAAAAAAAAAAA)
  91. - Use the `addkey` function,
  92. - Add an Authorization Key
  93. - Save and exit
  94.  
  95. ```bash
  96. $ gpg --expert --edit-key $KEYID
  97. gpg (GnuPG) 2.2.4; Copyright (C) 2017 Free Software Foundation, Inc.
  98. This is free software: you are free to change and redistribute it.
  99. There is NO WARRANTY, to the extent permitted by law.
  100.  
  101. Secret key is available.
  102.  
  103. gpg: checking the trustdb
  104. gpg: marginals needed: 3 completes needed: 1 trust model: pgp
  105. gpg: depth: 0 valid: 1 signed: 0 trust: 0-, 0q, 0n, 0m, 0f, 1u
  106. sec rsa2048/XXXXXXXXXXXXXXXX
  107. created: 2019-06-14 expires: never usage: C
  108. trust: ultimate validity: ultimate
  109. [ultimate] (1). Matt Wright <test@nowhere.com>
  110.  
  111. gpg> addkey
  112. Please select what kind of key you want:
  113. (3) DSA (sign only)
  114. (4) RSA (sign only)
  115. (5) Elgamal (encrypt only)
  116. (6) RSA (encrypt only)
  117. (7) DSA (set your own capabilities)
  118. (8) RSA (set your own capabilities)
  119. (10) ECC (sign only)
  120. (11) ECC (set your own capabilities)
  121. (12) ECC (encrypt only)
  122. (13) Existing key
  123. Your selection? 8
  124.  
  125. Possible actions for a RSA key: Sign Encrypt Authenticate
  126. Current allowed actions: Sign Encrypt
  127.  
  128. (S) Toggle the sign capability
  129. (E) Toggle the encrypt capability
  130. (A) Toggle the authenticate capability
  131. (Q) Finished
  132.  
  133. Your selection? s
  134.  
  135. Possible actions for a RSA key: Sign Encrypt Authenticate
  136. Current allowed actions: Encrypt
  137.  
  138. (S) Toggle the sign capability
  139. (E) Toggle the encrypt capability
  140. (A) Toggle the authenticate capability
  141. (Q) Finished
  142.  
  143. Your selection? e
  144.  
  145. Possible actions for a RSA key: Sign Encrypt Authenticate
  146. Current allowed actions:
  147.  
  148. (S) Toggle the sign capability
  149. (E) Toggle the encrypt capability
  150. (A) Toggle the authenticate capability
  151. (Q) Finished
  152.  
  153. Your selection? a
  154.  
  155. Possible actions for a RSA key: Sign Encrypt Authenticate
  156. Current allowed actions: Authenticate
  157.  
  158. (S) Toggle the sign capability
  159. (E) Toggle the encrypt capability
  160. (A) Toggle the authenticate capability
  161. (Q) Finished
  162.  
  163. Your selection? q
  164. RSA keys may be between 1024 and 4096 bits long.
  165. What keysize do you want? (3072) 2048
  166. Requested keysize is 2048 bits
  167. Please specify how long the key should be valid.
  168. 0 = key does not expire
  169. <n> = key expires in n days
  170. <n>w = key expires in n weeks
  171. <n>m = key expires in n months
  172. <n>y = key expires in n years
  173. Key is valid for? (0)
  174. Key does not expire at all
  175. Is this correct? (y/N) y
  176. Really create? (y/N) y
  177. We need to generate a lot of random bytes. It is a good idea to perform
  178. some other action (type on the keyboard, move the mouse, utilize the
  179. disks) during the prime generation; this gives the random number
  180. generator a better chance to gain enough entropy.
  181.  
  182. sec rsa2048/XXXXXXXXXXXXXXXX
  183. created: 2019-06-14 expires: never usage: C
  184. trust: ultimate validity: ultimate
  185. ssb rsa2048/YYYYYYYYYYYYYYYY
  186. created: 2019-06-14 expires: never usage: A
  187. [ultimate] (1). Matt Wright <test@nowhere.com>
  188.  
  189. gpg> quit
  190. Save changes? (y/N) y
  191. ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement