KIM COMPUTER


One Time Pad (OTP) Encryption

One Time Pad encryption is virtually impossible to crack.
The encryption key is used only once, ensuring the highest level of integrity and confidentiality.
The key is generated randomly and is exactly the same size as the plaintext message.

The Core: Secure Key Exchange

The most critical part of this method is the secure exchange of keys.

Think back to the early 2000s when home banking was just starting. You had to physically visit the bank to receive your OTP device (token).
This illustrates that verifying identity in person and physically handing over the device is the safest method.

Real world Example: Secure Communication

These characteristics fit military purposes perfectly.
Let's assume Alice is a Division Commander, and Bob and Carol are Battalion Commanders (Alice outranks them). Alice wants to establish a top-secret communication line with them.

1. Pre distribution of Keys

2. Communication Phase

Vulnerabilities

If the key is stolen, the encryption is broken. Therefore, it is best practice to keep the key in an environment disconnected from the network.

Just like keeping a banking OTP token in a safe drawer, in this scenario, you should isolate the computers: use an offline computer for the actual work (encryption/decryption) and use a network-connected computer only for transmitting the files.

A Binary Perspective

Alice Sends a Message

Alice is happy with Bob's performance and wants to send the letter A securely.

  1. A in ASCII is decimal 65, which is 0100 0001 in binary.
  2. Alice looks up her random key. The first unused portion looks like 1010 0011.
  3. They agreed on a rule: 0 means keep the number, 1 means flip the number.
  4. Using this rule, Alice gets the ciphertext 1110 0010.

Interestingly, flipping the plaintext based on the key yields the same result as flipping the key based on the plaintext.

Plaintext 0 1 0 0 0 0 0 1
Key 1 0 1 0 0 0 1 1
Ciphertext 1 1 1 0 0 0 1 0

Bob's Decryption Process

  1. Bob receives the number 1110 0010 over the public network.
  2. Bob reads the key from the same position on his hard drive and finds 1010 0011.
  3. He applies the same rule agreed upon with Alice.
  4. Bob gets the result 0100 0001.
  5. Looking this up in the ASCII table, he finds the plaintext A.
  6. Bob now knows for sure that Alice sent him an "A".
Ciphertext 1 1 1 0 0 0 1 0
Key 1 0 1 0 0 0 1 1
Plaintext 0 1 0 0 0 0 0 1

The XOR Operation

This logic is technically known as the XOR (Exclusive OR) operation.

It is similar to addition, so you can interpret it as adding bits, but with a twist: 1+1=0. * This is because binary cannot represent 2 in a single bit. * There is no carry to the next digit (unlike regular addition). * Each bit position is calculated independently.

Input 1 Input 2 Result
0 0 0
0 1 1
1 0 1
1 1 0