Guest User

Untitled

a guest
Aug 15th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.83 KB | None | 0 0
  1. gpg --using-key pubkey.txt --verify message.txt
  2.  
  3. gpg --import pubkey.txt
  4. gpg --lsign-key [name within pubkey.txt]
  5. # ... something to do with choosing trust levels
  6. gpg --verify message.txt
  7.  
  8. [ben@seditious tmp]$ gpg -v --verify thing.txt.gpg
  9. gpg: original file name='thing.txt'
  10. gpg: Signature made Thu 26 Sep 2013 06:51:39 AM EST using RSA key ID 35C7553C
  11. gpg: Can't check signature: public key not found
  12. [ben@seditious tmp]$ gpg -v --status-fd 1 --verify thing.txt.gpg
  13. gpg: original file name='thing.txt'
  14. gpg: Signature made Thu 26 Sep 2013 06:51:39 AM EST using RSA key ID 35C7553C
  15. [GNUPG:] ERRSIG 7FF2D37135C7553C 1 10 00 1380142299 9
  16. [GNUPG:] NO_PUBKEY 7FF2D37135C7553C
  17. gpg: Can't check signature: public key not found
  18. [ben@seditious tmp]$
  19.  
  20. bash-3.2$ pgpdump thing.txt.gpg
  21. Old: Compressed Data Packet(tag 8)
  22. Comp alg - ZLIB <RFC1950>(comp 2)
  23. Old: One-Pass Signature Packet(tag 4)(13 bytes)
  24. New version(3)
  25. Sig type - Signature of a binary document(0x00).
  26. Hash alg - SHA512(hash 10)
  27. Pub alg - RSA Encrypt or Sign(pub 1)
  28. Key ID - 0x7FF2D37135C7553C
  29. Next packet - other than one pass signature
  30. Old: Literal Data Packet(tag 11)(24 bytes)
  31. Format - binary
  32. Filename - thing.txt
  33. File modified time - Thu Sep 26 06:51:39 EST 2013
  34. Literal - ...
  35. Old: Signature Packet(tag 2)(412 bytes)
  36. Ver 4 - new
  37. Sig type - Signature of a binary document(0x00).
  38. Pub alg - RSA Encrypt or Sign(pub 1)
  39. Hash alg - SHA512(hash 10)
  40. Hashed Sub: signature creation time(sub 2)(4 bytes)
  41. Time - Thu Sep 26 06:51:39 EST 2013
  42. Sub: issuer key ID(sub 16)(8 bytes)
  43. Key ID - 0x7FF2D37135C7553C
  44. Hash left 2 bytes - f0 97
  45. RSA m^d mod n(3066 bits) - ...
  46. -> PKCS-1
  47. bash-3.2$
  48.  
  49. [ben@seditious tmp]$ gpg -v --verify thing.txt.gpg
  50. gpg: original file name='thing.txt'
  51. gpg: Signature made Thu 26 Sep 2013 06:51:39 AM EST using RSA key ID 35C7553C
  52. gpg: using subkey 35C7553C instead of primary key 73590E5D
  53. gpg: using PGP trust model
  54. gpg: Good signature from "Ben M <ben@REDACTED>"
  55. gpg: aka "Ben M <ben.m@REDACTED>"
  56. gpg: aka "Ben M <ben.m@REDACTED>"
  57. gpg: aka "Ben M (backup email address) <benm@REDACTED>"
  58. gpg: WARNING: This key is not certified with a trusted signature!
  59. gpg: There is no indication that the signature belongs to the owner.
  60. Primary key fingerprint: DB47 24E6 FA42 86C9 2B4E 55C4 321E 4E23 7359 0E5D
  61. Subkey fingerprint: B7F0 FE75 9387 430D D0C5 8BDB 7FF2 D371 35C7 553C
  62. gpg: binary signature, digest algorithm SHA512
  63. [ben@seditious tmp]$
  64.  
  65. [ben@seditious tmp]$ gpg -v --verify --trust-model always thing.txt.gpg
  66. gpg: original file name='thing.txt'
  67. gpg: Signature made Thu 26 Sep 2013 06:51:39 AM EST using RSA key ID 35C7553C
  68. gpg: using subkey 35C7553C instead of primary key 73590E5D
  69. gpg: Good signature from "Ben M <ben@REDACTED>"
  70. gpg: aka "Ben M <ben.m@REDACTED>"
  71. gpg: aka "Ben M <ben.m@REDACTED>"
  72. gpg: aka "Ben M (backup email address) <benm@REDACTED>"
  73. gpg: WARNING: Using untrusted key!
  74. gpg: binary signature, digest algorithm SHA512
  75. [ben@seditious tmp]$
  76.  
  77. [ben@seditious tmp]$ gpg --verify --trust-model always thing.txt.gpg
  78. gpg: Signature made Thu 26 Sep 2013 06:51:39 AM EST using RSA key ID 35C7553C
  79. gpg: Good signature from "Ben M <ben@REDACTED>"
  80. gpg: aka "Ben M <ben.m@REDACTED>"
  81. gpg: aka "Ben M <ben.m@REDACTED>"
  82. gpg: aka "Ben M (backup email address) <benm@REDACTED>"
  83. gpg: WARNING: Using untrusted key!
  84. [ben@seditious tmp]$
  85.  
  86. [ben@seditious ~]$ gpg -v --no-default-keyring --keyring /tmp/mykey.gpg --verify /tmp/thing.txt.gpg
  87. gpg: original file name='thing.txt'
  88. gpg: Signature made Thu 26 Sep 2013 06:51:39 AM EST using RSA key ID 35C7553C
  89. gpg: using subkey 35C7553C instead of primary key 73590E5D
  90. gpg: using PGP trust model
  91. gpg: Good signature from "Ben M <ben@REDACTED>"
  92. gpg: aka "Ben M (backup email address) <benm@REDACTED>"
  93. gpg: aka "Ben M <ben.m@REDACTED>"
  94. gpg: aka "Ben M <ben.m@REDACTED>"
  95. gpg: WARNING: This key is not certified with a trusted signature!
  96. gpg: There is no indication that the signature belongs to the owner.
  97. Primary key fingerprint: DB47 24E6 FA42 86C9 2B4E 55C4 321E 4E23 7359 0E5D
  98. Subkey fingerprint: B7F0 FE75 9387 430D D0C5 8BDB 7FF2 D371 35C7 553C
  99. gpg: binary signature, digest algorithm SHA512
  100. [ben@seditious ~]$
  101.  
  102. gpg --status-fd 1 --verify thefile.gpg
  103.  
  104. [ben@seditious tmp]$ gpg -v --status-fd 1 --verify thing.txt.gpg
  105. gpg: original file name='thing.txt'
  106. gpg: Signature made Thu 26 Sep 2013 06:51:39 AM EST using RSA key ID 35C7553C
  107. [GNUPG:] ERRSIG 7FF2D37135C7553C 1 10 00 1380142299 9
  108. [GNUPG:] NO_PUBKEY 7FF2D37135C7553C
  109. gpg: Can't check signature: public key not found
  110.  
  111. [ben@seditious ~]$ gpg -v --no-default-keyring --keyring /tmp/mykey.gpg --verify /tmp/thing.txt.gpg
  112. gpg: original file name='thing.txt'
  113. gpg: Signature made Thu 26 Sep 2013 06:51:39 AM EST using RSA key ID 35C7553C
  114. gpg: using subkey 35C7553C instead of primary key 73590E5D
  115. gpg: using PGP trust model
  116. gpg: Good signature from "Ben M <ben@REDACTED>"
  117. gpg: aka "Ben M (backup email address) <benm@REDACTED>"
  118. gpg: aka "Ben M <ben.m@REDACTED>"
  119. gpg: aka "Ben M <ben.m@REDACTED>"
  120. gpg: WARNING: This key is not certified with a trusted signature!
  121. gpg: There is no indication that the signature belongs to the owner.
  122. Primary key fingerprint: DB47 24E6 FA42 86C9 2B4E 55C4 321E 4E23 7359 0E5D
  123. Subkey fingerprint: B7F0 FE75 9387 430D D0C5 8BDB 7FF2 D371 35C7 553C
  124. gpg: binary signature, digest algorithm SHA512
  125.  
  126. [ben@seditious tmp]$ gpg -v --verify thing.txt.gpg
  127. gpg: original file name='thing.txt'
  128. gpg: Signature made Thu 26 Sep 2013 06:51:39 AM EST using RSA key ID 35C7553C
  129. gpg: Can't check signature: public key not found
  130.  
  131. gpgv --keyring key.ring somefile.txt
Add Comment
Please, Sign In to add comment