CRYPTOGRAPHY | Encrypting & Decrypting | Caesar Cipher | Modulo Operator | TAGALOG-ENGLISH

Love, Beatrice
30 Nov 202022:30

Summary

TLDRThis video delves into cryptography, focusing on encrypting and decrypting messages using Caesar cipher and modulo operator. It explains the roots of 'cryptography' and its role in creating secret codes. The Caesar cipher shifts letters by a set number, either to the left or right, for encryption and decryption. The modulo operator uses a key to encrypt by adding it to letter positions and then taking modulo 26 to wrap around the alphabet. The video provides step-by-step examples of both encryption and decryption processes, illustrating how to convert plain text into coded messages and vice versa.

Takeaways

  • 🔐 Cryptography is the practice of secure communication, involving the use of codes to encrypt and decrypt messages.
  • 📜 The term 'cryptography' comes from 'crypto' meaning hidden and 'graphene' meaning writing, indicating its purpose of hidden writing or secret messages.
  • 🔄 Encryption is the process of transforming plain text into code using an algorithm, while decryption is the reverse process.
  • 🔄 Caesar Cipher is a type of shift cipher where each letter in the plaintext is shifted a certain number of places down the alphabet.
  • 🔢 The modulo operator is used in cryptography to encrypt and decrypt messages by adding or subtracting a key to each letter's position in the alphabet.
  • 🔑 A key in cryptography is a crucial piece of information used to encrypt or decrypt a message, often shared between the sender and receiver.
  • 🔄 For Caesar Cipher, the direction of shifting can be to the left or right, and decryption involves shifting in the opposite direction.
  • 🔄 When using the modulo operator, if the result of the encryption exceeds the alphabet size, it wraps around using the modulo operation.
  • 🔢 The modulo operator in encryption is represented as ( c = (p * k) % 26 ), where c is the encrypted letter, p is the original letter's position, k is the key, and 26 is the number of letters in the alphabet.
  • 🔄 Decryption using the modulo operator involves reversing the encryption process by subtracting the key from the encrypted letter's position and applying the modulo operation.

Q & A

  • What does the word 'cryptography' mean?

    -The word 'cryptography' originates from the two Greek words 'crypto', which means hidden, and 'graphene', which means writing. Therefore, the meaning of cryptography is hidden writing or the practice of creating and breaking secret codes.

  • What are the two main processes in cryptography?

    -The two main processes in cryptography are encryption and decryption. Encryption is the process of transforming plain text into code form using a certain algorithm, while decryption is the process of converting the coded message back into plain text.

  • What is a key in the context of cryptography?

    -In cryptography, a key is a string of information that is used to reveal the encrypted message into a readable form.

  • What is the Caesar Cipher method?

    -The Caesar Cipher method is a type of shift cipher where each letter in the plain text is shifted a certain number of places down or up the alphabet. The key in this method is the number of positions each letter is shifted.

  • How does the Caesar Cipher method work for encryption?

    -In the Caesar Cipher method for encryption, each letter of the plain text is shifted to the right by a certain number of positions determined by the key. For example, with a key of 3, 'A' becomes 'D', 'B' becomes 'E', and so on.

  • How is decryption performed in the Caesar Cipher method?

    -Decryption in the Caesar Cipher method is performed by shifting the encrypted letters in the opposite direction of the encryption. If the encryption used a shift to the right, decryption shifts to the left by the same number of positions.

  • What is the role of the modulo operator in cryptography?

    -The modulo operator in cryptography is used to encrypt and decrypt messages by adding or subtracting a key to the numerical position of each letter in the alphabet and then finding the remainder when divided by 26 (the number of letters in the alphabet).

  • How does the modulo operator help in encrypting a message?

    -When encrypting a message using the modulo operator, each letter of the plain text is converted to its corresponding numerical position, a key is added to it, and then the result is taken modulo 26 to ensure it falls within the range of the alphabet. The resulting number is then converted back to a letter.

  • Can you provide an example of how the modulo operator is used for decryption?

    -For decryption using the modulo operator, each numerical position of the encrypted letter is reduced by the key and then taken modulo 26. For example, if 'E' (which is 4) is encrypted with a key of 3 to become 'H' (which is 7), decryption would involve 7 - 3 mod 26, resulting in 4, which corresponds back to 'E'.

  • What happens if the result of the modulo operation goes beyond the alphabet range during encryption?

    -If the result of the modulo operation goes beyond the alphabet range during encryption, it wraps around to the beginning of the alphabet. For instance, if the result is 27, it would be taken as 1 (since 27 mod 26 is 1), which corresponds to 'A'.

  • How does the Caesar Cipher differ from using the modulo operator for encryption?

    -The Caesar Cipher is a specific type of shift cipher with a fixed number of positions for shifting letters, while the modulo operator can use any integer value as a key, providing a wider range of possible encryptions. The modulo operator also ensures that the result always stays within the bounds of the alphabet.

Outlines

00:00

🔐 Introduction to Cryptography

The script begins by introducing the topic of cryptography, which is defined as the practice of secure communication in the presence of third parties. The term 'cryptography' is derived from 'crypto' meaning hidden and 'graphene' meaning writing, thus implying the concept of secret or hidden messages. The video discusses two primary processes within cryptography: encryption, which is the transformation of plain text into coded form using an algorithm, and decryption, which is the reverse process of converting coded messages back into plain text. Two methods of cryptography are highlighted: the Caesar cipher, a type of shift cipher, and the use of the modulo operator. The script also explains the concept of a key in cryptography, which is a piece of information that helps reveal the encrypted message in a readable form.

05:39

🔄 Caesar Cipher Method

This paragraph delves into the Caesar cipher method, a type of substitution cipher where each letter in the plaintext is shifted a certain number of places down or up the alphabet. The script provides an example of encryption using a shift of three to the right, demonstrating how the word 'cryptography' is encrypted to 'swwuhqiruw'. It then explains decryption as the opposite process, using a shift of five to the left to decrypt the cipher back to the original word. The script emphasizes the importance of understanding the direction of shift for both encryption and decryption.

10:40

🔢 Modulo Operator in Cryptography

The script moves on to discuss the use of the modulo operator in cryptography. It explains that the modulo operator is used with a key to encrypt messages, and this key can be any integer value from 0 to 25. The script provides an example of encrypting the message 'mmw is fun' using a key of five, where each letter's position in the alphabet is increased by five and then reduced modulo 26 (the number of letters in the alphabet) to ensure the result is within the alphabet range. The result of this encryption is 'rrb nxkz'.

15:40

🔄 Decrypting with Modulo

This paragraph explains the decryption process using the modulo operator. The script uses the encrypted message 'rrb nxkz' and the key of five to decrypt it back to 'mmw is fun'. It shows how each letter's position is decreased by the key value and then reduced modulo 26 to find the original letter. The script also provides another example of encryption and decryption using the modulo operator with different messages and keys.

20:45

🔚 Conclusion on Cryptography

The final paragraph wraps up the discussion on cryptography, summarizing the key points covered in the video. It reiterates the importance of the Caesar cipher and the modulo operator in encrypting and decrypting messages. The script concludes by emphasizing the practical applications of these cryptographic methods in secure communication.

Mindmap

Keywords

💡Cryptography

Cryptography is the practice and study of secure communication in the presence of third parties called adversaries. Derived from 'crypto' meaning hidden and 'graphene' meaning writing, it refers to the process of making information secret. In the video, cryptography is discussed as the method of encrypting and decrypting messages to ensure secure communication. It is the central theme of the video, with examples of encryption and decryption being provided.

💡Encryption

Encryption is the process of encoding a message or information in such a way that only authorized parties can access it. It involves the transformation of plaintext into ciphertext using an algorithm. The video explains encryption as a method to convert readable text into an unreadable form, ensuring that the message remains secret. The Caesar cipher and modulo operator are two methods discussed for encryption.

💡Decryption

Decryption is the reverse process of encryption, where the encoded message is converted back into its original form. The video mentions decryption as the counterpart to encryption, where the hidden message is revealed back into plain text. It is essential for the recipient to understand the secret message sent by the sender.

💡Caesar Cipher

The Caesar Cipher is a type of substitution cipher where each letter in the plaintext is shifted a certain number of places down or up the alphabet. In the video, the Caesar Cipher is used as an example of a simple encryption method where a key (shift value) is used to shift the letters of the message to the right to encrypt and to the left to decrypt.

💡Modulo Operator

The modulo operator is used in mathematics to find the remainder of a division of two numbers. In the context of the video, it is applied in cryptography to encrypt messages by adding a key to the numerical position of each letter in the plaintext and then taking the remainder when divided by 26 (the number of letters in the alphabet). This method is used to demonstrate a more complex form of encryption than the Caesar Cipher.

💡Key

In cryptography, a key is a piece of information (such as a password, phrase, or a series of numbers) that determines the output of the encryption or decryption process. The video explains that the key is crucial for both encryption and decryption and must be shared between the sender and the receiver to ensure the message can be understood.

💡Plaintext

Plaintext refers to the original, human-readable form of a message before it has been encrypted. The video uses the term to describe the starting point of the encryption process, where the message is in a form that can be easily understood before being transformed into ciphertext.

💡Ciphertext

Ciphertext is the result of an encrypted message, which is transformed from plaintext using an encryption algorithm. In the video, ciphertext is the unreadable form of the message that is produced after applying the Caesar Cipher or modulo operator to the plaintext.

💡Shift

In the context of the Caesar Cipher, a shift refers to the number of positions each letter in the plaintext is moved to encrypt or decrypt the message. The video provides examples of using a shift of three to the right for encryption and a shift to the left for decryption.

💡Alphabet

The alphabet, in the context of the video, refers to the set of letters used in a language, specifically the English alphabet which contains 26 letters. It is the basis for the Caesar Cipher and modulo operator methods, where each letter is assigned a numerical position to facilitate encryption and decryption.

Highlights

Cryptography is defined as the practice and study of hiding and revealing information.

The word 'cryptography' comes from 'crypto' meaning hidden and 'graphene' meaning writing.

Cryptography involves two processes: encryption and decryption.

Encryption is the process of transforming plain text into code using an algorithm.

Decryption is the process of converting an encrypted message back into plain text.

Shift cipher or Caesar cipher is a method in cryptography.

The modulo operator is another method used in cryptography.

A key in cryptography is essential for revealing encrypted messages.

The Caesar cipher involves shifting letters in the alphabet by a certain number.

Decryption in Caesar cipher is done by shifting letters in the opposite direction of encryption.

The modulo operator is used to encrypt and decrypt messages with a key from 0 to 25.

Each letter in the alphabet is assigned a number, and the modulo operation is applied with the key.

The encrypted message is converted back to the original using the modulo operator and the key.

The modulo operator helps in handling values that exceed the alphabet's range.

The video provides a step-by-step example of encrypting the word 'cryptography' using Caesar cipher.

An example of decrypting a message encrypted with a Caesar cipher is demonstrated.

The video explains how to encrypt the message 'mmw is fun' using the modulo operator with a key of five.

Decrypting an encrypted message using the modulo operator involves reversing the encryption process.

The video concludes with examples of both Caesar cipher and modulo operator encryption and decryption.

Transcripts

play00:00

hi guys in this video we will be

play00:01

discussing cryptography

play00:03

so encrypting and decrypting messages

play00:06

using two methods

play00:07

cesar cipher and modulo operator

play00:10

so let us define what is the meaning of

play00:13

cryptography so the word cryptography

play00:15

originated from the two pre-words crypto

play00:18

which means hidden and graphene which

play00:20

means writing so therefore the meaning

play00:22

of

play00:23

cryptography is hidden writing so

play00:28

secret message to someone

play00:32

you will use cryptography okay it is

play00:35

making or breaking of secret codes

play00:37

it uses two processes namely encryption

play00:40

so for example nothing encryption

play00:42

the process of transforming plain text

play00:44

into code form

play00:45

using a certain algorithm

play00:48

plain text into codes and tagden guys

play00:52

encryption

play00:53

okay decryption

play01:06

the process of converting back the

play01:08

hooded message into plain text

play01:11

hidden message that is called decryption

play01:14

okay

play01:14

so there are two methods in cryptography

play01:17

shift cipher or caesar cipher

play01:19

and then the next one is using a modulo

play01:21

operator

play01:22

so maritime natal key in cryptography he

play01:25

refers to the strings of information

play01:27

that is used to reveal the encrypted

play01:29

message into readable

play01:30

form so palaging cryptography

play01:37

[Music]

play01:52

cipher method so we i have two examples

play01:56

here

play01:57

is an encryption decryption okay so

play02:00

not being determination example one use

play02:03

the key of shift of three

play02:05

so navigation and key to the right

play02:08

so to the right and encrypt the word

play02:11

cryptography

play02:14

cryptography going hidden message

play02:18

cryptography

play02:34

[Music]

play02:41

[Music]

play02:48

[Music]

play03:27

so one two three that is s and then

play03:30

t one two three so w

play03:34

o one two three so r

play03:38

and then young g would be between g so

play03:40

one two

play03:41

three magnitude and then r

play03:46

[Music]

play04:06

letter b okay so that would be your

play04:08

final answer

play04:10

okay so again you told us

play04:41

five shifts to the left and gaga with

play04:44

more eye

play04:45

five shifts to the right okay five

play04:47

shifts to the

play04:48

right and going to the left back

play04:50

decryption guys opposite noun

play04:52

encryption i decryption new encryption

play04:54

so

play05:38

you will do the opposite so eto

play05:40

magicking instead of three to the right

play05:42

decryption making

play05:43

three to the left

play05:47

one two three

play05:50

okay

play05:54

um you will do the opposite direction so

play05:57

it was

play05:58

to the left so gagawinko five to the

play06:00

right

play06:02

decryption okay so

play06:05

nagawata do the opposite

play06:08

direction okay so i'm adding um code

play06:11

name

play06:11

is b j y d n so b

play06:15

j y d n

play06:18

b j j y okay

play06:21

so five to the right since in um

play06:24

description decryption though

play06:26

so since i've been left going right so

play06:28

five dow

play06:29

so young b it will be so one two

play06:32

three four five so jito

play06:36

yan and then on j so start also j

play06:39

so five to the right one two three four

play06:42

five so letter o

play06:44

and then your y so one two three

play06:48

four five so letter d so on first word

play06:51

nothing is god

play06:52

and the letter d a one two three

play06:55

four five so i and a new end

play06:59

one two three four five so that is s

play07:03

and then b actually marinated so g n

play07:06

and then in j marinara and j o okay so

play07:09

that is letter o

play07:10

so o and then j ulets o little and then

play07:13

why maranatha

play07:14

diane

play07:29

guys sister cipher to have so paganic

play07:31

the decrypt is our cipher

play07:34

pack decryption you do the opposite pag

play07:36

encryption

play07:37

you follow the direction okay

play07:40

let's have the manual second method

play07:43

using modulo operator

play07:44

so the center of the message uses the

play07:46

key to encrypt

play07:48

and to decrypt the secret message the

play07:50

key may have any integer value from 0 to

play07:52

25

play07:53

and will this will be shared to the

play07:54

person who will receive

play07:56

the secret

play08:01

[Music]

play08:11

mmw is fun so we have we will encrypt so

play08:15

original text or plain text

play08:16

documentation code

play08:18

so encrypt the message mmw is fun using

play08:21

module operator so let k

play08:23

is equal to five okay

play08:50

okay so we have um 26 letters pero guys

play08:53

must start cases 0

play08:54

and um number so 0 25 per 26

play08:59

0 so m is 12 okay

play09:02

so 12 and then w is 22

play09:06

i am and then i is

play09:10

8 and then s is 18

play09:14

f is 5 u

play09:17

is 20 and then n is

play09:20

13 i ayan okay now i'm gonna go in

play09:23

parama using module operator

play09:28

five okay so i will add five

play09:32

to one of each so omega 105.

play09:47

so 12 plus 5 is that was seventeen then

play09:51

twenty-two plus five is twenty-seven

play09:54

okay

play09:54

and then eight plus five is thirteen

play09:57

eighteen plus five is twenty-three five

play10:00

plus five is ten

play10:01

twenty plus five is twenty-five and 13

play10:03

plus 5 is 18.

play10:05

okay

play10:10

[Music]

play10:16

guys

play10:33

okay and then 27 1272 guys okay so gente

play10:37

gamet and modulo operator so modular

play10:39

operator nothing is y is equal to

play10:42

c c plus k

play10:46

okay mode or mod 26

play10:50

and package 26 because they marine time

play10:52

26 um letters in an alphabet

play10:54

okay so meron 26 channel 25 bian

play10:57

queso pero 26

play11:06

27 okay and then mode or mod

play11:10

26 so the balance

play11:27

my remainder

play11:40

then you go is guys so 25 to the ba

play11:43

since 27 though

play11:45

so 25 so 89 26 89 27.

play11:52

it's up to you guys 27.

play11:57

okay so again next one 13 so 30 nothing

play12:01

is n

play12:02

and then 23 is x okay 10

play12:05

is um k

play12:08

ok 25 satoshi letter z and then 18

play12:12

is s i n so i'm adding um

play12:17

encrypted word is rrb and

play12:20

x k z s

play12:29

[Music]

play12:36

is equal to five okay so

play12:41

let's have the man um ganito paren so

play12:44

encryption paren encrypt the message

play12:46

i love you and then okay naman is ten

play12:49

okay so surat kumar i love you so i

play12:53

love you

play12:57

i am okay so you ain't nothing is eight

play13:00

and then el nathan is eleven

play13:03

o is fourteen v is 21.

play13:09

is four young y is 24.

play13:13

is 14. is 20.

play13:17

okay and again is 10 so i will add 10

play13:21

so 10 okay

play13:26

okay so 18

play13:30

this one is 18 this one is 21.

play13:33

this one is 24. so number 9

play13:36

32 i 31

play13:40

this one is 14. the lemon is 34.

play13:43

so 24 and then i 30. okay

play13:46

so

play13:59

31i so when i'm 31 the guy says hang on

play14:02

25 so you can use modulo so y

play14:04

is equal to 31 okay modulo

play14:08

um 26 okay lagging mode 26 huh

play14:12

okay so 31 divided by 26 so ilang 31

play14:16

meron ilang 26 marines are 31

play14:22

26 31 so

play14:25

31 minus 26 sumeromatite on

play14:39

25 26 27 28

play14:43

29 30 31 ion so 31

play14:47

f okay next one 14 so 14

play14:51

is zero i sorry zero oh okay and then 34

play14:54

again will attain 34

play15:05

34 34

play15:09

over 26 so a long 26

play15:14

[Music]

play15:24

34-26 so eight

play15:26

so on remainder kodi to i eight okay

play15:32

okay so letter i okay and then 24 is

play15:36

letter y

play15:37

and then 30 again when i'm assigned 30

play15:40

so y is equal to

play15:41

30 mode um 26

play15:45

so 30 divided by 26 so meron is on 26

play15:50

30 and then 26 liters of 30

play16:10

25 26 27 30 31 32 33 34 are you another

play16:16

aisha again

play16:18

okay so you isn't a man um 30

play16:21

i am so 25 26 in the seventh eighth to

play16:24

the ninth thirty so letter isha

play16:26

so same okay so it's up to you so it is

play16:34

final

play16:52

[Music]

play16:54

so decrypt the message rrb and xkz

play16:57

let k is equal to five so nothing

play17:00

but a hidden message rrb

play17:14

[Music]

play17:17

so like i call it in letters now your

play17:19

numbers now so 17

play17:21

17 young b is one young endaman

play17:25

is 13 young x i 23

play17:28

young k i 10 yong zhi

play17:31

25 and then si18 guys pak decryption

play17:37

sister cipher the bag opposite son

play17:59

17 minus 5 that is 12.

play18:02

so 12 1 minus 5 is negative 4 give me a

play18:05

negative 4

play18:06

and 13 minus 5 that is 8.

play18:12

23 minus 5 is 18

play18:15

10 minus 5 is 5 25 minus 5 is 20

play18:19

and 18 minus 5 is 13

play18:22

okay so 13.

play18:26

12

play18:37

negative one negative two negative three

play18:39

negative four negative five pagoda

play19:06

negative two negative three negative

play19:08

four negative five sila yoon

play19:10

hang gang negative 26 okay

play19:14

so this one would be uh negative

play19:17

four so negative four coi w i n

play19:20

okay i

play19:25

and then five is f

play19:28

and then 20 is you and then your 13 is

play19:32

in actually

play19:35

example nothing to say one r

play19:47

[Music]

play19:50

so the hidden words or the hidden

play19:52

sentence is mmw is

play19:54

fun okay let's have the last example of

play19:57

decryption using modulo

play19:59

so decrypt the message s v

play20:02

y f o i y

play20:06

e okay so k is equal to 10 so an

play20:09

uncommon a young s nothing is 18

play20:13

v naman is um 21

play20:16

y is 24 young f is five

play20:19

and o is fourteen vietnam

play20:23

ayan ai naman is eight and then y

play20:26

is 24 and then e i four so since

play20:30

decryption though instead of

play20:31

i'm adding i will

play20:44

[Music]

play20:50

okay so 18 minus 10 is 8 21 minus 10 is

play20:54

11

play20:55

24 minus 10 is 14 5 minus 10 is negative

play20:58

5

play20:59

14 minus 10 is 4 8 minus 10 is negative

play21:03

2

play21:03

24 minus 10 is 14 and 4 minus 10 is

play21:07

negative

play21:07

6. okay so pog negative guys negative

play21:10

huh

play21:11

like again you're negative but

play21:14

nothing

play21:21

negative five so negative one two three

play21:24

four five so that is letter v

play21:27

okay young foreign e

play21:30

okay your negative 2 so negative 1

play21:32

negative 2 that is

play21:34

y and then your 14 iso

play21:38

and a negative 6 so negative 1 negative

play21:40

2 negative 3 negative 4 negative 5

play21:42

negative six so letter u actually

play21:46

s v y f o i y e and y encrypt

play21:51

s v y f o i y e so the next

play21:55

i love you so same answer okay

play21:58

so that is it for the um cryptography

play22:02

okay um

play22:05

[Music]

play22:08

shift cipher or cesar cipher

play22:11

[Music]

play22:26

okay so that is it for the cryptography

Rate This

5.0 / 5 (0 votes)

相关标签
CryptographyEncryptionDecryptionCaesar CipherModulo OperatorSecret CodesHidden MessagesCoding TutorialData SecurityAlgorithms
您是否需要英文摘要?