Inspiration## What it does

We have encountered the problem that privacy needs to be more prominent when communicating between people through social media platforms such as Instagram or Messenger. By making a program focusing on encrypting and decrypting messages that allows two people to communicate without another person being able to understand, we have learned more about python.

How we built it

When building the project, we brainstormed our idea first. Then we broke down each component by parts. The project was in three sections: Encrypting the string into a list of numbers Applying the Euclidean Algorithm Decrypting the number string into a letter string to generate the message First, we had to convert the string message into a string of numbers. We had challenges converting a string into a list of a series of 3 numbers because a portion of the line will be lost by section by three if it is not divisible by three. We organized the project accordingly : Our goals: Encrypt a message, Decrypt a message Key Generation Generate the Composite Number Product of 3 Distinct Prime Numbers Generate the Prime Number Generate a relatively small prime number Encryption Create a dictionary to assign an integer to every lowercase letter, uppercase letter, and space Replace every character in the message string with their respective value in the dictionary Create a for loop for every character in the string Add every value to a temporary string Separate the temporary string by adding a comma after every 3 number IT IS IMPORTANT TO RECOGNIZE THAT IF THE LENGTH OF THE TEMPORARY STRING IS NOT DIVISIBLE BY 3, THERE WILL BE MISTAKES LATER ON Therefore, add trailing zeroes at the end until it is divisible by 3 Then seperate the temporary string into a permanent list of 3 character strings Find the encrypted message For every 3-character string in the permanent list, find its modulo and append it to a list of modulo The modulo list is the encrypted message to send Euclidean Algorithm Reverse engineers greatest common divider It is necessary for decryption Output a reverse-engineered list Decryption Create the reverse of the dictionary Convert the reverse-engineered list into a string Create a loop to make a string that is seperated by commas every two numbers Convert the string seperated by commas for every two numbers into a list of two numbers remove the list of zeroes and empty lists Make use of the reverse of the dictionary With a loop, it will output the decrypted string THAT'S IT!

Challenges we ran into

  1. Converting a string into a list of three numbers. # It was challenging because a number such as 9, when converting, could result in a list with [009]; this would cause issues later on as [009] is not the same as [9] due to conversion into an integer list, therefore, before converting the string into a list, we add trailing zeroes depending on the length of the string. 2.Then, another major problem we faced was concerning the U. I. We had difficulties making the front end. In fact, at first, we put python and html together. In order to do so, we tried converting python into Javascript and then combining it into html. Unfortunately, it did not work as it was way too complicated and almost impossible for us, Beginners to convert python into Javascript. Therefore, we lost much time making a whole html code and trying to figure out how to convert it.

Accomplishments that we're proud of

The main accomplishment we are proud of is that we finished in time and we were able to present a finished project. We ran through so many difficulties, but we kept going. We were able to apply what we learned in class in the code and we were able to learn new things during python. We will be able to use this new knowledge later on.

What we learned

In addition, we improved our python skills by learning more about dictionaries, strings, and how to convert back and forth between strings and lists.

What's next for BEGINNER | Encryption/Decrypting processing

Our project will later on be able to encrypt and decrypt messages for multiple people such as a group of friends. Our next step will be adding punctuation. We will also be able to run our program through multiple languages. Then, our main focus will be to make a better front end and publish it as an app or a website.

Please check our google drive for our code.

Built With

Share this project:

Updates