History UsefulNotes / Encryption

17th Jun '16 3:54:22 PM Doug86
Is there an issue? Send a Message


''Symmetric'' encryption is the classic form of encryption as is known today. The plaintext is encoded into ciphertext using a secret key; the recipient, to decode the message, must know the secret key that was used to encode it. The name refers to the fact that encryption and decryption are inverse functions and both use the same key to work (thus symmetrical). This was the first form devised -- primitive versions (simple substitutions of one letter for another, or shift-by-x codes like the [[https://en.wikipedia.org/wiki/Caesar_cipher Ceasar Cipher]]) go back to ancient times, with increasingly sophisticated variations being developed as [[LensmanArmsRace the arts of codemaking and codebreaking advanced]]. Eventually, the algorithms became so complex that machines (such as the Enigma device used in WorldWarII) were required to encrypt and decrypt messages with reasonable speed and accuracy.

to:

''Symmetric'' encryption is the classic form of encryption as is known today. The plaintext is encoded into ciphertext using a secret key; the recipient, to decode the message, must know the secret key that was used to encode it. The name refers to the fact that encryption and decryption are inverse functions and both use the same key to work (thus symmetrical). This was the first form devised -- primitive versions (simple substitutions of one letter for another, or shift-by-x codes like the [[https://en.wikipedia.org/wiki/Caesar_cipher Ceasar Cipher]]) go back to ancient times, with increasingly sophisticated variations being developed as [[LensmanArmsRace the arts of codemaking and codebreaking advanced]]. Eventually, the algorithms became so complex that machines (such as the Enigma device used in WorldWarII) UsefulNotes/WorldWarII) were required to encrypt and decrypt messages with reasonable speed and accuracy.
30th May '16 8:03:52 AM shermanramni
Is there an issue? Send a Message


* Use good passwords. Single words that can be [[ThePasswordIsAlwaysSwordfish easily guessed]] will easily fold under a dictionary attack, and short passwords are relatively easy to brute-force. There are lots of resources regarding strong password generation on the web.
* Keep the keys secret! This is pretty obvious, if someone knows the key, your encryption is ''fucked''.
* Choose the algorithm carefully! Don't use any algorithm that has been cracked (such as the Enigma)! And whatever you do, NEVER make up your own encryption. For that matter, try to avoid writing your own code to implement existing cryptosystems too, and use existing protocols and libraries as much as possible. Encryption is notoriously difficult to get right, and you almost certainly won't.
* Be weary of tells, habits, and other repeated phrases you use. What allowed code breakers to defeat Enigma (among other things) was that the German military always sent the same type of message at specific times and ended each message the same.

to:

* Use good passwords. Single words that can be [[ThePasswordIsAlwaysSwordfish easily guessed]] will easily fold under a dictionary attack, and short passwords are relatively easy to brute-force. There are lots of resources regarding strong password generation on the web.
web.[[labelnote:Why?]]A strong password is a password that cannot be easily guessed, because that forces the attacker to run a whole brute-force attack, and in a properly designed and implemented cryptosystem, that can be completely unfeasible. Check [[http://archive.is/JFopd here]] for an analysis of brute-forcing AES.[[/labelnote]]
* Keep the keys secret! This is pretty obvious, if someone knows the key, your encryption is ''fucked''.
''fucked''.[[labelnote:Why?]]A good cryptosystem only needs the key to be secret to ensure resistance to attacks. If your newest, groundbreaking cryptosystem needs to be kept secret to ensure security, then it's not a good cryptosystem.[[/labelnote]]
* Choose the algorithm carefully! Don't use any algorithm that has been cracked (such as the Enigma)! And whatever you do, NEVER make up your own encryption. For that matter, try to avoid writing your own code to implement existing cryptosystems too, and use existing protocols and libraries as much as possible. Encryption is notoriously difficult to get right, and you almost certainly won't.
won't.[[labelnote:Why?]]A good cryptosystem is not something you get just with good ideas. There has to be a lot of analysis, testing and study to get something decent. Even opening the box and using an oscilloscope to read voltage levels can reveal things about your cryptosystem an attacker can and will use to break it, so covering all possible attack vectors, getting the math right in all cases and providing for all use cases is not something you can achieve alone and in a few months of furious coding. Professionally designed and implemented algorithms, like Rijndael, SHA and RSA got exactly the kind of attention needed to turn them into strong, efficient cryptosystems and that took lots of time and money. You wanna do it anyway? Fine, but at least let the crypto community peer-review your idea and listen to their criticism.[[/labelnote]]
* Be weary of tells, habits, and other repeated phrases you use. What allowed code breakers to defeat Enigma (among other things) was that the German military always sent the same type of message at specific times and ended each message the same.
same.[[labelnote:Why?]]Routine is the bane of security, and a good social engineer can see the patterns in your thought process that allow them to crack your passwords. Or simply deceiving you into giving them away. In the other side, a good cryptosystem is one where the ciphertext is indistinguishable from a random output (meaning, if we simply generate a random stream of characters and put it besides a ciphertext, no one can tell you which is which). If a ciphertext has a noticeable pattern, an attacker can deduce things about the cryptosystem and can use those things as attack vectors (example: there was a cryptosystem that had the annoying habit of making the first bit of every encryption block 0, and that was not a concern until someone noticed that it effectively reduced the message space by half, making brute-force feasible.)[[/labelnote]]
1st Feb '16 8:31:33 PM xenol
Is there an issue? Send a Message


A novel method based on one-time pads is the cryptographic nonce ('''N'''umber used '''once'''). This is often used in challenge-response type authentication. In this, the Alice gives the Bob a nonce and asks for a password. The password is encrypted with that and sent back. Alice then does the same thing on her end and if the outputs match, she knows Bob is legitimate. This is to prevent an eavesdropper from using Bob's response, even though they don't know Bob's password.

However, the eavesdropper 'Eve' can pretend to be Alice and ask Bob, Charlie, and others and build tables to find out their passwords. To circumvent that, Bob can send his own nonce, encrypt the password with both his nonce and the one given to him, and send that. Since Bob is using a random value with every response, it makes it harder for Eve to figure out what the password is.

to:

A novel method based on one-time pads is the cryptographic nonce ('''N'''umber used '''once'''). This is often used in challenge-response type authentication. In With this, the Alice gives the Bob a nonce and asks Bob for a password. The Bob encrypts the response with the nonce and sends it over to Alice. Alice encrypts the password is encrypted with that and sent back. Alice then does the same thing on her end nonce generated and if the outputs match, it matches Bob's response, then she knows it's Bob. Every time Alice asks for a password, she gives Bob is legitimate. a new nonce. This is to prevent an eavesdropper someone from using Bob's response, even though they don't know Bob's password.

old responses.

However, the eavesdropper 'Eve' there's a trick to this. Eve, an eavesdropper, can pretend to be Alice and ask Bob, Charlie, and others and build tables to find using the same nonce. From their responses, Eve can try figure out their passwords just by brute forcing, or using a dictionary of known passwords. To circumvent that, combat this, Bob can also send his own nonce, encrypt the password with both his a nonce and with the one given encrypted response (encrypted with everything), which Alice can use on her end to him, and send that. Since see if Bob is legitimate. Since Alice and Bob are both using nonces, Eve will have a random value with every response, it makes it harder for Eve to figure time figuring out what the password is.
password.
18th Dec '15 2:23:25 PM MRAustin
Is there an issue? Send a Message


''Symmetric'' encryption is the classic form of encryption as is known today. The plaintext is encoded into ciphertext using a secret key; the recipient, to decode the message, must know the secret key that was used to encode it. The name refers to the fact that encryption and decryption are inverse functions and both use the same key to work (thus symmetrical). This was the first form devised -- primitive versions (simple substitutions of one letter for another) go back to ancient times, with increasingly sophisticated variations being developed as [[LensmanArmsRace the arts of codemaking and codebreaking advanced]]. Eventually, the algorithms became so complex that machines (such as the Enigma device used in WorldWarII) were required to encrypt and decrypt messages with reasonable speed and accuracy.

to:

''Symmetric'' encryption is the classic form of encryption as is known today. The plaintext is encoded into ciphertext using a secret key; the recipient, to decode the message, must know the secret key that was used to encode it. The name refers to the fact that encryption and decryption are inverse functions and both use the same key to work (thus symmetrical). This was the first form devised -- primitive versions (simple substitutions of one letter for another) another, or shift-by-x codes like the [[https://en.wikipedia.org/wiki/Caesar_cipher Ceasar Cipher]]) go back to ancient times, with increasingly sophisticated variations being developed as [[LensmanArmsRace the arts of codemaking and codebreaking advanced]]. Eventually, the algorithms became so complex that machines (such as the Enigma device used in WorldWarII) were required to encrypt and decrypt messages with reasonable speed and accuracy.
25th Mar '15 1:54:44 PM xenol
Is there an issue? Send a Message

Added DiffLines:

A novel method based on one-time pads is the cryptographic nonce ('''N'''umber used '''once'''). This is often used in challenge-response type authentication. In this, the Alice gives the Bob a nonce and asks for a password. The password is encrypted with that and sent back. Alice then does the same thing on her end and if the outputs match, she knows Bob is legitimate. This is to prevent an eavesdropper from using Bob's response, even though they don't know Bob's password.

However, the eavesdropper 'Eve' can pretend to be Alice and ask Bob, Charlie, and others and build tables to find out their passwords. To circumvent that, Bob can send his own nonce, encrypt the password with both his nonce and the one given to him, and send that. Since Bob is using a random value with every response, it makes it harder for Eve to figure out what the password is.
2nd Mar '15 7:23:04 AM SteveMB
Is there an issue? Send a Message


The problem for the user is that memorizing a truly random string of characters is very difficult. It's easier to use actual words as passwords. However, this is more vulnerable to brute-force attack: the number of words in the dictionary is ''much'' smaller than the number of random combinations of characters. Using "leetspeak" substitutions of other characters for letters and using unusual words ''may'' defeat a dictionary attack; however, sophisticated attackers will use an exhaustive vocabulary and try leetspeak as well as standard spellings.

to:

The problem for the user is that memorizing a truly random string of characters is very difficult. It's easier to use actual words as passwords. However, this is more vulnerable to brute-force attack: the number of words in the dictionary is ''much'' smaller than the number of random combinations of characters. Using odd spelling (such as "leetspeak" substitutions of other characters for letters letters) and using unusual words ''may'' defeat makes a dictionary attack; attack more difficult; however, sophisticated attackers will use an exhaustive vocabulary and try leetspeak as well as standard spellings.
a range of variations for each word.



Of course, if the encryption algorithm itself is weak, even an unguessable password won't help you. Cryptographers consider an algorithm broken if there is a way to figure out the key faster than brute forcing it. Sometimes, this is only of theoretical interest (for example, even with the speedup it would still take longer than the age of the universe). Othertimes the algorithm is so broken that the key can easily be recovered in a practical amount of time. There are a large variety of attack techniques using advanced math, and new cryptosystems are expected to show evidence of resistance to them. If after years of analysis by expert cryptographers there aren't any practical attacks discovered, then it's considered probably secure. That little code you created yourself, however, doesn't stand a chance.

to:

Of course, if the encryption algorithm itself is weak, even an unguessable password won't help you. Cryptographers consider an algorithm broken if there is a way to figure out the key faster than brute forcing it. Sometimes, this is only of theoretical interest (for example, even with the speedup it would still take longer than the age of the universe). Othertimes Other times the algorithm is so broken that the key can easily be recovered in a practical amount of time.quickly and easily. There are a large variety of attack techniques using advanced math, and new cryptosystems are expected to show evidence of resistance to them. If after years of analysis by expert cryptographers there aren't any practical attacks discovered, then it's considered probably secure. That little code you created yourself, however, doesn't stand a chance.



The knowledge of the plaintext or parts of the plaintext (so-called cribs) can make a cryptanalysis problem exponentially easier. The plaintext - or parts of - could be acquired by old-fashioned spying or, more inventively, by [[FeedTheMole feeding the mole]]. This is called a [[https://en.wikipedia.org/wiki/Known_plaintext_attack known plaintext attack]].

to:

The knowledge of the plaintext or parts of the plaintext (so-called cribs) "cribs") can make a cryptanalysis problem exponentially easier. The plaintext - or parts of - could be acquired by old-fashioned spying or, more inventively, by [[FeedTheMole feeding the mole]]. This is called a [[https://en.wikipedia.org/wiki/Known_plaintext_attack known plaintext attack]].
30th Jan '15 12:25:00 AM Elusivehawk
Is there an issue? Send a Message

Added DiffLines:

19th Jan '15 11:09:04 AM xenol
Is there an issue? Send a Message



to:

* Be weary of tells, habits, and other repeated phrases you use. What allowed code breakers to defeat Enigma (among other things) was that the German military always sent the same type of message at specific times and ended each message the same.
8th Jan '15 6:47:13 AM SteveMB
Is there an issue? Send a Message


And then (as the xkcd comic at the top of the page illustrates) there's the age-old standby of ''rubber hose cryptanalysis'' -- [[TortureAlwaysWorks beating/torturing]] the key out of a holder. (The name comes from the rather vivid image of the keyholder being beaten across their bare feet with a rubber hose). This does not have a direct counter, but many applications (such as [[http://www.truecrypt.org/ Truecrypt]]) allow a defense based on [[https://en.wikipedia.org/wiki/Plausible_deniability plausible deniability]] for an encrypted volume to decrypt to a 'decoy', which hides a ''second'' encrypted volume with a different key. Thus, someone coerced into giving up a key can [[InfractionDistraction reveal one secret while hiding a bigger one]]. The interrogator may suspect the presence of a hidden inner volume, but its existence can not be proved or disproved.[[note]]It is technically possible to look for ''clues'' relating to one, normally via forensic analysis of a disk surface, but this is prohibitively expensive and difficult even for governments, and is in no way definitive proof. And even if they do pry the existence of the hidden volume out of you, there's no rule that the "hidden" volume cannot itself be another decoy...[[/note]]

to:

And then (as the xkcd comic at the top of the page illustrates) there's the age-old standby of ''rubber hose cryptanalysis'' -- [[TortureAlwaysWorks beating/torturing]] the key out of a holder. (The name comes from the rather vivid image of the keyholder being beaten across their bare feet with a rubber hose). This does not have a direct counter, but many applications (such as [[http://www.truecrypt.org/ Truecrypt]]) [[https://veracrypt.codeplex.com/ VeraCrypt]]) allow a defense based on [[https://en.wikipedia.org/wiki/Plausible_deniability plausible deniability]] for an encrypted volume to decrypt to a 'decoy', which hides a ''second'' encrypted volume with a different key. Thus, someone coerced into giving up a key can [[InfractionDistraction reveal one secret while hiding a bigger one]]. The interrogator may suspect the presence of a hidden inner volume, but its existence can not be proved or disproved.[[note]]It is technically possible to look for ''clues'' relating to one, normally via forensic analysis of a disk surface, but this is prohibitively expensive and difficult even for governments, and is in no way definitive proof. And even if they do pry the existence of the hidden volume out of you, there's no rule that the "hidden" volume cannot itself be another decoy...[[/note]]
16th Apr '14 3:43:43 PM 7brokenbricks
Is there an issue? Send a Message


* Use good passwords, Avoid words that can be [[ThePasswordIsAlwaysSwordfish easily guessed]]; in fact, avoid words that can be found in the dictionary, period.

to:

* Use good passwords, Avoid passwords. Single words that can be [[ThePasswordIsAlwaysSwordfish easily guessed]]; in fact, avoid words that can be found in guessed]] will easily fold under a dictionary attack, and short passwords are relatively easy to brute-force. There are lots of resources regarding strong password generation on the dictionary, period.web.
This list shows the last 10 events of 45. Show all.
http://tvtropes.org/pmwiki/article_history.php?article=UsefulNotes.Encryption