-
-
Notifications
You must be signed in to change notification settings - Fork 357
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a Cryptography Chapter #278
Changes from 8 commits
3cf4501
e0ae690
8399bf6
9769cfc
66357a2
4db1c45
481887a
c956d1e
8d132c4
c3d0f2e
1647c7d
e154598
347a55f
43a1fc4
fa2258d
2d7ba69
063285b
f71d478
efd013d
b0b10e8
6d678a7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,4 +48,7 @@ Max Weinstein | |
<br> | ||
Gibus Wearing Brony | ||
<br> | ||
Julian | ||
<br> | ||
Arun Sahadeo | ||
<br> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Cryptography | ||
|
||
For a long time humans wanted to send secret messages that only the reciever understands. | ||
The first encryption algorithms go back to the ancient greeks and romans. | ||
One of the most well known encryptions is the so called "Caeser Cipher" which was supposedly used by Julius Caeser. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The Caesar cipher obviously needs it's own chapter, so we'll link to that when it exists. |
||
In general there are two different principle of encryption, symmetric and asymmetric encryption. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This sentence seems out of place. You mention these two methods, but don't talk about what they are until later. It' might be better to move this to the bottom. |
||
To explain the two principles I have to introduce you to two people. Enter Alice and Bob. | ||
These two names are very common when reading about cryptography. | ||
A third and (usually) evil person is also needed and that person is called Charlie. | ||
The way these three people are set up are so that Alice and Bob want to exchange messages without Charlie knowing what they said. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This paragraph is rather long. Maybe something like:
|
||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We need to connect to the next section. I think it flows better to talk about the different types of encryption before talking about the general principles... Simply because the the general principles section also provides advice. I would maybe add the sentence from above here:
|
||
## General principles of Cryptography | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Capitalize the p There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't know if I understand this section. It seems to be talking about implementation details for creating your own cryptographic system, but that is beyond the scope of the AAA. We care about the algorithms, but not about protecting someone from an attack. Maybe we should say something like:
From here, I don't know what to add, though. I kinda feel this section should be removed, as none of the following points seem relevant. |
||
|
||
* Don't underestimate the attacker. | ||
This is important because you don't know what resources an attacker has. | ||
It is always better to assume that they have a considerable amount of knowledge and computing power of the current global computing power. | ||
* If you devise a new algorithm let a cryptanalyst meassure a robustness of your algorithm. | ||
Do *NOT* claim it is strong (unless you have the knowledge and proofs needed) without talking to a specialist because only they, if at all, should be able to determine whether the algorithm is good or not since cryptography and security go hand in hand. | ||
* Kerckhoffs's principle says that when determing the robustness of a cryptosystem it should be assumed that the attacker knows the encryption and decryption algorithm. | ||
This does not include any pre-shared or secret keys. | ||
* Adding complications don't necessarily make the algorithm better or safer. | ||
* Always account for wrong design, implementation and usage of cryptosystems. | ||
A good example for a wrong implementation is WPA2 (the algorithm which encrypts WiFi traffic). This algorithm was mathematically proven to be safe yet an error in the implementaion allowed for the "Krack" attack. | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Somewhere in this article, we need to mention quantum computing. One of the major reasons it is such a big deal is because it has a heck of a lot of raw power that will completely blow modern cryptographic systems out of the water. This is why quantum cryptography is such a hot topic. I don't know if it should be added here or with the asymmetric stuff. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It should probably be with the asymmetric stuff, since quantum computing only really affects that because it's good against the descrete logarithm which asymmetric crypto relies on. Symmetric crypto and hashing stays relatively untouched by it There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @leios There are also several basic assumptions that modern cryptography relies on (if you multiply two large primes, it's hard to get the original primes back out) which other quantum computing techniques (carefully sculpted waveforms + observation) could invalidate, but it's unknown if they will yet. That's... probably too much detail for an introductory thing on crypto in general, though; maybe a linked chapter on quantum-resistant crypto? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would settle for a small |
||
## Symmetric Cryptography | ||
|
||
Symmetric cryptography is called symmetric because the way you encrypt a message is the same as the way to decrypt a message. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A bit clunky because of using "symmetric" too much.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Okay after reading through that sentence again I realized that this sentence isn't actually correct. The thing that is the same is the key not the encryption/decryption method. |
||
For this to work Alice and Bob both need the same key, which they have to share before communicating. | ||
Some examples for symmetric cryptography are: | ||
* The afore mentioned Caeser Cipher. Here Alice and Bob have to know the rotation of the alphabet which is the key in this algorithm. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. remove "The afore mentioned" so it fits with the rest of the items on the list. maybe change the formatting of all items to:
|
||
* Rot13 is a special case of the Caeser Cipher. The alphabet gets rotated by 13 (that is why it's called Rot13) so it would be Caeser with the key of 13. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
* Permutation Cipher. Here you choose a permutation $$\pi$$ (i.e. $$\pi=(3,1,2,4)$$) and reorder the the letters according to that $$\pi$$ which is the key. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
* XOR encryption. Here you generate a bit string which is exactly as long as the message you want to encrypt and just XOR them together. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
* DES or Data Encryption Standard. This is a newer encryption algorithm which was standardized in 1977. | ||
It has since been deemed unsecure and is superseded by AES. | ||
* AES or Advanced Encryption Standard. The actual algorithm is called "Rijndael". | ||
Like with XOR or DES you generate a bit string (depending on which AES you use 128/192 or 256 bit long) which is your key. | ||
* Blowfish. This algorithm also was a good contender for the AES but lost to Rijndael. | ||
|
||
leios marked this conversation as resolved.
Show resolved
Hide resolved
|
||
## Asymmetric Cryptography | ||
|
||
Asymmetric Cryptography is sometimes called "Public key cryptography" because Bob and Alice both need a public and a private key of which they only share the public key. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
This makes these algorithms asymmetric because what is encrypted with the public key can only be decrypted with the private key and vice versa. | ||
This has numerous fields of application. It is not only used for encrypting messages, but also for digital signing. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Clunky
Add a newline here to start a new paragraph. You wrote "numerous," so there are probably a few more examples to add. |
||
Digital signing is used to make sure that the recieved message actually originates from the person who claims to have written it and you can also make sure nothing got altered. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This can probably be removed? |
||
So for example Alice wants to send a message to Bob and Bob wants to make sure the message is actually from Alice and arrived the way it was send out. | ||
For that Alice encrypts the message with her private key. | ||
This is *NOT* so that Charlie can't read the message, since both Bob and Charlie have Alices private key. | ||
What both of them don't have is the private key. | ||
So Charlie can't decrypt, alter and encrypt the message again without Bob noticing it, because it wouldn't decrypt anymore with Alices public key. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
Some examples for public key cryptography: | ||
* RSA. This algorithm calculates a public and a private key from two very large primes. It is (hopefully) near impossible to factor the product of two such primes in a feasable amount of time. | ||
* ECC or Elliptic-curve cryptography. Here you calulate the private and public key from two points on an elliptic curve. This has the positive side effect that you need smaller numbers than non-ECC algorithms like RSA to achieve the same level of security. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Both of these should be changed to the other format:
At the end of this section, we need to mention the same thing as above:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A bit clunky. Maybe something like: