Skip to the content.

Cryptography Basics

Cryptography

The science and practice of securing communication and information through encoding, ensuring only authorized parties can access it. Its purpose is to protect data integrity, confidentiality, and authenticity.

Obfuscation

Data Masking or Obfuscation

Obfuscation is a technique to make code, data, or communications harder to understand or analyze.

How It Works

Considerations

Steganography

Steganography and obfuscation are techniques used to conceal information, but they differ in their methods and objectives.

Derived from Greek word, meaning “covered writing”, Steganography hides secret data within ordinary, non-secret files or messages. Its purpose is not to prevent unauthorized access, but to avoid suspicions.

We can try this at Steganography Online.. We’ll use the sample photo below:

The message that we want to hide in the image:

All right men, commence Operation: Special Delivery! 

Upload the photo and enter the message in the field. Click Encode.

It will generate the encoded image.

Right-click on the third image > Save as. Then check the properties of the original photo and the encoded photo. We can see that the size changed.

Tokenization

Tokenization replaces sensitive information with non-sensitive tokens, enhancing data security by removing direct exposure to confidential data.

How It Works

Applications

Considerations

Diffusion

Diffusion spreads the effect of a single input across many output elements, thus obscuring patterns.

Confusion

Confusion creates complex relationships between the key and ciphertext, making it difficult to infer the key.

Types of Encryption

These types of encryption play critical roles in modern cybersecurity, often used together to achieve a balance of speed and security.

Symmetric Encryption

Symmetric cryptography uses the same key for both encryption and decryption. The sender and receiver must share this key, keeping it secret from others.

Symmetric encryption is generally faster and less computationally intensive compared to asymmetric cryptography. It is also effective for encrypting large volumes of data.

Sending the key:

Disadvantages:

Use Cases:

Asymmetric Encryption

Asymmetric cryptography uses a pair of keys:

The public key can be shared openly, but the private key must remain confidential.

Example Algorithms:

Advantages:

Disadvantages:

Use Cases:

Hybrid Implementation

Utilizes asymmetric encryption to securely transfer a private key, which can then be used with symmetric encryption.

Storing Keys

Best practices:

Ciphers

A cipher is an algorithm used to encrypt and decrypt information, transforming plain text into coded (cipher) text and vice versa.

Types of Ciphers:

Stream Ciphers

Stream Ciphers encrypt data bit by bit or byte by byte in a continuous stream.

Common Features:

Examples:

Block Ciphers

Block Ciphers break the input into fixed-size blocks (e.g., 64-bit or 128-bit) and performs the encryption on each block.

Common Features:

Examples:

Common Ciphers

Cease Cipher

Named after Julius Caesar, it is a simple substitution cipher where each letter in the plaintext is shifted a certain number of positions down or up the alphabet.

Although it’s historically significant, the Caesar Cipher is not used for serious encryption today due to its simplicity and vulnerability to straightforward cryptanalysis

Vigenere Cipher

The Vigenère Cipher is a type of polyalphabetic substitution cipher that uses a repeating key phrase to determine shifting patterns for each letter in the plaintext, offering greater security than simple substitution ciphers.

Strengths:

Weaknesses:

Example:

Exlusive OR (XOR)

Exclusive OR (XOR) is a binary operation used extensively in cybersecurity and cryptography. It operates on bits, returning 1 if the bits are different and 0 if they are the same. Here’s a concise description with key bullet points:

Applications:

Security Considerations:


Back to main page