Cryptography Algorithms
eBook - ePub

Cryptography Algorithms

A guide to algorithms in blockchain, quantum cryptography, zero-knowledge protocols, and homomorphic encryption

Massimo Bertaccini

Share book
  1. 358 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Cryptography Algorithms

A guide to algorithms in blockchain, quantum cryptography, zero-knowledge protocols, and homomorphic encryption

Massimo Bertaccini

Book details
Book preview
Table of contents
Citations

About This Book

Build your real-world cryptography knowledge, from understanding the fundamentals to implementing the most popular modern-day algorithms to excel in your cybersecurity careerKey Featuresā€¢ Learn modern algorithms such as zero-knowledge, elliptic curves, and quantum cryptographyā€¢ Explore vulnerability and new logical attacks on the most-used algorithmsā€¢ Understand the practical implementation of algorithms and protocols in cybersecurity applicationsBook DescriptionCryptography Algorithms is designed to help you get up and running with modern cryptography algorithms. You'll not only explore old and modern security practices but also discover practical examples of implementing them effectively.The book starts with an overview of cryptography, exploring key concepts including popular classical symmetric and asymmetric algorithms, protocol standards, and more. You'll also cover everything from building crypto codes to breaking them. In addition to this, the book will help you to understand the difference between various types of digital signatures. As you advance, you will become well-versed with the new-age cryptography algorithms and protocols such as public and private key cryptography, zero-knowledge protocols, elliptic curves, quantum cryptography, and homomorphic encryption. Finally, you'll be able to apply the knowledge you've gained with the help of practical examples and use cases.By the end of this cryptography book, you will be well-versed with modern cryptography and be able to effectively apply it to security applications.What you will learnā€¢ Understand key cryptography concepts, algorithms, protocols, and standardsā€¢ Break some of the most popular cryptographic algorithmsā€¢ Build and implement algorithms efficientlyā€¢ Gain insights into new methods of attack on RSA and asymmetric encryptionā€¢ Explore new schemes and protocols for blockchain and cryptocurrencyā€¢ Discover pioneering quantum cryptography algorithmsā€¢ Perform attacks on zero-knowledge protocol and elliptic curvesā€¢ Explore new algorithms invented by the author in the field of asymmetric, zero-knowledge, and cryptocurrencyWho this book is forThis hands-on cryptography book is for IT professionals, cybersecurity enthusiasts, or anyone who wants to develop their skills in modern cryptography and build a successful cybersecurity career. Working knowledge of beginner-level algebra and finite fields theory is required.

Frequently asked questions

How do I cancel my subscription?
Simply head over to the account section in settings and click on ā€œCancel Subscriptionā€ - itā€™s as simple as that. After you cancel, your membership will stay active for the remainder of the time youā€™ve paid for. Learn more here.
Can/how do I download books?
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
What is the difference between the pricing plans?
Both plans give you full access to the library and all of Perlegoā€™s features. The only differences are the price and subscription period: With the annual plan youā€™ll save around 30% compared to 12 months on the monthly plan.
What is Perlego?
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, weā€™ve got you covered! Learn more here.
Do you support text-to-speech?
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Is Cryptography Algorithms an online PDF/ePUB?
Yes, you can access Cryptography Algorithms by Massimo Bertaccini in PDF and/or ePUB format, as well as other popular books in Computer Science & Cryptography. We have over one million books available in our catalogue for you to explore.

Information

Year
2022
ISBN
9781789618570
Edition
1

Section 1: A Brief History and Outline of Cryptography

This section is an introductory part and aims to provide basic definitions, information, and a history of cryptography and its algorithms.
This section of the book comprises the following chapter:
  • Chapter 1, Deep Diving into Cryptography

Chapter 1: Deep Diving into Cryptography

This chapter provides an introduction to cryptography, what it is needed for, and why it is so important in IT. This chapter also gives a panoramic view of the principal algorithms from the history of cryptography, from the Caesar algorithm to the Vernam cipher and other lesser-known algorithms, such as the Beale cipher. Then, Rivest-Shamir-Adleman (RSA), Diffieā€“Hellman, and other famous algorithms will be described in detail in the proceeding part of this book. Finally, this chapter will give you the instruments to learn cryptography and the pillars of security conservation.
In this chapter, we will cover the following topics:
  • A brief introduction to cryptography
  • Basic definitions and principal mathematical notations used in the book
  • Binary conversion and ASCII code
  • Fermat Last's Theorem, prime numbers, and modular mathematics
  • The history of the principal cryptographic algorithms and an explanation of some of them (Rosetta cipher, Caesar, ROT13, Beale, Vernam)
  • Security notation (semantic, provable, OTP, and so on)

An introduction to cryptography

One of the most important things in cryptography is to understand definitions and notations. I have never been a fan of definitions and notations, first of all, because I am the only one to use notations that I've invented. But I realize that it is very important, especially when we are talking about something related to mathematics, to agree among ourselves. Thus, in this section, I will introduce basic information and citations relating to cryptography.
We start with a definition of an algorithm.
In mathematics and computer science, an algorithm is a finite sequence of well-defined computer-implementable instructions.
An important question is: what is a cipher?
A cipher is a system of any type able to transform plaintext (a message) into not-intelligible text (a ciphertext or cryptogram):
Figure 1.1 ā€“ Encryption process
Figure 1.1 ā€“ Encryption process
To get some utility from a cipher, we have to set up two operations: encryption and decryption. In simpler terms, we have to keep the message secret and safe for a certain period of time.
We define M as the set of all the messages and C as the set of all the cryptograms.
Encryption is an operation that transforms a generic message, m, into a cryptogram, c, applying a function, E:
m ------- > f(E) --------- > c
Decryption is an operation that returns the message in cleartext, m, from the cryptogram, c, applying a function, D:
C ------- > f(D) --------- > m
Mathematically, D(E(M))= M.
This means that the E and D functions are the inverse of each other, and the E function has to be injective. Injective means different M values have to correspond to different C values.
Note that it doesn't matter whether I use capital letters or lowercase, such as (M) or (m); it's inconsequential at the moment. For the moment, I have used round brackets indiscriminately, but later I will use square brackets to distinguish secret elements of a function from known ones, for which I will use square brackets. So, the secret message M will be written as [M], just like any other secret parameter. Here, just showing how the algorithms work is within our scope; we'll leave their implementation to engineers.
There is another important notation that is key to encryption/decryption. To encrypt and decrypt a message, it is necessary to set up a key. In cryptography, a key is a parameter that determines the functional output of a cryptographic algorithm or cipher. Without a key, the algorithm would produce no useful results.
We define K as the set of all the keys used to encrypt and decrypt M, and k as the single encryption or decryption key, also called the session key. However, these two ways to define a key (a set of keys is K and a single key is k) will always be used, specifying what kind of key it is (private or public).
Now that we understand the main concepts of cryptographic notation, it is time to explain the difference between private and public keys:
  • In cryptography, a private or secret key (Kpr), denoted as [K] or [k], is an encryption/decryption parameter known only to one, both, or multiple parties in order to exchange secret messages.
  • In cryptography, a public key (Kpu) or (K) is an encryption key known by everyone who wants to send a secret message or authenticate a user.
So, what is the main difference between private and public keys?
The difference is that a private key is used both to encrypt and/or decrypt a message, while a public key is used only to encrypt a message and verify the identity (digital signatures) of humans and computers. This is a substantial and very important issue because it determines the difference between symmetric and asymmetric encryption.
Let's give a generic definition of these two methods of encryption:
  • Symmetric encryption uses only one shared key to both encrypt and decrypt the message.
  • Asymmetric encryption implements more parameters to generate a public key (to encrypt the message) and just one private key to decrypt the message.
As we will see later on, private keys are used in symmetric encryption to encrypt/decrypt the message with the same key and in asymmetric encryption in a general way for decryption, whereas public keys are used only in asymmetric encryption to encrypt the message and to perform digital signatures. You will see the function of these two types of keys later, but for now, keep in mind that a private key is used both in symmetric and asymmetric encryption, while a public key is used only for asymmetric encryption. Note that it's not my intention to discuss academic definitions and notation, so please try to figure out the scope and the use of each element.
One of the main problems in cryptography is the transmission of the key, or the key exchange. This problem resulted in strong diatribes in the community of mathematicians and cryptographers because it was very hard to determine how to transmit a key while avoiding physically exchanging it.
For example, if Alice and Bob wanted to exchange a key (before the advent of asymmetric encryption), the only trusted way to do that was to meet physically in one place. This condition caused a lot of problems with the massive adoption of telecommunication systems and the internet. The first problem was that internet communication relies on data exchange over unsafe channels. As you can easily understand, if Alice communicates with Bob through an insecure public communication channel, the private key has a severe possibility of being compromised, which is extremely dangerous for the security and privacy of communications.
For this reason, this question arises: if we use a symmetric cipher to protect our secret information, how can we securely exchange the secret key?
A simple answer is the following: we have to provide a secure channel of communication to exchange the key.
Someone could then reply: how do we provide a secure channel?
We will find the answer, or rather multiple answers, later on in this book. Even in tough military applications, such as the legendary red line between the leaders of the US and USSR during the Cold War, symmetric communication keys were used; nowadays, it is common to use asymmetric encryption to exchange a key. Once the key has been exc...

Table of contents