Sunteți pe pagina 1din 9

An Encryption Primer

In its simplest terms, encryption is simply a way of creating messages that


are only readable by someone with previous knowledge, usually a password
of some sort.

Historical encryption
Being able to communicate, privately, with another person has always been
a concern for humans, and the focus of no small amount of work.
The oldest examples of encryption we have are from as long ago as 2000
b.c. where we find encrypted recipes for pottery glaze (a booming industry
at the time) in Mesopotamia, and throughout the ages to modern times
there are countless examples of encryption being used not just in business
and espionage, but in personal life as well.
Our communications have always been ripe for interception, people
evesdropping in a pub, postal carriers opening mail, carrier pigeons being
intercepted by hawks (according to Game of Thrones), or anyone with a
radio listening to Telegrams in the last century; given this fact, the ability to
communicate securely should be a basic skillset.

The Masonic Cyper


Made famous by friend of the craft Dan Brown in The Lost Symbol, The
Pigpen encryption is a human friendly subtituion cipher used through the
ages, which can be read (with some training) as if it were english.
Best used for short messages (single words would be best) to avoid
language analaysis.
The Legend is here

^fn

Essentially, each letter is represented by the shape that it is in, for example:

Letter

Image

While this is not a secure code at all, it does make for some fun looking
messages

One time pad


One of the simplest, yet strongest forms of encryption, it is based on 6
steps.
1. Generate a long radom set of letters (the key)
2. Convert your message to numbers

a=0
b=1
c= 2

z=26
3. Convert your key to numbers
4. line up the numbers of your message with the numbers of your key
5. Add the numbers together
6. Mod the numbers by 26, which simply means find the remainder (30 MOD 26 = 4)

The resulting string of numbers is your secret message!


This is secure for 1 primary reason
The key is random (true randomness is hard to accomplish, this is the
subject of much work)
Here is a simple example for encrypting the simple word Hello using the
key XMCKL, remember that the key is just random, it can be any set of

letters, you could for example agree that the second paragarah of Tom
Sawyer chapter 4 is your key.
Example taken from The WikiPedia Article

H
7 (H)
+ 23 (X)
= 30
= 4 (E)
E

E
4 (E)
12 (M)
16
16 (Q)
Q

L
11 (L)
2 (C)
13
13 (N)
N

L
11 (L)
10 (K)
21
21 (V)
V

O message
14 (O) message
11 (L) key
25
message + key
25 (Z) message + key (
(mod
mod 26
26)
)
Z ciphertext

As you can see, our completed encryption is EQNVZ

E
4 (E)
- 23 (X)
= -19
19
=
7 (H)
H

Q
16 (Q)
12 (M)
4
4 (E)
E

N
13 (N)
2 (C)
11
11 (L)
L

V
21 (V)
10 (K)
11
11 (L)
L

Z ciphertext
25 (Z) ciphertext
11 (L) key
14
ciphertext key
14 (O) ciphertext key (
(mod
mod 26
O message

One time pads saw wide use doing both world wars and in espionage
worldwide. Often the 1 time pad would be printed in miniature and hidden
inside toys, cigarette cases etc.. and used to send coded messages back to
a spies employer.

The major failing of one time pads is of course distributing the pads
themselves. each person who was to read the message would need their
own copy of it, and each pad could only be used once if it was to stay
secure.
This technique is still at the heart of many types of encryption, but we have
come up with new ways to solve the problem of distributing the one-time
pad.

Public Key Encryption


Called Public Key, because the key that you use to encrypt the message is
not a secret, you can post it publicly as it can be used only to encrypt the
message, it can not be used to decrypt the message via one-way functions
^frsa. You could think of it liked a locked mailbox with an envelope slot,
anyone can put a letter in, but you need the key to take it out.
With Public Key encryption, we are now using a math formula to generate
the one time pad (essentially), so all we need to distribute is a relatively
short seed that we feed into this formula to generate an endless stream of
random numbers.
The steps in creating a public key message, are
1. Create the Seed
2. using the algorithm, generate a one time pad as long as your message
3. encrypt your message using the one time pad
4. encrypt the Seed using the recipients public key

Thats it, so now you can send that message to the recipient, they decrypt
the seed, generate the 1 time pad, and decrypt the message. This is all
handled by computer programs, but you can see the steps are not
complicated.
A feature of this, is that you can encrypt the seed value multiple times with

different peoples public keys and include it in a message to a group of


people, allowing you to securely message a large group of people, without
having to encrypt the whole message over and over again, which would take
a long time, and create large messages.
metaphor of drop box, anyone can put letter in, needs key to open
assymetric math example
So to encrypt you have something like: EncryptedBits = (PlainText ^
YourPublicKey) % Modulus

And to decrypt you have something like: PlainText = (EncryptedBits ^


YourPrivateKey) % Modulus

what can you do


Resources
http://dead-drop.me[^f2]
http://pgptools.com
https://www.youtube.com/watch?v=3QnD2c4Xovk#t=206

Footnotes

S-ar putea să vă placă și