Difference between revisions of "Cryptography"

From Hackepedia
Jump to navigationJump to search
(not all sshd's are free, and plain text protocols is a lot larger then ssh.)
Line 1: Line 1:
Cryptography is the method for distorting plain text so that it is unreadable by someone other than the intended recipient.  For example, someone that is using a packet sniffer (see [[bpf]]) to listen in on network connection.  Only if this third party knows the secret key to the ciphertext will they break the encryption and be able to see the plaintext. Anyone using plain text protocols these days is as stupid as [[sshd]] is free.
+
Cryptography is the method for distorting plain text so that it is unreadable by someone other than the intended recipient.  For example, someone that is using a packet sniffer (see [[bpf]]) to listen in on network connection.  Only if this third party knows the secret key to the ciphertext will they break the encryption and be able to see the plaintext. We highly recommend anyone using plain text protocols these days to use their free, open source, equivalents.
  
 
=== Cryptography found in UNIX ===
 
=== Cryptography found in UNIX ===

Revision as of 09:04, 9 October 2005

Cryptography is the method for distorting plain text so that it is unreadable by someone other than the intended recipient. For example, someone that is using a packet sniffer (see bpf) to listen in on network connection. Only if this third party knows the secret key to the ciphertext will they break the encryption and be able to see the plaintext. We highly recommend anyone using plain text protocols these days to use their free, open source, equivalents.

Cryptography found in UNIX

Early passwords databases were not encrypted and since they were not shadowed this allowed anyone on a system to log in as the system administrator. The programmers rejected this by implementing a One way hash of DES to "encrypt" passwords as part of the crypt(3) function. It was impossible to decrypt these passwords since they were a modified version of DES, so in order to know if someone had the right password the plain text would be encrypted and the result compared with the hash of the password database, if they matched a user would be granted access. As computers became faster so did the speed at which DES would be cracked. An amd64 3500+ running OpenBSD using the systems crypt(3) functions can hash 121,000 passwords in 1 second in 2005. So a slower hash algorithm was needed and one that could take more than 8 characters for the passwords. Many Operating Systems have implemented MD5 hashing which does 1880 crypts per second on the aforementioned OpenBSD system. OpenBSD went even further and designed an interesting hash of blowfish that has a variable setting for rounds that blowfish will encrypt the hash with the string "OrpheanBeholderScryDoubt" 64 times per round. The result is that with 12 rounds a crypt will do 2 passwords in 1 second.

One way hashing wasn't confined to just passwords, with the md5 and sha1 as well as the rmd160 commands one can make a cryptographic hash sum (or fingerprint) of a file or text in the system.

True private key cryptography was also present with the bdes and the openssl commands which could encrypt files with a variety of ciphers. Kiddo encryption was also to be found by means of the rot13 command (found in the games). The rot13 command is popular with Usenet Trolls.

Cryptography can also be found in the Apache web server, fetchmail, and various SMTP implementations.


Cheap cryptography

Rotational Ciphers based on the alphabet are CHEAP. Often used by Usenet trolls who think that the people they troll don't have a clue what they are talking about.

$ echo OrpheanBeholderScryDoubt | /usr/games/rot13
BecurnaOrubyqreFpelQbhog

rot13 is probably good to keep data safe from your 7 year old sister.

Another lovely and sucky type of cryptography is the XOR method, although XOR used as a One time pad is probably secure. Here is an example of a typical XOR encryption the xortext.c program is also available:

$ cat /etc/passwd | ./xortext blah | hexdump -C | head
00000000  10 03 0e 1c 58 46 5b 58  58 5c 5b 2b 0a 0d 13 04  |....XF[XX\[+....|
00000010  0b 09 41 4e 4e 40 4d 52  4d 1e 0e 07 16 56 4e 0a  |[email protected].|
00000020  0b 02 4e 1b 0a 66 05 09  07 01 0e 06 58 46 5b 59  |..N..f......XF[Y|
00000030  58 5d 5b 3c 0a 09 41 0c  07 1a 08 04 42 04 08 05  |X][<..A.....B...|
00000040  11 09 0d 0e 58 43 13 07  0d 18 5b 47 11 0e 08 06  |....XC....[G....|
00000050  4d 02 0e 04 0d 0b 08 06  68 03 11 0d 10 0d 15 07  |M.......h.......|
00000060  10 56 4b 52 50 56 54 52  31 15 12 1c 07 01 41 4e  |.VKRPVTR1.....AN|
00000070  58 43 0e 18 07 1e 00 1c  0d 1e 5b 47 11 0e 08 06  |XC........[G....|
00000080  4d 02 0e 04 0d 0b 08 06  68 0e 08 06 58 46 5b 5b  |M.......h...XF[[|
00000090  58 5b 5b 2a 0b 02 00 1a  0b 09 12 48 21 03 0c 05  |X[[*.......H!...|

Surprisingly some companies employ XOR cryptography in their products. Very sad.