Cryptography
From Hackepedia
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 to listen in on network communication. 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, encrypted equivalents.
- 1 Cryptography found in UNIX
- 2 One way hashing
- 3 Symmetric cryptography
- 4 Public Key cryptography
- 5 Symmetric / Assymmetric Hybrids
- 6 Cheap cryptography
Cryptography found in UNIX
One way hashing
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 SHA, as well as the rmd160 commands one can make a cryptographic hash sum (or fingerprint) of a file or
text in the system. For example, if you want to ensure a file or directory has not been altered, you can print the checksum onto read-only media (i.e. paper/burn onto a cd). Whenever you run the checksum program against the same file or directory, you should get the same results unless something has been altered. If this topic interests you, tripwire is popular software you'll want to read more about.
Symmetric cryptography
True private key cryptography was also present with the bdes and the openssl commands which could encrypt files with a variety of ciphers. Some well known ciphers are DES, AES, blowfish, CAST128 and Arcfour. Many ciphers are imported through the openssl library.
Public Key cryptography
Also called assymetric cryptography. It uses 2 or more keys, usually one that's private and one that's public which is publically known. Ciphers include Diffie Hellman (DH), and RSA. GPG a program to encrypt mail on the application OSI layer uses this.
Symmetric / Assymmetric Hybrids
This method is used in OSI
session layer communication. A public-key exchange takes place to agree on a
session key which is
random and also a Symmetric encryption and all data following will be encrypted. This is used extensively in
ssh and most SSL enabled software.
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 type of cryptography is the XOR method. XOR used as a One time pad is potentially secure. Here is an example of a typical XOR encryption the
xortest.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 |..ANN@MRM....VN.|
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 as a secruity mechanism.
German - von Hackepedia
Verschlüsselung ist eine Methode Klartext in Geheimtext umzuwandeln, so dass
es nicht mehr verständlich ist für jemanden der nicht der gemeinte Empfänger
ist, zum beispiel, jemand der einen Packet Schnüffler benutzt um ein Netzwerk
auszuspähen. Nur wenn diese dritte Person den geheimen schlüssel weiss, kann
der Geheimtext gebrochen werden. Wir empfehlen dringend das jemand der ein
Protokoll im Internet benutzt, das nicht verschlüsselt ist, umsteigt auf
verschlüsselte kommunikation.
- 1 Verschlüsselung in UNIX
- 2 Ein-weg Hash Funktionen
- 3 Symmetrische Verschlüsselung
- 4 Public-Key Cryptography
- 5 Symmetrisch / Assymetrische Hybride
- 6 Billige Verschlüsselung
Verschlüsselung in UNIX
Ein-weg Hash Funktionen
Ein-weg Hash funktionen sind nicht nur limitiert zu Passwörtern. Mit der
md5 und SHA (und rmd160) kommandos kann man eine
Krypographische Prüfsumme (oder fingerabdruck) von einer Datei im System
erstellen. Dies ist gut um zu wissen ob sich eine Datei oder Verzeichniss
geändert hat. Man prüft ob sich der wert geändert hat und wenn er sich ge-
ändert hat dann hat sich die Datei eindeutlich geändert. Falls dieses
jemanden mehr Interessiert kann man das open source programm tripwire
ausprobieren.
Symmetrische Verschlüsselung
Echte Private Verschlüsselung gabs historisch in UNIX systemen mit den bdes
und Openssl Kommandos die mit verschiedenen Chiffren arbeiten. Ein par
gut gekannte chiffren sind DES, AES, blowfish, CAST128 und Arcfour. Viele
Verschlüsselungen sind importiert durch die OpenSSL bibliothek.
Public-Key Kryptographie
Wird auch Assymetrische Kryptographie genannt. Es benutzt zwei oder mehr
schlüssel, meistens einer der Privat ist und der/die andere/n der öffentlich
ist. Chiffren die es in diesem verfahren gibt heissen Diffie Hellman (DH) und
RSA. GPG ist ein Programm um e-mail zu Verschlüsseln auf der Application OSI
schicht, benutzt diese chiffren.
Symmetrisch/Assymetrische Hybride
Sind eine Methode die in der Internet Kommunikation, mit der OSI session
schicht arbeiten. Ein Public-Key chiffre-austausch geschiet und es wird
ein mit Zufallsgeneratoren gemachte Schlüssel ausgetauscht. Dann wird eine
Symmetrische Verschlüsselung mit diesem Schlüssel benutzt. Dieses verfahren
wird meist benutzt in SSH und SSL software.
Billige Kryptographie
Rotierende Chiffre basiert auf dem Alphabet sind billig. Oft benutzt von
Usenet Trolls die denken das andere ihre "verschlüsselung" nicht lesen
können.
$ echo OrpheanBeholderScryDoubt | /usr/games/rot13
BecurnaOrubyqreFpelQbhog
rot13 is warscheinlich gut genug um Daten von deiner
7 Jahre alten Schwester geheim zu halten.
Eine andere methode in kryptography ist die XOR methode aber XOR benutzt mit
einem One time pad ist warscheinlich sicher. Hier ist ein beispiel mit einer
typischen XOR verschlüsselung mit dem xortest.c
Programm:
$ 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 |..ANN@MRM....VN.|
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!...|
Leider benutzen manche Firmen noch immer XOR verschlüsselung in ihren
Produkten als Sicherung.
| Deutsch | English |
| Kryptography | cryptography |
| Chiffre | cipher |
| Prüfsumme | hash |
| Verschlüsselung | encryption |
| Schlüssel | key |