# Encrypted Chat I am generally interested computer science and

600 WordsApr 23, 20193 Pages
Encrypted Chat I am generally interested computer science and computer security so as I researched those fields I found out that it is easy to steal unencrypted so I researched what encryption and decryption really meant. After my research I found out that these are main points that classify encrypted and unencrypted information. So when we send unencrypted information 1. We type message and press SEND button 2. It is sent to server and when we send encrypted information 1. We type message and press SEND button 2. Message is converted to random numbers, symbols and letters 3. It is sent to server  This is simple demonstration of client server relation. So during first example if we send…show more content…
It was invented in 1977 by Ron Rivest, Adi Shamir, and Leonard Adleman and it is one of the most sued encryption systems used today and it easy to understand and implement in my program. There are 4 Main parts in encrypting and decrypting using RSA. Part 1 Generating Public and Private Keys Before any messages are sent server does this calculations independently 1.1) we should pick two prime numbers we will pick p = 3 and q = 11 1.2) we then calculate n which is p * q it equals 3*11=33 1.3) Then we calculate z = ( p - 1 ) * ( q - 1 ) it equals ( 3 - 1 ) * ( 11 - 1 ) = 20 1.4) we choose a prime number k but z should not be divisible by k. We have several choices for k: 7, 11, 13, 17, 19 and other prime numbers but we cannot use 5 because 20 is divisible by 5. So we pick k=7. 1.5) we then have numbers n = 33 and k = 7 this are Server's public key. 1.6) Then we calculate secret key 1.7) k * j = 1 (mod z) 1.8) 7 * j = 1 (mod 20) we then use calculator and j equals 3 Part 2 Encrypting the message 2.1) P ^ k = E (mod n) P is the message we are encrypting N and k are Server's public key from previous calculations E will be our encrypted message After plugging in the values, this equation is solved as follows: 2.2) 14 ^ 7 = E (mod 33) 2.3) we then use calculator and E is 2 Part 3 Decrypting the Message 3.1) E ^ j = P (mod n) E is the Encrypted message we calculated