Sep 30, 2017 10:13 PM
(This post was last modified: Oct 1, 2017 12:16 PM by /wrists.)
Disclaimer (Click to View)
Hashes are used for...
Popular hash functions...
Click here to see all the hash functions side by side.
Asymmetric Encryption involves a public key/private key. If you're keeping up with this concept, that means there are TWO keys. The public key is as the name implies, publicly published where the private key is maintained in secrecy again, as implied by the name.
Block Ciphers (Click to View)
Stream Ciphers (Click to View)
![[Image: ysD4GD7.jpg]](https://i.imgur.com/ysD4GD7.jpg)
What is encryption and why should I care?
Code
In cryptography, encryption is the process of encoding a message or information in such a way that only authorized parties can access it. Encryption does not itself prevent interference, but denies the intelligible content to a would-be interceptor. In an encryption scheme, the intended information or message, referred to as plaintext, is encrypted using an encryption algorithm – a cipher – generating ciphertext that can only be read if decrypted. For technical reasons, an encryption scheme usually uses a pseudo-random encryption key generated by an algorithm. It is in principle possible to decrypt the message without possessing the key, but, for a well-designed encryption scheme, considerable computational resources and skills are required. An authorized recipient can easily decrypt the message with the key provided by the originator to recipients but not to unauthorized users.~Integrity~
Code
The concept of integrity insures that data has not been modified. We use "hashing" to ensure that integrity is retained. What is a hash? A hash is a number that is derived from performing a calculation on the data. Hashing cannot be reversed, which is why it is used so commonly in assuring integrity. (Take every absolute in technology with a grain of salt.) Safer practice to say, "in theory, hashing cannot be reversed."
Think of hashing like a glass window. If I threw a stone and shattered a glass window, you wouldn't be able to put it back together perfectly. With hashing, if I modify any part of a file, the hash will not return the same as the original hash.Hashes are used for...
- Verifying the integrity of files or messages
- Password verification
- Proof-of-work
- File or data identifier
- Pseudorandom generation and key derivation
Popular hash functions...
- MD5
- SHA-1
- SHA-256
- RIPEMD
Click here to see all the hash functions side by side.
~Confidentiality~
Code
When we talk confidentiality which is for intended audiences only, we are talking about ensuring the secrecy of certain content. This is where ENCRYPTION comes in.
Encryption scrambles/ciphers data to make it unreadable if intercepted. It heavily uses algorithm/keys.
There are two main forms of encryption. Asymmetric and symmetric.~Let's take a look at Asymmetric Encryption.~
Spoiler (Click to View)
Compared to the asymmetric encryption.
Spoiler (Click to View)
~What's more secure?~
Click here to find out. Asymmetric schemes seem to be more secure, but what are we measuring? Algorithmic encryption strength by itself? Mathematical involvement? The way keys are published?
~Types of Asymmetric Encrpyption~
Asymmetric Encryption involves a public key/private key. If you're keeping up with this concept, that means there are TWO keys. The public key is as the name implies, publicly published where the private key is maintained in secrecy again, as implied by the name.
~Asymmetric Encryption is often used for confidentiality and can be seen implemented in digital signatures.~
Code
Anyone with the public key is able to encrypt a message, providing confidentiality, and then only the person in possession of the private key is able to decrypt it.~Asymmetric Algorithms~
- DSA
- Elliptic curve cryptography
- RSA
- Diffie-Hellman key exchange
- Key Serialization
- X25519 key exchange
~Symmetric-Key Algorithm~
Code
Are algorithms for cryptography that use the same cryptographic keys for both encryption of plaintext and decryption of ciphertext.~Several ways of encryption.~
~Block Ciphers~
Code
Block ciphers take a number of bits and encrypt them as a single unit, padding the plaintext so that it is a multiple of the block size. Blocks of 64 bits were commonly used. The Advanced Encryption Standard (AES) algorithm approved by NIST in December 2001, and the GCM block cipher mode of operation use 128-bit blocks.~Stream Ciphers~
Code
Stream ciphers encrypt the digits (typically bytes) of a message one at a time.I've found two diagrams that best describe this concept.
Block Ciphers (Click to View)
Stream Ciphers (Click to View)
~Symmetric Implementations~

![[Image: scrypt.gif]](https://docs.oracle.com/cd/E19528-01/819-0997/images/scrypt.gif)
![[Image: q009800b.gif]](https://www.ibm.com/support/knowledgecenter/en/SSFKSJ_9.0.0/com.ibm.mq.sec.doc/q009800b.gif)
![[Image: ARrdyTL.png]](https://i.imgur.com/ARrdyTL.png)
![[Image: block-ciphers-3-638.jpg?cb=1428012295]](https://image.slidesharecdn.com/l-3-blockciphers-150402115310-conversion-gate01/95/block-ciphers-3-638.jpg?cb=1428012295)


