cryptography.html


* created: 2025-09-15T23:22
* modified: 2025-10-06T19:28

title

Cryptography

description

Cryptography is the science of securely transmitting messages by ensuring that secrecy, integrity, authenticity, anonymity and authentication are upheld. This is done using elements from number and probability theories.

Riddle me this

Cryptography is the scientific field that focuses on encrypting messages in such a way, that only the sender and the designated receiver can decode it, which is accomplished through ciphers. A secure encryption method encodes a message in such a way that the output alone does not provide any information besides maybe the length of the original message.

Cryptanalysis on the other hand, is the scientific field that focuses on decrypting those ciphers.

The modern cryptography focuses on 5 main aspects which are as follows:

  1. Secrecy: Only authorized entities can read the message.
  2. Integrity: The message can't be secretly manipulated.
  3. Authenticity: The message can be mapped to exactly one author.
  4. Anonymity: The author can't be identified.
  5. Authentication: Verification of the identity of an entity.

Kerckhoffs Principle

During the second world war the encryption methods where developed which are only based on number- and probability-theory. When using such an approach, the security of your method does no longer rely on the secrecy of the method itself (security through obscurity), but solely on the secrecy of the encryption key used for the encryption, which is also referred to as Kerckhoffs Principle.

Symmetric

This denotes that the cipher is base around one key, which is shared by sender and receiver. This is done through hash functions or block ciphers, which can be achieved using very efficient bit-wise operations.

Example: SHA-256, AES

Asymmetric

Asymmetric cryptography uses 2 key-pairs, one public and the other private. Anyone can encrypt a message using the public key, but only the entity that holds the private key can decrypt and read those messages. These encryption methods often use residual class arithmetic which tends to be roughly 1.000 - 10.000 times slower.

Example: RSA

Mathematical base

M: plain unencrypted message E: encryption method E^{-1}: decryption method K: key space C: encrypted message

The expression C=E(K,M) also written as C=E_{K}(M) would denote: "C is the image of M under the encryption function E parameterized by key K."