How can I become an algorithm ninja
Every one to two months we organize a SmartNinja Challenge, in which our students / course participants can compete to create the best software projects.
For the May / June 2020 Challenge, participants would need a desktop program or a web application to use Caesar encryption create.
Caesar encryption? What's this?
Caesar encryption is one very simple method of encrypting data. It was made by the famous Roman Emperor Julius Caesar named who used this method to prevent unwanted eyes from reading his messages.
Nowadays this method of encrypting data is outdated and insecure, but back then (when only a few people could read or even decrypt a text) it was a very effective method.
You may have used Caesar's cipher than you did in the school were and your classmates Paper notes Have written. To prevent other classmates from reading your note, you probably used Caesar's cipher - without knowing that you used a method over 2000 years old!
How does Caesar encryption work?
Suppose we want to encrypt this text: "Hello"
To encrypt the text, we will add the letters of the word to a specific number move, we say by 3 places. This means that we are rotating the entire alphabet three places.
In this case, A becomes D, B becomes E, C becomes F, and so on (at least in the english alphabet):
This is our message "Hello" to "Kdoor".
The recipient of our message needs to know the number by which we shifted the alphabet (in our case 3). However, this information must remain secret, only the sender and recipient should know it. That's why we call this information one secret key.
Of course, with an encryption algorithm as basic as Caesar's cipher, anyone could just try all possible combinations and find out what the secret message is. This type of "attack" on the cipher is called "Brute force" attack (because we try all possible combinations).
The challenge our students had to meet was to create a program that would do the Caesar encryption for us (so that we don't have to do it manually).
The program could be either one Desktop program or one Web application be.
Additional requirements were that of the program in python had to be written (at least the part that implements the actual Caesar encryption algorithm) and the participants had to write the algorithm themselves.
No programming package (a pre-written section of code) was allowed to be used that would perform the encryption / decryption part. Furthermore, the program had to have a Graphical user interface (GUI).
Two students got the best score and won the competition: Beno and Jaka. Congratulations!
Beno attended our course Programming for beginnerswhere he learned how to use the Python programming language and create desktop applications.
He developed a desktop program and used Tkinter for the graphical user interface.
The secret key (number) comes with a Slider selected. As you move the slider, the moves red line of letters also in real time, so that you get a nice overview of the conversion of letters.
By clicking the check box Benigma you can reset the entire process. Instead of encrypting, the program starts decrypting a message.
The code from Beno's solution is available here on GitHub.
Jaka attended two of our courses: Web Development 1 and Web Development 2. Instead of a desktop program, it has a Web application created.
The user interface was made with the help of HTML and CSS and the website adapts well to mobile screens (Responsive design).
Jaka's code is accessible on his GitHub account and the web app runs on Heroku web servers.
We warmly congratulate both winners. You did a great job! 🎉 We are looking forward to the further SmartNinja Challenges and exciting results. Stay up to date here on our GitHub account 🤓
- A polynomial is a vector space
- The Germans play Scrabble
- How did Putin amass enormous wealth
- Can someone hypnotize someone on social media
- What are lead-acid batteries used for?
- Which is the most difficult ACCA paper
- Why is money important to all people
- How does Kaggle make money
- Are aliens like humans
- Why does my face look stupid in general
- How is the Mexican economy affecting other countries
- What do you think of Plato's dialogues
- Where do you sell your product online
- How fast is the lightning moving
- Teachers do drugs
- Canada has a lot of immigrants
- Why does cancer cause weight loss
- What is real analysis
- America has too many guns
- What does space mean in the general theory of relativity
- What is the most common mistake people make
- Do you live in Budapest 1
- Profit is the only goal of business
- What is Paytm first