# Tutorial: Math For Computer Science Security

February 9, 2017 | Views: 9713

Hello, Cybrarians!
Today we will continue our discussion about Security, as mentioned in Introduction to Computer Science Security, math is the core of security, and as I promised I will try to make this part as simple as possible. Before we start our discussion, I’d like to mention that during this tutorial, you will figure out that there are two categories of required math and they depend on the branches of Cryptographic studies:

1. Classic Cryptography require some basic mathematics operation (addition, subtraction, etc..) as we will see in Caesar Cipher,
2. On the other-hand, Modern Cryptography requires an advanced level of mathematics (function, log, factorization, etc…) as we will see on (RSA algorithm, HASH, etc..)

The Math Tutorial will divide mainly into two parts. For each part, I will add the corresponding references –

• Basic Math

Basic Math:

Basic math corresponding to classic cryptography, hence for the sake of simplicity, I will mention the name of mechanism and a brief of it, till the cryptography part done.

Caesar Cipher:
In the Caesar cipher (based on simple addition or subtraction a.k.a substitution), the English alphabet consists of 26 letters A = 1, B= 2, C = 3, etc… . In order to apply the Caesar cipher mechanism, you need to shift every letter by 3 positions in the alphabet.

• For encryption, you need to shift the letter 3 positions to the left (Addition)
1. Ex.1 suppose we have word (cybrary) to encrypt it we recall caesar cipher
 Plain Text: ABCDEFGHIJKLMNOPQRSTUVWXYZ Adding 3 to every letter will give us the cipher text Cipher Text: DEFGHIJKLMNOPQRSTUVWXYZABC

so (cybrary) will be (fbeudub)

• For decryption, you just need to reverse the previous operation by shifting the letter 3 positions to the right(subtraction)
1. Ex.1 suppose we have word (VHFXULWB) we want to decrypt it we recall caesar cipher
 Cipher Text: DEFGHIJKLMNOPQRSTUVWXYZABC Subtracting 3 from every letter will give us the plain text Plain Text: ABCDEFGHIJKLMNOPQRSTUVWXYZ

so (VHFXULWB) will be (SECURITY)

For the sake of simplicity, we will stop here. I hope you enjoyed this post. The next lesson is substitution cipher which is similar to cipher text.

Thank you

Share with Friends
Use Cybytes and
Tip the Author!
Share with Friends
1. rastyali

Page 3 of 3«123

### Our Revolution

We believe Cyber Security training should be free, for everyone, FOREVER. Everyone, everywhere, deserves the OPPORTUNITY to learn, begin and grow a career in this fascinating field. Therefore, Cybrary is a free community where people, companies and training come together to give everyone the ability to collaborate in an open source way that is revolutionizing the cyber security educational experience.

### Cybrary On The Go

Get the Cybrary app for Android for online and offline viewing of our lessons.

### Support Cybrary

Donate Here to Get This Month's Donor Badge

We recommend always using caution when following any link

Are you sure you want to continue?

Continue
Cancel