strangerRidingCaml

1. Introduction to Cryptography 본문

Modern cryptography

1. Introduction to Cryptography

woddlwoddl 2024. 5. 6. 16:13
728x90
Introduction to Cryptography

Introduction to Cryptography

Historical Overview

Cryptography has a long history dating back to ancient civilizations such as Caesar and Spartan. In the modern era, cryptography played a crucial role during WWII, with the development of the Enigma machine by the Germans and efforts by Allied cryptanalysts to break its codes.

Basic Cryptographic Concepts and Terminology

Cryptography is the science of securing communication and data from unauthorized access. Key concepts include plaintext, ciphertext, encryption, decryption, keys, and algorithms.

Security Goals

  • Confidentiality: Ensures that only authorized parties can access and understand the information.
  • Integrity: Guarantees that the data remains unchanged and uncorrupted during transmission or storage.
  • Authentication: Verifies the identity of communicating parties to prevent impersonation.
  • Non-repudiation: Prevents individuals from denying their actions or transactions.

Cryptographic Adversaries and Threat Models

Cryptographic systems must defend against various adversaries such as eavesdroppers, man-in-the-middle attackers, and malicious insiders. Threat models outline potential attacks and help design robust cryptographic protocols.


Laboratory Activities

Lab 1: Encryption and Decryption in Python


# Simple Caesar cipher implementation
def caesar_cipher(text, shift):
    result = ""
    for char in text:
        if char.isalpha():
            shift_amount = shift % 26
            if char.islower():
                shifted_char = chr((ord(char) - ord('a') + shift_amount) % 26 + ord('a'))
            else:
                shifted_char = chr((ord(char) - ord('A') + shift_amount) % 26 + ord('A'))
            result += shifted_char
        else:
            result += char
    return result

plaintext = "Hello World"
shift = 3
ciphertext = caesar_cipher(plaintext, shift)
print("Plaintext:", plaintext)
print("Ciphertext:", ciphertext)

This lab demonstrates a simple implementation of the Caesar cipher encryption and decryption algorithm in Python.

'Modern cryptography' 카테고리의 다른 글

6. Cryptographic Protocols  (0) 2024.05.06
5. Hash Functions and Digital Signatures  (0) 2024.05.06
4. Public-Key Cryptography  (0) 2024.05.06
3. Symmetric Cryptography  (0) 2024.05.06
2. Classical Cryptography  (0) 2024.05.06