CRYPTOGRAPHY | Encrypting & Decrypting | Caesar Cipher | Modulo Operator | TAGALOG-ENGLISH
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
🔐 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.
🔄 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.
🔢 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'.
🔄 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.
🔚 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
💡Encryption
💡Decryption
💡Caesar Cipher
💡Modulo Operator
💡Key
💡Plaintext
💡Ciphertext
💡Shift
💡Alphabet
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
hi guys in this video we will be
discussing cryptography
so encrypting and decrypting messages
using two methods
cesar cipher and modulo operator
so let us define what is the meaning of
cryptography so the word cryptography
originated from the two pre-words crypto
which means hidden and graphene which
means writing so therefore the meaning
of
cryptography is hidden writing so
secret message to someone
you will use cryptography okay it is
making or breaking of secret codes
it uses two processes namely encryption
so for example nothing encryption
the process of transforming plain text
into code form
using a certain algorithm
plain text into codes and tagden guys
encryption
okay decryption
the process of converting back the
hooded message into plain text
hidden message that is called decryption
okay
so there are two methods in cryptography
shift cipher or caesar cipher
and then the next one is using a modulo
operator
so maritime natal key in cryptography he
refers to the strings of information
that is used to reveal the encrypted
message into readable
form so palaging cryptography
[Music]
cipher method so we i have two examples
here
is an encryption decryption okay so
not being determination example one use
the key of shift of three
so navigation and key to the right
so to the right and encrypt the word
cryptography
cryptography going hidden message
cryptography
[Music]
[Music]
[Music]
so one two three that is s and then
t one two three so w
o one two three so r
and then young g would be between g so
one two
three magnitude and then r
[Music]
letter b okay so that would be your
final answer
okay so again you told us
five shifts to the left and gaga with
more eye
five shifts to the right okay five
shifts to the
right and going to the left back
decryption guys opposite noun
encryption i decryption new encryption
so
you will do the opposite so eto
magicking instead of three to the right
decryption making
three to the left
one two three
okay
um you will do the opposite direction so
it was
to the left so gagawinko five to the
right
decryption okay so
nagawata do the opposite
direction okay so i'm adding um code
name
is b j y d n so b
j y d n
b j j y okay
so five to the right since in um
description decryption though
so since i've been left going right so
five dow
so young b it will be so one two
three four five so jito
yan and then on j so start also j
so five to the right one two three four
five so letter o
and then your y so one two three
four five so letter d so on first word
nothing is god
and the letter d a one two three
four five so i and a new end
one two three four five so that is s
and then b actually marinated so g n
and then in j marinara and j o okay so
that is letter o
so o and then j ulets o little and then
why maranatha
diane
guys sister cipher to have so paganic
the decrypt is our cipher
pack decryption you do the opposite pag
encryption
you follow the direction okay
let's have the manual second method
using modulo operator
so the center of the message uses the
key to encrypt
and to decrypt the secret message the
key may have any integer value from 0 to
25
and will this will be shared to the
person who will receive
the secret
[Music]
mmw is fun so we have we will encrypt so
original text or plain text
documentation code
so encrypt the message mmw is fun using
module operator so let k
is equal to five okay
okay so we have um 26 letters pero guys
must start cases 0
and um number so 0 25 per 26
0 so m is 12 okay
so 12 and then w is 22
i am and then i is
8 and then s is 18
f is 5 u
is 20 and then n is
13 i ayan okay now i'm gonna go in
parama using module operator
five okay so i will add five
to one of each so omega 105.
so 12 plus 5 is that was seventeen then
twenty-two plus five is twenty-seven
okay
and then eight plus five is thirteen
eighteen plus five is twenty-three five
plus five is ten
twenty plus five is twenty-five and 13
plus 5 is 18.
okay
[Music]
guys
okay and then 27 1272 guys okay so gente
gamet and modulo operator so modular
operator nothing is y is equal to
c c plus k
okay mode or mod 26
and package 26 because they marine time
26 um letters in an alphabet
okay so meron 26 channel 25 bian
queso pero 26
27 okay and then mode or mod
26 so the balance
my remainder
then you go is guys so 25 to the ba
since 27 though
so 25 so 89 26 89 27.
it's up to you guys 27.
okay so again next one 13 so 30 nothing
is n
and then 23 is x okay 10
is um k
ok 25 satoshi letter z and then 18
is s i n so i'm adding um
encrypted word is rrb and
x k z s
[Music]
is equal to five okay so
let's have the man um ganito paren so
encryption paren encrypt the message
i love you and then okay naman is ten
okay so surat kumar i love you so i
love you
i am okay so you ain't nothing is eight
and then el nathan is eleven
o is fourteen v is 21.
is four young y is 24.
is 14. is 20.
okay and again is 10 so i will add 10
so 10 okay
okay so 18
this one is 18 this one is 21.
this one is 24. so number 9
32 i 31
this one is 14. the lemon is 34.
so 24 and then i 30. okay
so
31i so when i'm 31 the guy says hang on
25 so you can use modulo so y
is equal to 31 okay modulo
um 26 okay lagging mode 26 huh
okay so 31 divided by 26 so ilang 31
meron ilang 26 marines are 31
26 31 so
31 minus 26 sumeromatite on
25 26 27 28
29 30 31 ion so 31
f okay next one 14 so 14
is zero i sorry zero oh okay and then 34
again will attain 34
34 34
over 26 so a long 26
[Music]
34-26 so eight
so on remainder kodi to i eight okay
okay so letter i okay and then 24 is
letter y
and then 30 again when i'm assigned 30
so y is equal to
30 mode um 26
so 30 divided by 26 so meron is on 26
30 and then 26 liters of 30
25 26 27 30 31 32 33 34 are you another
aisha again
okay so you isn't a man um 30
i am so 25 26 in the seventh eighth to
the ninth thirty so letter isha
so same okay so it's up to you so it is
final
[Music]
so decrypt the message rrb and xkz
let k is equal to five so nothing
but a hidden message rrb
[Music]
so like i call it in letters now your
numbers now so 17
17 young b is one young endaman
is 13 young x i 23
young k i 10 yong zhi
25 and then si18 guys pak decryption
sister cipher the bag opposite son
17 minus 5 that is 12.
so 12 1 minus 5 is negative 4 give me a
negative 4
and 13 minus 5 that is 8.
23 minus 5 is 18
10 minus 5 is 5 25 minus 5 is 20
and 18 minus 5 is 13
okay so 13.
12
negative one negative two negative three
negative four negative five pagoda
negative two negative three negative
four negative five sila yoon
hang gang negative 26 okay
so this one would be uh negative
four so negative four coi w i n
okay i
and then five is f
and then 20 is you and then your 13 is
in actually
example nothing to say one r
[Music]
so the hidden words or the hidden
sentence is mmw is
fun okay let's have the last example of
decryption using modulo
so decrypt the message s v
y f o i y
e okay so k is equal to 10 so an
uncommon a young s nothing is 18
v naman is um 21
y is 24 young f is five
and o is fourteen vietnam
ayan ai naman is eight and then y
is 24 and then e i four so since
decryption though instead of
i'm adding i will
[Music]
okay so 18 minus 10 is 8 21 minus 10 is
11
24 minus 10 is 14 5 minus 10 is negative
5
14 minus 10 is 4 8 minus 10 is negative
2
24 minus 10 is 14 and 4 minus 10 is
negative
6. okay so pog negative guys negative
huh
like again you're negative but
nothing
negative five so negative one two three
four five so that is letter v
okay young foreign e
okay your negative 2 so negative 1
negative 2 that is
y and then your 14 iso
and a negative 6 so negative 1 negative
2 negative 3 negative 4 negative 5
negative six so letter u actually
s v y f o i y e and y encrypt
s v y f o i y e so the next
i love you so same answer okay
so that is it for the um cryptography
okay um
[Music]
shift cipher or cesar cipher
[Music]
okay so that is it for the cryptography
5.0 / 5 (0 votes)