---
description: In this Cryptography tutorial, you will learn basics of cryptography and go through features and applications. So just click now to know.
title: Cryptography Tutorial
image: https://www.guru99.com/images/cryptography-tutorial.png
---

 

[Skip to content](#main) 

**⚡ Smart Summary**

Cryptography protects information by transforming it into a non-human-readable form that only a holder of the correct key can reverse, and this page covers its features, applications, algorithms, and a hands-on CrypTool exercise.

* 🔐 **Core idea:** Encryption converts plaintext into a cipher; decryption reverses it using a secret key.
* 🧩 **Three disciplines:** Cryptography hides meaning, cryptanalysis breaks it, and cryptology covers both.
* 📐 **Algorithm families:** Hash functions, symmetric ciphers, and public-key systems solve different problems.
* ✅ **Current standards:** AES and SHA-2 remain approved, while MD5, SHA-1, and RC4 are considered broken.
* 🧪 **Hands-on practice:** CrypTool 1 demonstrates RC4 encryption and brute-force analysis of a 24-bit key.
* 🔮 **Looking ahead:** NIST published its first post-quantum standards in August 2024.

[ Read More ](javascript:void%280%29;) 

![Cryptography Tutorial](https://www.guru99.com/images/cryptography-tutorial.png)

Information plays a vital role in business, government, and military operations, and information in the wrong hands can cost revenue or worse. To secure communication, an organization uses cryptology to cipher information — transforming it into a non-human-readable format and back again.

In this cryptography and network security article, you will learn how cryptology works and how to keep information out of the wrong hands.

## What is Cryptography?

Cryptography is the study and application of techniques that hide the real meaning of information by transforming it into non-human-readable formats and back again.

Consider an example. To send “I LOVE APPLES”, you replace every letter with the third successive letter of the alphabet, producing “K NQXG CRRNGU”. To read it, the recipient steps three letters back, as shown below.

![Cipher encryption and decryption shifting each letter three places]()

Cipher Encryption and Decryption

Turning information into non-human-readable form is called **encryption**, and reversing it is called **decryption**. The encrypted result is known as a **cipher**.

Decryption uses a secret key known only to the legitimate recipients. Because the key is required, communication stays secure even when an attacker intercepts the cipher, which makes no sense without it.

## Features of Cryptography

A cryptographic system is judged on the characteristics below.

| Feature              | What it means                                                       |
| -------------------- | ------------------------------------------------------------------- |
| **Algorithm**        | The published mathematical procedure performing the transformation. |
| **Confidentiality**  | Only holders of the key can read the protected data.                |
| **Integrity**        | Any change to the data is detectable.                               |
| **Adaptability**     | The scheme tunes to different key sizes and threat levels.          |
| **Interoperability** | Different systems and vendors exchange protected data.              |
| **Authentication**   | The origin of a message can be proven.                              |
| **Scalability**      | Performance holds up as data volumes grow.                          |
| **Key Management**   | Keys are generated, stored, rotated, and retired safely.            |

## Applications of Cryptography

Those characteristics become everyday services people rely on without noticing.

| Application            | How cryptography is used                               |
| ---------------------- | ------------------------------------------------------ |
| **TLS encryption**     | Protects traffic between a browser and a website.      |
| **Password storage**   | Stores salted hashes instead of readable passwords.    |
| **Online banking**     | Secures transactions and verifies the bank.            |
| **Cryptocurrency**     | Signs transactions and links blocks with hashes.       |
| **Encrypted email**    | Keeps message contents private in transit and storage. |
| **Digital signatures** | Proves authorship and that a document is unchanged.    |
| **Secure messaging**   | Applies end-to-end encryption between devices.         |
| **E-commerce**         | Protects card details during checkout.                 |

### RELATED ARTICLES

* [How Hackers Hack Instagram Account & Password Free ](https://www.guru99.com/how-to-hack-an-instagram-account.html "How Hackers Hack Instagram Account & Password Free")
* [How to Track/Find Live Location by Mobile Number & Phone ](https://www.guru99.com/track-someones-location-by-cell-phone-number.html "How to Track/Find Live Location by Mobile Number & Phone")
* [How to Read WhatsApp Messages without Blue Tick (7 Ways) ](https://www.guru99.com/how-to-read-whatsapp-messages-without-blue-tick.html "How to Read WhatsApp Messages without Blue Tick (7 Ways)")
* [How Hackers Can Hack an iPhone Remotely (5 Methods) ](https://www.guru99.com/how-to-hack-an-iphone.html "How Hackers Can Hack an iPhone Remotely (5 Methods)")

## What is Cryptanalysis?

Cryptanalysis is the art of decrypting messages without the key used to encrypt them. It applies mathematical analysis and algorithms to decipher ciphers, and it is used both to breach systems and, defensively, to measure how much protection an algorithm offers.

The success of a cryptanalysis attack depends on:

* Amount of time available
* Computing power available
* Storage capacity available

The following are the commonly discussed cryptanalysis attacks:

* **Brute force attack** — tries every possible combination of the plaintext or key, ciphering each one and comparing it against the original cipher.
* **Dictionary attack** — uses a wordlist to match either the plaintext or the key. It is mostly used when trying to [crack encrypted passwords](https://www.guru99.com/how-to-crack-password-of-an-application.html).
* **Rainbow table attack** — compares the ciphertext against pre-computed hashes to find matches. Salting each stored password defeats it.

## What is Cryptology?

Cryptology is the umbrella field combining cryptography and cryptanalysis. Both halves matter: an algorithm is trusted only once cryptanalysts have tried and failed to break it.

## Encryption Algorithms

The algorithms below appear repeatedly in security work. Note which remain approved and which survive only in legacy systems.

* **MD5** — short for Message-Digest 5, it produces 128-bit hash values. MD5 is a hash function rather than [encryption](https://www.guru99.com/difference-encryption-decryption.html), so it cannot be reversed by design. It is not collision resistant — two different inputs can produce the same hash — and is unfit for passwords or signatures.
* **SHA** — short for Secure Hash Algorithm, this family generates condensed representations of a message, called a message digest:  
  * **SHA-0**: produces 160-bit hash values. It was withdrawn for a significant flaw and replaced by SHA-1.
  * **SHA-1**: produces 160-bit hash values. A practical collision was demonstrated in 2017 and NIST disallowed it for digital signatures, so avoid it.
  * **SHA-2**: a family of six functions including SHA-256 and SHA-512, working on 32-bit and 64-bit words respectively. Both remain approved.
  * **SHA-3**: standardized in 2015 and formerly known as Keccak, it uses a different internal design as a backup to SHA-2.
* **AES** — the Advanced Encryption Standard is the symmetric block cipher protecting most data at rest and in transit today, with 128-, 192-, and 256-bit keys. It replaced DES and is the default for new systems.
* **RC4** — a stream cipher once common in Secure Sockets Layer (SSL) and Wired Equivalent Privacy (WEP). Both protocols are obsolete, and RFC 7465 prohibited RC4 in every version of TLS in 2015\. It survives here as a teaching example.
* **Blowfish** — a keyed symmetric block cipher used historically for passwords and files. Its 64-bit block size makes AES the better modern choice.

Looking ahead, NIST published its first post-quantum standards in August 2024 — ML-KEM for key exchange, ML-DSA and SLH-DSA for signatures — which will gradually replace today’s public-key algorithms.

## Hacking Activity: How to Create a Cipher Using CrypTool

In this practical CrypTool exercise, you create a simple cipher with RC4 and then recover it with a brute-force analysis, assuming the key is known to be 24 bits. The point is to show why a short key and a broken cipher offer no real protection.

### Creating the RC4 Stream Cipher

**Step 1) Download and install CrypTool**

CrypTool 1 is an open-source educational tool for cryptology. Active development has since moved to CrypTool 2, but release 1.4.42 still runs on Windows and matches the screens below. Download it from [cryptool.org](https://www.cryptool.org/en/ct1/).

**Step 2) Open CrypTool and replace the text**

The phrase to encrypt is _Never underestimate the determination of a kid who is time-rich and cash-poor_. The key is 00 00 00.

* Open CrypTool 1.

![CrypTool 1 main window before the sample text is replaced]()

* Replace the text with the phrase above.

![CrypTool document containing the replacement phrase]()

**Step 3) Encrypt the text**

* Click the Encrypt/Decrypt menu.

![CrypTool Encrypt slash Decrypt menu with Symmetric modern selected]()

* Point to Symmetric (modern), then select RC4.

![CrypTool RC4 key entry dialog]()

**Step 4) Select the encryption key**

* Select 24 bits as the key length.
* Set the value to 00 00 00.
* Click Encrypt to produce the stream cipher below.

![Resulting RC4 stream cipher shown in CrypTool]()

### Attacking the Stream Cipher

**Step 5) Start the analysis**

* Click the Analysis menu.

![CrypTool Analysis menu with Symmetric Encryption modern highlighted]()

* Point to Symmetric Encryption (modern), then select RC4.

![CrypTool brute-force analysis dialog for RC4]()

* The assumption is a 24-bit secret key, so select 24 bits as the key length.
* Click Start.

![CrypTool brute-force analysis progress window]()

* **Note:** the time taken depends on the processing capacity of the machine being used and on the key length. A longer key takes longer, which is why modern keys are 128 bits or more.

**Step 6) Analyze the results**

* When the analysis finishes, candidate keys appear ranked as follows.

![CrypTool brute-force results ranked by entropy]()

* **Note:** a lower entropy value usually indicates the correct result, though a higher one can be right.
* Select the line that reads as sensible text, then click Accept selection.

## FAQs

🔑 What is the difference between symmetric and asymmetric encryption?

Symmetric encryption uses one shared key and is fast, so it protects bulk data. Asymmetric encryption uses a public and private key pair, which solves key distribution and enables digital signatures.

#️⃣ Is hashing the same as encryption?

No. Encryption is reversible with a key; hashing is a one-way transformation to a fixed-length digest. Password systems store salted hashes precisely because the original value cannot be recovered.

🧂 What is a salt and why do passwords need one?

A salt is a unique random value stored beside each password hash. It makes identical passwords hash differently, defeating pre-computed rainbow tables and forcing an attacker to work on every account separately.

🏛️ What is a digital certificate?

A digital certificate binds a public key to a verified identity and is signed by a certificate authority. Browsers check that signature before trusting the encrypted connection to a website.

⚛️ How does quantum computing threaten cryptography?

A large quantum computer would break RSA and elliptic-curve keys, while symmetric ciphers need only larger keys. NIST answered by publishing post-quantum standards in 2024 so migration can start early.

🤖 How is AI used in cryptography and code breaking?

Machine learning does not break strong modern ciphers. It is used instead for side-channel analysis, spotting weak or reused keys at scale, and flagging anomalous encrypted traffic during threat detection.

🧩 Can GitHub Copilot write secure cryptographic code?

Copilot speeds up boilerplate but often suggests outdated algorithms or hard-coded keys. Treat every suggestion as a draft, prefer a vetted library over hand-rolled code, and have a reviewer check key handling.

💼 Which careers use cryptography day to day?

Security engineers, penetration testers, and forensic analysts apply it daily, and it forms a full domain of the [CISSP certification](https://www.guru99.com/cissp-certification.html). Most roles configure vetted libraries rather than design algorithms.

#### Summarize this post with:

ChatGPT Perplexity Grok Google AI 

**Stay Updated on AI** **Get Weekly AI Skills, Trends, Actionable Advice.** 

##### Sign up for the newsletter

Subscribe for Free 

You have successfully subscribed.  
Please check your inbox. 

![AI-Newsletter]() Chosen by over **350,000+** professionals 

[Scroll to top ](#wrapper)Scroll to top 

× 

Toggle Menu Close 

Search for: 

Search

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://www.guru99.com/#organization","name":"Guru99","sameAs":["https://www.facebook.com/Guru99Official","https://twitter.com/guru99com"],"logo":{"@type":"ImageObject","@id":"https://www.guru99.com/#logo","url":"https://www.guru99.com/images/guru99-logo-v1-150x59.png","contentUrl":"https://www.guru99.com/images/guru99-logo-v1-150x59.png","caption":"Guru99","inLanguage":"en-US"}},{"@type":"WebSite","@id":"https://www.guru99.com/#website","url":"https://www.guru99.com","name":"Guru99","publisher":{"@id":"https://www.guru99.com/#organization"},"inLanguage":"en-US"},{"@type":"ImageObject","@id":"https://www.guru99.com/images/cryptography-tutorial.png","url":"https://www.guru99.com/images/cryptography-tutorial.png","width":"700","height":"250","caption":"Cryptography Tutorial","inLanguage":"en-US"},{"@type":"BreadcrumbList","@id":"https://www.guru99.com/how-to-make-your-data-safe-using-cryptography.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":"1","item":{"@id":"https://www.guru99.com","name":"Home"}},{"@type":"ListItem","position":"2","item":{"@id":"https://www.guru99.com/ethical-hacking","name":"Ethical Hacking"}},{"@type":"ListItem","position":"3","item":{"@id":"https://www.guru99.com/how-to-make-your-data-safe-using-cryptography.html","name":"Cryptography Tutorial"}}]},{"@type":"WebPage","@id":"https://www.guru99.com/how-to-make-your-data-safe-using-cryptography.html#webpage","url":"https://www.guru99.com/how-to-make-your-data-safe-using-cryptography.html","name":"Cryptography Tutorial","dateModified":"2026-07-21T10:52:27+05:30","isPartOf":{"@id":"https://www.guru99.com/#website"},"primaryImageOfPage":{"@id":"https://www.guru99.com/images/cryptography-tutorial.png"},"inLanguage":"en-US","breadcrumb":{"@id":"https://www.guru99.com/how-to-make-your-data-safe-using-cryptography.html#breadcrumb"}},{"@type":"Person","@id":"https://www.guru99.com/author/oliver","name":"Oliver Jones","description":"I'm Oliver Jones, an ethical hacker sharing insights on cybersecurity. With years of experience, I provide guides to help you safeguard your digital world.","url":"https://www.guru99.com/author/oliver","image":{"@type":"ImageObject","@id":"https://www.guru99.com/images/oliver-jones-auhtor.png","url":"https://www.guru99.com/images/oliver-jones-auhtor.png","caption":"Oliver Jones","inLanguage":"en-US"},"worksFor":{"@id":"https://www.guru99.com/#organization"}},{"articleSection":"Ethical Hacking","headline":"Cryptography Tutorial","description":"In this Cryptography tutorial, you will learn basics of cryptography and go through features and applications. So just click now to know.","keywords":"hacking","speakable":{"@type":"SpeakableSpecification","cssSelector":[".entry-title",".summary"]},"@type":"Article","author":{"@id":"https://www.guru99.com/author/oliver","name":"Oliver Jones"},"dateModified":"2026-07-21T10:52:27+05:30","image":{"@id":"https://www.guru99.com/images/cryptography-tutorial.png"},"copyrightYear":"2026","name":"Cryptography Tutorial","subjectOf":[{"@type":"HowTo","name":"How to create a Cipher using CrypTool","description":"Here is step by step process How to create a Cipher using CrypTool","step":[{"@type":"HowToStep","name":"Step 1) Download and intall CryptTool","text":"We will use CrypTool 1 as our cryptology tool. CrypTool 1 is an open source educational tool for crypto logical studies. You can download it from https://www.cryptool.org/en/ct1/","url":"https://www.guru99.com/how-to-make-your-data-safe-using-cryptography.html#step1"},{"@type":"HowToStep","name":"Step 2) Open CryptTool and replace the text","text":"We will encrypt the following phrase","image":{"@type":"ImageObject","url":"https://cdn.guru99.com/images/EthicalHacking/Cryptool1.png"},"url":"https://www.guru99.com/how-to-make-your-data-safe-using-cryptography.html#step2"},{"@type":"HowToStep","name":"Step 3) Encrypt the text","text":"Click on Encrypt/Decrypt menu","image":{"@type":"ImageObject","url":"https://cdn.guru99.com/images/EthicalHacking/Cryptool3.png"},"url":"https://www.guru99.com/how-to-make-your-data-safe-using-cryptography.html#step3"},{"@type":"HowToStep","name":"Step 4) Select encryption key","text":"Select 24 bits as the encryption key, Set the value to 00 00 00 and Click on Encrypt button You will get the following stream cipher","image":{"@type":"ImageObject","url":"https://cdn.guru99.com/images/EthicalHacking/Cryptool5.png"},"url":"https://www.guru99.com/how-to-make-your-data-safe-using-cryptography.html#step4"},{"@type":"HowToStep","name":"Step 5) Start Analysis","text":"Click on Analysis menu","image":{"@type":"ImageObject","url":"https://cdn.guru99.com/images/EthicalHacking/Analysys_menu.png"},"url":"https://www.guru99.com/how-to-make-your-data-safe-using-cryptography.html#step5"},{"@type":"HowToStep","name":"Step 6) Analyse the results","text":"When the analysis is complete, you will get the following results.","image":{"@type":"ImageObject","url":"https://cdn.guru99.com/images/EthicalHacking/Analysys_result.png"},"url":"https://www.guru99.com/how-to-make-your-data-safe-using-cryptography.html#step6"}]},{"@type":"FAQPage","mainEntity":[{"@type":"Question","name":"What is the difference between symmetric and asymmetric encryption?","acceptedAnswer":{"@type":"Answer","text":"Symmetric encryption uses one shared key and is fast, so it protects bulk data. Asymmetric encryption uses a public and private key pair, which solves key distribution and enables digital signatures."}},{"@type":"Question","name":"Is hashing the same as encryption?","acceptedAnswer":{"@type":"Answer","text":"No. Encryption is reversible with a key; hashing is a one-way transformation to a fixed-length digest. Password systems store salted hashes precisely because the original value cannot be recovered."}},{"@type":"Question","name":"What is a salt and why do passwords need one?","acceptedAnswer":{"@type":"Answer","text":"A salt is a unique random value stored beside each password hash. It makes identical passwords hash differently, defeating pre-computed rainbow tables and forcing an attacker to work on every account separately."}},{"@type":"Question","name":"What is a digital certificate?","acceptedAnswer":{"@type":"Answer","text":"A digital certificate binds a public key to a verified identity and is signed by a certificate authority. Browsers check that signature before trusting the encrypted connection to a website."}},{"@type":"Question","name":"How does quantum computing threaten cryptography?","acceptedAnswer":{"@type":"Answer","text":"A large quantum computer would break RSA and elliptic-curve keys, while symmetric ciphers need only larger keys. NIST answered by publishing post-quantum standards in 2024 so migration can start early."}},{"@type":"Question","name":"How is AI used in cryptography and code breaking?","acceptedAnswer":{"@type":"Answer","text":"Machine learning does not break strong modern ciphers. It is used instead for side-channel analysis, spotting weak or reused keys at scale, and flagging anomalous encrypted traffic during threat detection."}},{"@type":"Question","name":"Can GitHub Copilot write secure cryptographic code?","acceptedAnswer":{"@type":"Answer","text":"Copilot speeds up boilerplate but often suggests outdated algorithms or hard-coded keys. Treat every suggestion as a draft, prefer a vetted library over hand-rolled code, and have a reviewer check key handling."}},{"@type":"Question","name":"Which careers use cryptography day to day?","acceptedAnswer":{"@type":"Answer","text":"Security engineers, penetration testers, and forensic analysts apply it daily, and it forms a full domain of the CISSP certification. Most roles configure vetted libraries rather than design algorithms."}}]}],"@id":"https://www.guru99.com/how-to-make-your-data-safe-using-cryptography.html#schema-32295","isPartOf":{"@id":"https://www.guru99.com/how-to-make-your-data-safe-using-cryptography.html#webpage"},"publisher":{"@id":"https://www.guru99.com/#organization"},"inLanguage":"en-US","mainEntityOfPage":{"@id":"https://www.guru99.com/how-to-make-your-data-safe-using-cryptography.html#webpage"}}]}
```
