*Cryptography Tutorial: cryptanalytics, RC4, CrypTool*

**Before you start I’ll highly suggest you to read **Ethical Hacking Course Part 1**, and then continue with this post. Ethical Hacking Course Part 3 , Part 4 , Part 5 and Part 6.**

Information plays an important role within the running of business, organizations, military operations, etc. data within the wrong hands will result in loss of business or harmful results. To secure communication, a business will use cryptanalytics to cipher data. cryptanalytics involves remodeling data into the bloodless decipherable format and the other way around.

Warning – It’s only for Education purpose only . Don’t do Missus it , It only for Knowledge and Education purpose

**Topics coated during this half –**

*What is cryptography ?*

*What is cryptanalytics ?*

*What is cryptology ?*

*Encryption Algorithms*

*Hacking Activity : Hack Now!*

Page Contents

### 1.What is Cryptography?

Cryptography is that the study and application of techniques that hide the important which means of knowledge by remodeling it into bloodless decipherable formats and the other way around.

Let’s illustrate this with the help of AN example. Suppose you would like to send the message “I LOVE APPLES”, you’ll be able to replace each letter within the phrase with the third sequent letter in the alphabet. The encrypted message are going to be “K NQXG CRRNGV”. To rewrite our message, we’ll have to be compelled to return 3 letters within the alphabet mistreatment the letter that we wish to rewrite. The image below shows however the transformation is completed.

The method of reworking data into bloodless decipherable kind is termed secret writing.

The method of reversing secret writing is termed secret writing.

Decryption is completed employing a secret key that is simply renowned to the legitimate recipients of the knowledge. The secret’s accustomed rewrite the hidden messages. This makes the communication secure as a result of though the assaulter manages to urge the knowledge, it’ll not add up to them.

**The encrypted data is understood as a cipher.**

### 2.What is Cryptanalysis?

Cryptanalysis is that the art of making an attempt to rewrite the encoded messages while not the utilization of the key that was accustomed encrypt the messages. cryptanalytics uses mathematical analysis & algorithms to decipher the ciphers. The success of cryptanalysis attacks depends

**Amount of your time available****Computing power available****Storage capability available**

**The following could be a list of the normally used cryptanalytics attacks-**

**Brute force attack–**this sort of attack uses algorithms that try and guess all the potential logical mixtures of the plaintext that are then ciphered and compared against the first cipher.

**Dictionary attack–**this sort of attack uses a wordlist so as to search out a match of either the plaintext or key. it’s principally used once making an attempt to crack encrypted passwords.

**Rainbow table attack–**this sort of attack compares the cipher text against pre-computed hashes to search out matches.

### 3.What is cryptology?

*Cryptology combines the techniques of cryptography and cryptanalytics.*

* *

### 4.Encryption Algorithms

**MD5–**this can be the signifier for Message-Digest five. it’s accustomed produce 128-bit hash values. on paper, hashes can not be reversed into the first plain text. MD5 is employed to encode passwords moreover as check knowledge integrity. MD5 isn’t collision resistant. Collision resistance is that the difficulties to find 2 values that manufacture identical hash values.

**SHA–**this can be the signifier for Secure Hash rule. SHA algorithms are accustomed generate condensed representations of a message (message digest). it’s numerous versions such as.

**SHA-0:**produces 120-bit hash values. it absolutely was withdrawn from use because of important flaws and replaced by SHA-1.

**SHA-1:**produces 160-bit hash values. it’s like earlier versions of MD5. it’s cryptologic weakness and isn’t counseled to be used since the year 2010.

**SHA-2:**it’s 2 hash functions specifically SHA-256 and SHA-512. SHA-256 uses 32-bit words whereas SHA-512 uses 64-bit words.

**SHA-3:**this rule was formally referred to as Keccak.

**RC4–**this rule is employed to form stream ciphers. it’s principally utilized in protocols love Secure Socket Layer (SSL) to encode net communication and Wired Equivalent Privacy (WEP) to secure wireless networks.

**BLOWFISH–**this rule is employed to form keyed, symmetrically blocked ciphers. It may be accustomed encode passwords and alternative knowledge.

### 5.Hacking Activity: Use CrypTool

In this sensible situation, we’ll produce an easy cipher mistreatment the RC4 rule. we’ll then conceive to rewrite it mistreatment brute-force attack. For this exercise, allow us to assume that we all know the secret writing secret secret’s twenty four bits. we’ll use this data to interrupt the cipher.

We can use CrypTool one as our cryptanalytics tool. CrypTool one is AN open supply academic tool for crypto logical studies. you’ll be able to transfer it from Downloads – CrypTool Portal

**Creating the RC4 stream cipher**

We can encode the subsequent phrase

Never underestimate the determination of a child who is time-rich and cash-poor

We will use 00 00 00 because the secret writing key.

**Open CrypTool 1**- Replace the text with ne’er underestimate the determination of a child who is time-rich and cash-poor
- Click on encode/Decrypt menu
- Point to parallel (modern) then choose RC4 as shown above
- The following window can appear
- Select twenty four bits because the secret writing key
- Set the worth to 00 00 00
- Click on Encrypt button
- You will get the subsequent stream cipher

**Attacking the stream cipher**

- Click on Analysis menu
- Point to parallel secret writing (modern) then select RC4 as shown above
- You will get the following window
- Remember the belief created is that the secret secret’s 24 bits. thus ensure you choose twenty four bits because the key length.
- Click on the beginning button. you may get the subsequent window

Note: the time taken to complete the Brute-Force Analysis attack depends on the process capability of the machine been used and therefore the key length. The longer the key length, the longer it takes to complete the attack.

- When the analysis is complete, you may get the subsequent results.

Note: a lower Entropy range means that it’s the foremost possible correct result. it’s potential a better than rock bottom found Entropy worth might be the right result.

*Select the road that produces the foremost sense then click on settle for choice button once done*

### Conclusion

- Cryptography is that the science of ciphering and deciphering messages.

- A cipher could be a message that has been reworked into a bloodless decipherable format.

- Deciphering is reversing a cipher into the first text.

- Cryptanalysis is that the art of deciphering ciphers while not the information of the key accustomed cipher them.

- Cryptology combines the techniques of each cryptography and decipherer.

**Hope you’ll like this post , moral Hacking Course (Part – 2) is completed . You can Read Ethical Hacking Course Part 1, part 3 is coming soon.**

*March Long Challenge 2021 Solutions*

*March Long Challenge 2021 Solutions*

*An Interesting Sequence ISS SOLUTION**Tree House THOUSES SOLUTION**Valid Paths VPATH SOLUTION**Modular Equation MODEQ SOLUTION**Tic Tac Toe TCTCTOE SOLUTION**Xor Equality XOREQUAL SOLUTION**Golf LKDNGOLF SOLUTION**Solubility SOLBLTY SOLUTION*

*April Long Challenge 2021 Solutions*

*April Long Challenge 2021 Solutions*

*Chef and Dice SDICE Solution**Worthy Matrix KAVGMAT Solution**Binary String MEX MEXSTR Solution**Boolean Game BOOLGAME Solution**Tree Permutations TREEPERM Solution**Destroy the EMP Chip CHAOSEMP Solution**Chef and Pair Flips PAIRFLIP Solution**String Power STRPOW Solution**Brahma and Shiva SHRINES Solution**Water Sort Puzzle (Challenge) WTRSORT Solution**World Record BOLT Solution**Strong Language SSCRIPT Solution**Valid Pair SOCKS1 Solution*

*Codechef Long Challenge Solutions*

*Codechef Long Challenge Solutions*

*February Long Challenge 2021*

*February Long Challenge 2021*

#### 1. Frog Sort Solution Codechef

#### 2. Chef and Meetings Solution Codechef

#### 3. Maximise Function Solution Codechef

#### 4. Highest Divisor Solution Codechef

#### 5. Cut the Cake Challenge Solution Codechef

#### 6. Dream and the Multiverse Solution Codechef

#### 7. Cell Shell Solution Codechef

#### 8. Multiple Games Solution Codechef

#### 9. Another Tree with Number Theory Solution Codechef

#### 10. XOR Sums Solution Codechef

#### 11. Prime Game Solution CodeChef

#### 12. Team Name Solution Codechef

### January Long Challenge 2021

**Chef and Division 3 DIVTHREE SOLUTION Code Chef****Encoded String DECODEIT SOLUTION Code Chef****Point Of Impact BILLRD SOLUTION Code Chef****Fair Elections FAIRELCT SOLUTION Code Chef****Watching CPL WIPL SOLUTION Code Chef****Chef and Ants ANTSCHEF SOLUTION Code Chef****Blackjack BLKJK SOLUTION Code Chef****And-Or Game ORAND SOLUTION Code Chef****Stack-Queue Sort (Challenge) SQSORT SOLUTION Code Chef****Expected Number of SCCs RCTEXSCC SOLUTION Code Chef****Curious Matrix CURMAT SOLUTION Code Chef****Cool Subsets COOLSBST SOLUTION Code Chef****Sequence Creation ARCRT SOLUTION Code Chef****Greedy Students GRDSTD SOLUTION Code Chef**

### November Challenge 2020 SOLUTION CodeChef

- Ada and Dishes SOLUTION ADADISH
- Iron Magnet and Wall SOLUTION FEMA2
- Magical Candy Store SOLUTION CNDYGAME
- Unusual Queries SOLUTION UNSQUERS
- Red-Black Boolean Expression SOLUTION RB2CNF
- Chef and the Combination Lock SOLUTION CHEFSSM
- Scalar Product Tree SOLUTION SCALSUM
- Connect on a Grid (Challenge) SOLUTION CONGRID

### October Lunchtime 2020 CodeChef SOLUTIONS

- AND Plus OR SOLUTION ANDOR
- Chef and Subtree MEXs SOLUTION SUBMEXS
- Chef Likes Good Sequences SOLUTION GSUB
- Cute Chef Gift SOLUTION COPAR
- Chef Is Just Throwing Random Words SOLUTION SSO
- Counting Spaghetti SOLUTION CDSUMS
- Chef and Edge Flipping SOLUTION EFLIP

*RELATED :*

- Top Best Keylogger in Python 3 Make One
*What is Hacking?**Secrets of the Deep Dark Web**CODECHEF September Lunchtime 2020 SOLUTIONS**August Lunchtime 2020 SOLUTIONS*

*Related :*

*A. Shandom Ruffle SOLUTION**B. Pear TreaP SOLUTION**C. Sneetches and Speeches 3 SOLUTION**D. The Grim Treaper SOLUTION**Y. Sneetches and Speeches 1 SOLUTION**Z. Trick or Treap SOLUTION**A. Floor Number SOLUTION CODE FORCES**B. Symmetric Matrix SOLUTION CODE FORCES**C. Increase and Copy SOLUTION CODE FORCES**D. Non-zero Segments SOLUTION CODE FORCES**E. Rock, Paper, Scissors SOLUTION CODE FORCES**F. Number of Subsequences SOLUTION CODE FORCES*

*Related :*

*Chef and Easy Queries SOLUTIONS CHEFEZQ**Covid Run SOLUTIONS CVDRUN OCTOBER CHALLENGE**Positive AND SOLUTIONS POSAND**Replace for X SOLUTIONS REPLESX**Village Road Network SOLUTIONS VILLNET**Random Knapsack SOLUTIONS RANDKNAP**D-Dimensional MST SOLUTIONS DDIMMST**Compress all Subsegments SOLUTIONS SEGCOMPR**Adding Squares SOLUTIONS ADDSQURE**Inversions SOLUTIONS INVSMOD2 OCOTBER CHALLENGE**Rooted Minimum Spanning Tree SOLUTIONS ROOTMST*