[ TIL ] Symmetric Encryption

charco·2021년 10월 4일
0

나도TIL

목록 보기
44/55

Cryptography

Encryption

Encryption is the act of taking a message, called plaintext, and applying an operation to it, called a cipher.
So that you receive a garbled, unreadable message as the output, called ciphertext.

A cipher is actually made up of two components

  • Encryption Algorithm
    The encryption algorithm is the underlying logic or process that's used to convert the plaintext into ciphertext.

  • Key
    Introduces something unique into your cipher.

Kerckhoff's principle

This principle states that a cryptosystem,
or a collection of algorithms for key generation and encryption and decryption operations that comprise a cryptographic service should remain secure, even if everything about the system is known except for the key.

Shannon's maxim

The system should remain secure, even if your adversary knows exactly what kind of encryption systems you're employing, as long as your keys remain secure.

Frequency Analysis

Frequency analysis is the practice of studying the frequency with which letters appear in ciphertext.

Steganography

It's the practice of hiding information from observers, but not encoding it.


Symmetric Cryptograhpy

Symmetric-key algorithm

These types of encryption algorithms are called symmetric because they use the same key to encrypt and decrypt messages.

Substitution Cipher

A substitution cipher is an encryption mechanism that replaces parts of your plaintext with ciphertext.

  • Stream Cipher
    A stream cipher as the name implies, takes a stream of input and encrypts the stream one character or one digit at a time, outputting one encrypted character or digit at a time.

  • Block Cipher
    The cipher takes data in, places that into a bucket or block of data that's a fixed size, then encodes that entire block as one unit.

    Initialization Vector (IV)

    That's a bit of random data that's integrated into the encryption key and the resulting combined key is then used to encrypt the data.


    Symmetric Encryption Algorithm

    Data Encryption Standard (DES)

    One of the earliest encryption standards.
    DES is a symmetric block cipher that uses 64-bit key sizes and operates on blocks 64-bits in size.

    Key Length

    Key length is super important in cryptography since it essentially defines the maximum potential strength of the system.

    Advanced Encryption Standard (AES)

    AES uses 128-bit blocks, twice the size of DES blocks, and supports key lengths of 128-bit, 192-bit, or 256-bit.

    Rivest Cipher 4 (RC4)

    C4, or Rivest Cipher 4, is a symmetric stream cipher that gained widespread adoption because of its simplicity and speed.

    The preferred secure configuration is TLS 1.2 with AES GCM, a specific mode of operation for the AES block cipher that essentially turns it into a stream cipher. GCM, or Galois/Counter Mode, works by taking randomized seed value, incrementing this and encrypting the value, creating sequentially numbered blocks of ciphertexts.

    Pros & Cons of Symmetric Encryption

  • Pros
    easy to implement and maintain
    very fast and efficient at encrypting and decrypting large batches of data

  • Cons
    introduce some complications

profile
아직 배우는 중입니다

0개의 댓글