1 of 10

Encoding vs Encryption

Lancashire Cyber Festival 2025

1

2 of 10

Encoding and Decoding

  • How to take information and put it in a format that can be understood
  • Dependent on communication medium and the entities communicating

2

Sender

Receiver

Encode

Decode

Encode

Decode

1. Sender encodes message

Communication Medium

2. Receiver decodes message

3. Receiver encodes response

4. Sender decodes response

3 of 10

Historical Example – Morse Code

  • Encode text into dots and dashes
  • May be transmitted as sound, light or electronic signal
  • Vary timing to convey information
    • Dot = 1 unit
    • Dash = 3 units
    • Space between parts of the same letter = 1 unit
    • Space between letters = 3 units
    • Space between words = 7 units
  • Unit of what? – Time
    • Amount of time relative to how long you make a dot

3

4 of 10

Modern Example - Binary

  • Computers interpret strings of binary digits depending on what we say the content is
  • The text “hello world” in binary is:0110100001100101011011000110110001101111001000000111011101101111011100100110110001100100
  • Why? Because we have agreed that these 8-bit numbers map to these characters
  • 011010002 = 10410 = h�011001012 = 10110 = e�011011002 = 10810 = l�011011002 = 10810 = l�011011112 = 11110 = o�001000002 = 3210 = [SPACE]�011101112 = 11910 = w�011011112 = 11110 = o�011100102 = 11410 = r�011011002 = 10810 = l�011001002 = 10010 = d

4

5 of 10

Problem with Encoding and Decoding

  • An eavesdropper can listen in on what you say

5

Sender

Receiver

Encode

Decode

Encode

Decode

1. Sender encodes message

Communication Medium

2. Receiver decodes message

3. Receiver encodes response

4. Sender decodes response

Eavesdropper

Decode

6 of 10

Encrypting and Decrypting

  • Encryption and Decryption aims to prevent an eavesdropper from being able to interpret the messages
  • Information still needs to be encoded and decoded over the communication medium

6

Sender

Receiver

Encode

Decode

Encode

Decode

1. Sender encodes message

Communication Medium

2. Receiver decodes message

3. Receiver encodes response

4. Sender decodes response

Decrypt

Decrypt

Encrypt

Encrypt

Plaintext = message

Ciphertext = encrypted message

7 of 10

Historical Example – Caesar Cipher

  • Take each letter in the alphabet,
  • shift it to the left or right by some number,
  • use this to make a mapping from the plaintext to ciphertext
  • and ciphertext to plaintext

  • Example: a shift of 8
  • Encrypting “HELLO WORLD” would produce “ZWDDG OGJDV”
  • Easy to break by trying all 25 combinations of shifts

7

A

B

C

D

E

F

G

H

I

J

K

L

M

N

O

P

Q

R

S

T

U

V

W

X

Y

Z

S

T

U

V

W

X

Y

Z

A

B

C

D

E

F

G

H

I

J

K

L

M

N

O

P

Q

R

8 of 10

Historical Example – Substitution Cipher

  • Generalisation of the Caesar Cipher
  • Instead of shifting, why not map characters out of order

  • Example:
  • Encrypting “HELLO WORLD” would produce “YATTJ GJVTD”
  • Easy to break by trying all possible mappings

8

A

B

C

D

E

F

G

H

I

J

K

L

M

N

O

P

Q

R

S

T

U

V

W

X

Y

Z

R

P

I

D

A

Q

H

Y

B

K

C

T

E

O

J

S

Z

V

M

N

U

X

G

L

F

W

9 of 10

Historical Example – Vigenère Cipher

  • Caesar Cipher, but use a key to specify what the shifts are
  • Use different shifts depending on which letter in the key you use

Example:

  • Encrypting “HELLO WORLD” with the key “AB”, would produce “HFLMO XOSLE
  • Non-bold characters encrypted with A
  • Bold characters encrypted with B
  • Break by trying all possible mappings

9

10 of 10

Better way to break things

  • Some letters are more common than others in the English language
  • E is the most common
    • Maybe the most common ciphertext letter is actually an E in plaintext?
  • Also think about word structure
    • How many 1, 2 or 3 letter words do you know?

10