home *** CD-ROM | disk | FTP | other *** search
/ Millennium Time Capsule / AC2000.BIN / disks / ac8_disk / pgp_long / pgp.asc
Encoding:
Text File  |  1998-01-01  |  15.2 KB  |  305 lines

  1. Stop reading my mail!               (c) Thomas Binder/Atari Computing 1998
  2. ==========================================================================
  3. No part of this article may be reproduced, stored in any form of retrieval 
  4. system or transmitted in any form by any means, mechanical, electronic or 
  5. otherwise without the prior written permission of the copyright holders. 
  6. All rights reserved, including translation into other languages.
  7. --------------------------------------------------------------------------
  8.  
  9. Have you ever thought about how many people may be able to read your 
  10. electronic mail? Thomas Binder takes a look at "Pretty Good Privacy", a 
  11. tool which keeps your private mail private, and a lot more besides...
  12.  
  13. If you need to send confidential text or sensitive data via email, you 
  14. should seriously consider encrypting your mail, so only the intended 
  15. recipient can read it. Conventionally, you would agree on a key and use 
  16. some cryptographic algorithm on the source material before you send it. 
  17. The recipient uses the same key to decrypt the material.
  18.  
  19. There are a many such algorithms - called "symmetric ciphers" because they 
  20. use the same key to encrypt and decrypt data. However there are some 
  21. serious problems which make them less than ideal for exchanging email.
  22.  
  23. - The key has to be agreed in advance - which obviously can't be done by 
  24.   email as it's likely to be compromised before it gets used!
  25. - If there's more than one recipient and you don't want them to be able to 
  26.   read each other's mail you have to agree on a different key with each of 
  27.   them.
  28.  
  29. A solution to these problems are "asymmetric" or "public key" algorithms, 
  30. which use different keys for encryption and decryption. Everyone involved 
  31. has two keys, a public key which can be passed on to anyone, and a secret 
  32. key which is never given to anyone else.
  33.  
  34. Now, when A wants to send private email to B, s/he uses B's public key to 
  35. encrypt the text. Subsequently only B can decrypt the message, using 
  36. his/her secret key. There's no longer a problem exchanging keys, because 
  37. the public key is used to encrypt material and only the intended recipient 
  38. has the secret key required to decrypt the material again.
  39.  
  40. Nothing is perfect and there are some minor disadvantages. There has to be 
  41. some correlation between the public and secret key so the keys need to be 
  42. much larger than those used for symmetric ciphers for the same level of 
  43. security. The algorithms are considerably slower.
  44.  
  45. "Pretty Good Privacy" (PGP) combines the advantages of both cipher types. 
  46. Email and other data is encrypted using the "International Data Encryption 
  47. Algorithm" (IDEA) which was developed at the ETH in Zurich. IDEA is very 
  48. secure using keys with a length of 128 bits (by comparison the alternative 
  49. "Data Encryption Standard" (DES) uses 56 bits and is considered insecure 
  50. these days). IDEA keys do not have to be exchanged; instead, PGP creates a 
  51. truly random session key, encrypts the message using IDEA with this key, 
  52. and then uses the public key scheme RSA (see boxout) to encrypt the 
  53. session key. After that, the crypted message and the crypted key are put 
  54. together and can be passed to the recipient.
  55.  
  56. For example, when A sends a message to B, PGP does the following:
  57.  
  58. - Creates a random 128-bit session key
  59. - Packs the message using the ZIP algorithm (which makes it shorter and 
  60.   less vulnerable to cryptoanalysis)
  61. - IDEA-encrypts the message with the session key
  62. - RSA-encrypts the session key with B's public key
  63. - Concatenates both the crypted message and the crypted key into an output 
  64.   file
  65.  
  66. When B receives the message, PGP performs the following steps to 
  67. recover the data:
  68.  
  69. - Separates the crypted message and session key
  70. - Restores the original session key using RSA with B's secret key
  71. - Decrypts the message using the original session key
  72. - Unpacks the message
  73.  
  74. If you have more than one intended recipient, PGP does not create multiple 
  75. session keys, instead it puts RSA-encrypted "versions" of the session key 
  76. for each recipient into the output file.
  77. Thus, if you send the same message to ten people, the PGP output file 
  78. would contain the IDEA-encrypted message once and ten session keys, each 
  79. RSA-encrypted with the public key of the individual recipient.
  80.  
  81. PGP also enables messages to be "digitally signed" which makes it possible 
  82. to be sure a message written by you has not been altered by anyone. To do 
  83. this a "digest" is created which contains a sequence of numbers which 
  84. exactly matches the message. No other message could have the same digest. 
  85. This digest is then encrypted with the secret key of the writer, resulting 
  86. in the signature. To check it, PGP simply uses the public key of the 
  87. author to decrypt the digest, then compares it to the digest of the 
  88. message which the signature belongs to. As only the owner of the secret 
  89. key is able to create a correct signature, a match is proof that the 
  90. message is unaltered and was written by him.
  91.  
  92. The nice thing about digital signatures is that PGP supports both plain 
  93. text and binary data which means it's possible to digitally sign file 
  94. archives so anybody with access to the author's public key can check 
  95. whether their copy is an original!
  96.  
  97. Key management
  98.  
  99. If you want to exchange email with someone using PGP, you must first 
  100. exchange your public keys. PGP offers lots of useful key management 
  101. functions. It manages two keyrings, one contains your secret key/s and 
  102. should never be accessible to others, the other contains all public keys, 
  103. including the counterpart to your own secret key. You should maintain 
  104. backups of both keyrings, because the loss of your own keys could be very 
  105. embarrassing! The only thing worse than losing your secret keyring is if 
  106. someone else gets hold of your private key so PGP insists this is password 
  107. protected - make sure you don't choose an obvious one!
  108.  
  109. Unless you obtain a public key directly from the owner (which means s/he 
  110. is physically present) how can you be sure it's not someone else's?
  111. This may seems unlikely but public keys are vulnerable to 
  112. "man-in-the-middle attacks". For example, if someone intercepted email en 
  113. route to you and replaces the senders public key with his/her own they 
  114. would be able to intercept and decrypt your reply! Even worse, after 
  115. having read the contents s/he could encrypt the message again with the 
  116. senders original public key and neither you nor the sender would be aware 
  117. of the intrusion! Naturally such an attack requires a considerable 
  118. technical effort, but is possible in most networks.
  119.  
  120. To try to prevent this intrusion PGP offers a couple of possibilities:
  121.  
  122. - Every key has a "fingerprint", which could be checked by phone.
  123. - Keys could be digitally signed. When you're absolutely sure a key 
  124.   belongs to the person you think it does, you can sign the key, using 
  125.   your secret key, and send it back to the owner.
  126.  
  127. If you subsequently receive a new key, you can check if it has the 
  128. signature of someone you trust (and naturally whose public keys you 
  129. already have), before deciding whether the new key is likely to be 
  130. genuine.
  131.  
  132. Risks
  133.  
  134. Even though PGP offers excellent security it still needs to be used 
  135. responsibly:
  136.  
  137. - Don't trust public keys without at least checking their fingerprint, and 
  138.   don't check them by email.
  139. - Never ever sign a key unless you are absolutely sure it belongs to the 
  140.   person you think it does because once you sign a key, you signal to 
  141.   others the key is genuine.
  142.  
  143. Of course, it's also possible someone will try to crack PGP-encrypted 
  144. messages but the effort needed to calculate the secret key to a public key 
  145. or break the IDEA cipher is so high it would take years to do so, even 
  146. using very powerful computer networks - they're more likely to get results 
  147. using "conventional" extortion or violence.
  148.  
  149. Why use PGP?
  150.  
  151. Having read the last paragraph, you may wonder whether to bother using PGP 
  152. at all, especially if you don't have any confidential stuff to send. 
  153. You're not alone, some experts suggest sending encrypted data simply 
  154. attracts the attention of hackers. On the other hand if more people use 
  155. PGP (or other cryptographic tools) it wouldn't attract the same degree of 
  156. attention, a typical chicken and egg scenario!
  157.  
  158. Another reason to use PGP is simply prevent casual intrusion. Think of PGP 
  159. as envelope for your email. When you send a postcard you have to accept 
  160. anyone can read the contents, email is analogous to a postcard the same.
  161. Bear in mind your messages travel across the internet via lots of 
  162. computers and it's possible someone, somewhere could be reading your mail 
  163. and almost every tiny bit of private information can be abused in some 
  164. form so it's a sensible precaution to pop it in a PGP "envelope".
  165.  
  166. PGP and Atari
  167.  
  168. PGP is a command line utility written with portability in mind which has 
  169. the advantage that versions are available for most platforms, including 
  170. ours. Unfortunately these are not very user friendly so but happily there 
  171. are various GEM shells which provide a convenient graphical user interface 
  172. to use PGP. One of the best known is Easy PGP, programmed by Manfred 
  173. Ssykor, which is multitasking aware and offers access to nearly all PGP 
  174. features.
  175.  
  176. Easy PGP can help you manage different keyrings, which is useful if you 
  177. have both personal and professional email correspondence but don't wish to 
  178. keep the keys together to avoid confusion.
  179.  
  180. Of course, it is still inconvenient when you receive an encrypted email, 
  181. to have to call PGP (or shell) to read it and the same applies for sending 
  182. PGP encrypted mail. However there are mail readers which offer built-in 
  183. PGP support or allow the use of PGP as an external filter. This means, 
  184. you can optionally encrypt/sign email before sending it, and incoming 
  185. encrypted mail can be automatically decrypted when you want to read it.
  186.  
  187. For example Okami, an offline mail and newsreader, includes PGP support, 
  188. as well as mutt, which is a mail program ported from the Unix world, 
  189. primarily designed for online use.
  190.  
  191. Getting PGP
  192.  
  193. Almost every BBS or ftp server carrying Atari software will carry a copy 
  194. of PGP. The URL below is an excellent jumping off point because it allows 
  195. you to select your platform then displays a list of hosts in various 
  196. countries:
  197.  
  198. URL: http://www.pgpi.com/download/#2.6.3i
  199.  
  200. The current version is 2.6.3. Be sure to get the international release if 
  201. you live outside the US (usually denoted by the "i" suffix, for example, 
  202. PGP 2.6.3i). After unpacking the archive do take the time to read the 
  203. documentation. They are easy to read and provide the necessary knowledge 
  204. to use and handle PGP correctly (and that does not only refer to technical 
  205. usage). It's not a good idea to use PGP without reading them and be wary 
  206. of any PGP version which came without documentation!
  207.  
  208. You should also make sure your copy has not been hacked, rendering the 
  209. encryption useless (for example, by always using the same IDEA-key instead 
  210. of generating a random one for each new message). A quick way to check 
  211. this is to encrypt the same text twice for the same recipient (create some 
  212. test keys) and if the resulting encrypted files are different your copy is 
  213. probably OK (though this isn't an absolutely reliable test). The best way 
  214. to check your copy of PGP is to check its signature, but this only 
  215. possible if you're already using an older version of PGP, and have and 
  216. trust the public key of the person who signed the archive.
  217.  
  218. Finally, here's the fingerprint of my public key, which you can verify 
  219. when you get it. Naturally if you use this you're already assuming the 
  220. editor, publisher and everyone else involved in the production process 
  221. haven't tampered with the fingerprint!
  222.  
  223. 92 6D 22 37 8F 8D 76 FC  2F FB DD 33 50 2C ED 21
  224.  
  225. If you'd like my public key my email address is:
  226.  
  227. gryf@hrzpub.tu-darmstadt.de
  228.  
  229.  
  230. RSA
  231. --------------------------------------------------------------------------
  232. RSA is a public key cryptography scheme named by its developers Rivest, 
  233. Shamir, and Adleman, uses prime numbers. Today, only one way is known to 
  234. break a non-trivial RSA-key: the factorisation of the product of the two 
  235. primes used to create the key. In other words: The product is known and 
  236. you have to search for the two primes used to create it. The security of 
  237. RSA is based on the fact that there's currently no easy, or more 
  238. accurately, no fast, way to do this for large primes. Consequently the 
  239. larger the primes, the more secure the resulting key.
  240.  
  241. Experts reckon it's safe to use keys with 768 bits and onwards bearing in 
  242. mind the speed of today's computers and the known factorisation 
  243. algorithms. That means, a key with 768 bits will be safe for years, 
  244. provided no one comes up with much faster algorithm to factorise large 
  245. numbers or an alternative strategy to break RSA.
  246.  
  247. I'd recommend anyone creating a new key to opt for at least 1024 bits but 
  248. if you're currently using one with 768 bits you don't need to worry unless 
  249. you need to protect data which has to remain secure in ten years.
  250.  
  251.  
  252. PGP 5.0
  253. --------------------------------------------------------------------------
  254. Even though the article statest PGP 2.6.3 is the current version, PGP 5.0 
  255. has been available for months. However the new version has not yet been 
  256. ported to the Atari platform and is incompatible with the old one. This 
  257. doesn't mean you can't exchange messages with the other version or that 
  258. you have to create new keys, merely that PGP 5.0 offers completely 
  259. different command line options, so shell programs designed to work with 
  260. 2.6.x will simply fail. So, unless you intend use PGP directly from the 
  261. command line, use v2.6.3 or wait until the new version has been ported and 
  262. the programs you want to use have been adapted.
  263.  
  264. PGP 5.0 also supports a new public key scheme in addition to RSA, which is 
  265. incompatible. Thus, you can't exchange protected messages with someone who 
  266. has such a new key, and vice versa.
  267.  
  268.  
  269. Recognising PGP messages
  270. --------------------------------------------------------------------------
  271. As PGP encrypted text is no longer readable and can't be sent via email as 
  272. it is, PGP offers "ASCII armour". This means the resulting ciphertext is 
  273. converted so it consists of characters which can transmitted by email - 
  274. similar to the uuencode process you may already be familiar with.
  275.  
  276. To inform the recipient (or mailing program used) the email contains a PGP 
  277. message, it is surrounded by the following two lines:
  278.  
  279. -----BEGIN PGP MESSAGE-----
  280. -----END PGP MESSAGE-----
  281.  
  282. In discussion forums such as UseNet you'll also often spot 
  283. messages beginning with:
  284.  
  285. -----BEGIN PGP SIGNED MESSAGE-----
  286.  
  287. That means, the following text has been signed by its author, the 
  288. signature is attached at the end of the text, in the section 
  289. marked with:
  290.  
  291. -----BEGIN PGP SIGNATURE-----
  292.  
  293. Sometimes, people also send or post their public keys. These are 
  294. surrounded by these two lines:
  295.  
  296. -----BEGIN PGP PUBLIC KEY BLOCK-----
  297. -----END PGP PUBLIC KEY BLOCK-----
  298.  
  299. In all cases, you can simply drag the file containing the message 
  300. on the PGP executable. PGP automatically detects the type of the 
  301. message and takes the appropriate action.
  302.  
  303. --------------------------------------------------------------------------
  304. End of article
  305.