The Basics of Cryptography: Encryption and Decryption

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

The Basics of Cryptography

1 When Julius Caesar sent messages to his generals, he didn't trust his messengers. So he
replaced every A in his messages with a D, every B with an E, and so on through the
alphabet. Only someone who knew the “shift by 3” rule could decipher his messages. And
so we begin.

Encryption and Decryption


Data that can be read and understood without any special measures is called plaintext or
cleartext. The method of disguising plaintext in such a way as to hide its substance is called
encryption. Encrypting plaintext results in unreadable gibberish called ciphertext. You use
encryption to make sure that information is hidden from anyone for whom it is not intended,
even those who can see the encrypted data. The process of reverting ciphertext to its original
plaintext is called decryption. The following figure shows this process.

Figure 1: Encryption and Decryption

1.1 What is Cryptography?


Cryptography is the science of using mathematics to encrypt and decrypt data. Cryptography
enables you to store sensitive information or transmit it across insecure networks (like the
Internet) so that it cannot be read by anyone except the intended recipient. While cryptography
is the science of securing data, cryptanalysis is the science of analyzing and breaking secure
communication. Classical cryptanalysis involves an interesting combination of analytical
reasoning, application of mathematical tools, pattern finding, patience, determination, and luck.
Cryptanalysts are also called attackers. Cryptology embraces both cryptography and
cryptanalysis.
1.2 Five Functions of Cryptography:
1. CONFIDENTIALITY (SECRECY)
Confidentiality ensures that data remain secret. It is the protection of transmitted data so that
the intruder cannot read the encrypted message from the cipher text. This requires that an
intruder should not know the source and destination, frequency, and length of the data flow on
the communications network.

2. AUTHENTICATION:
Authentication ensures that the communicating entity is authentic (that it claims to be). It
should be possible for the recipient of a message to find out its origin. Also the intruder should
not be able to masquerade as someone else.

3. INTEGRITY:

Integrity ensures that the data received is the same as sent by the authorized entity. The receiver
of a message should be able to confirm that the message has not been modified in the
transmission. An intruder should not be able to substitute the fake message for the actual one.

4. NONREPUDIATION:

Nonrepudiation ensures that the receiver can prove that the message was sent by the specified
party. Similarly, the sender can prove that the message was received by the specified party .

5. KEY EXCHANGE

The method by which crypto keys are shared between sender and receiver.

In cryptography, we start with the unencrypted data, referred to as plaintext. Plaintext is


encrypted into ciphertext, which will in turn (usually) be decrypted back into usable plaintext.
The encryption and decryption is based upon the type of cryptography scheme being employed
and some form of key. For those who like formulas, this process is sometimes written as:

C = Ek(P)

P = Dk(C)

Where P = plaintext, C = ciphertext, E = the encryption method, D = the decryption method,


and k = the key.

Given this, there are other functions that might be supported by crypto and other terms that one
might hear:
Forward Secrecy (aka Perfect Forward Secrecy): This feature protects past encrypted
sessions from compromise even if the server holding the messages is compromised. This is
accomplished by creating a different key for every session so that compromise of a single key
does not threaten the entirety of the communications.

Perfect Security: A system that is unbreakable and where the ciphertext conveys no
information about the plaintext or the key. To achieve perfect security, the key has to be at least
as long as the plaintext, making analysis and even brute-force attacks impossible. One-time pads
are an example of such a system.

Deniable Authentication (aka Message Repudiation): A method whereby participants in an


exchange of messages can be assured in the authenticity of the messages but in such a way that
senders can later plausibly deny their participation to a third-party.

Strong Cryptography
“There are two kinds of cryptography in this world: cryptography that will stop your kid sister
from reading your files, and cryptography that will stop major governments from reading your
files. This book is about the latter.”

—Bruce Schneier, Applied Cryptography: Protocols, Algorithms, and Source Code in C

PGP is also about the latter sort of cryptography. Cryptography can be strong or weak, as
explained above. Cryptographic strength is measured in the time and resources it would require
to recover the plaintext. The result of strong cryptography is ciphertext that is very difficult to
decipher without possession of the appropriate decoding tool. How difficult? Given all of today’s
computing power and available time—even a billion computers doing a billion checks a second—
it is not possible to decipher the result of strong cryptography before the end of the universe.

One would think, then, that strong cryptography would hold up rather well against even an
extremely determined cryptanalyst. Who’s really to say? No one has proven that the strongest
encryption obtainable today will hold up under tomorrow’s computing power. However, the
strong cryptography employed by PGP is the best available today. Vigilance and conservatism
will protect you better, however, than claims of impenetrability.

How Does Cryptography Work?


A cryptographic algorithm, or cipher, is a mathematical function used in the encryption and
decryption process. A cryptographic algorithm works in combination with a key—a word,
number, or phrase—to encrypt the plaintext. The same plaintext encrypts to different ciphertext
with different keys. The security of encrypted data is entirely dependent on two things: the
strength of the cryptographic algorithm and the secrecy of the key.
A cryptographic algorithm, plus all possible keys and all the protocols that make it work,
comprise a cryptosystem. PGP is a cryptosystem.

Summary
As we toward a society where automated information resources are increased and cryptography
will continue to increase in importance as a security mechanism. Electronic networks for
banking, shopping, inventory control, benefit and service delivery, information storage and
retrieval, distributed processing, and government applications will need improved methods for
access control and data security. The information security can be easily achieved by using
Cryptography technique.

Cryptography is the stuff of spy novels and action comics. Kids once saved up Ovaltine™ labels
and sent them away for Captain Midnight’s Secret Decoder Ring. Almost everyone has seen a
television show or movie involving a nondescript suit-clad gentleman with a briefcase
handcuffed to his wrist. The term “espionage” conjures images of James Bond, car chases, and
flying bullets. And here you are, sitting in your office, faced with the rather mundane task of
sending a sales report to a coworker in such a way that no one else can read it. You just want to
be sure that your colleague was the actual and only recipient of the email and you want him or
her to know that you were unmistakably the sender. It’s not national security at stake, but if
your company’s competitor got hold of it, it could cost you. How can you accomplish this? You
can use cryptography. You may find it lacks some of the drama of code phrases whispered in
dark alleys, but the result is the same: information revealed only to those for whom it was
intended.

Data that can be read and understood without any special measures is called plaintext or
cleartext. The method of disguising plaintext in such a way as to hide its substance is called
encryption.

Cryptography is the science of using mathematics to encrypt and decrypt data. It starts with the
unencrypted data, referred to as plaintext. Plaintext is encrypted into ciphertext, which will in
turn (usually) be decrypted back into usable plaintext. There are five functions of cryptography:
confidentiality, authentication, integrity, nonrepudiation and key change which will be
discussed later on. How long do you want these messages to remain secret?[...] I want them to
remain secret for as long as men are capable of evil.

“There are two kinds of cryptography in this world: cryptography that will stop your kid sister
from reading your files, and cryptography that will stop major governments from reading your
files. This book is about the latter.”

—Bruce Schneier, Applied Cryptography: Protocols, Algorithms, and Source Code in C.


Definition of terms:
Ciphertext is encrypted text transformed from plaintext using an encryption algorithm.
It can't be read until it has been converted into plaintext (decrypted) with a key.

Cryptography is the science of using mathematics to encrypt and decrypt data.

Cryptanalysis is the process of studying cryptographic systems to look for weaknesses


or leaks of information.

Cryptanalyst is an expert in deciphering coded messages without prior knowledge of


the key.

Cryptographic Algorithm a mathematical function used in the encryption and


decryption process.

Decryption is the conversion of encrypted data into its original form is called
Decryption. It is generally a reverse process of encryption

Encryption is the process of converting information or data into a code, especially to


prevent unauthorized access

Deniable Authentication (aka Message Repudiation) a method whereby participants


in an exchange of messages can be assured in the authenticity of the messages

Forward Secrecy (aka Perfect Forward Secrecy) this feature protects past encrypted
sessions from compromise even if the server holding the messages is compromised.

Perfect Security a system that is unbreakable and where the ciphertext conveys no
information about the plaintext or the key.

Pretty Good Privacy (PGP) encryption, is a data encryption computer program that
gives cryptographic privacy and authentication for online communication. It is often
used to encrypt and decrypt texts, emails, and files to increase the security of emails.

For more knowledge about the cryptography, please check the link provided;
https://www.youtube.com/watch?v=jhXCTbFnK8o

Modules:

https://www.cs.unibo.it/babaoglu/courses/security/resources/documents/in
tro-to-crypto.pdf

https://www.garykessler.net/library/crypto.html#desmath

You might also like