Hacktoberfest-2k18
Hacktoberfest-2k18 copied to clipboard
Implement Playfair Cipher
Description
The Playfair cipher encrypts pairs of letters (digraphs), instead of single letters. The Playfair cipher starts with creating a key table. The key table is a 5×5 grid of letters that will act as the key for encrypting your plaintext. Each of the 25 letters must be unique and one letter of the alphabet (usually Q) is omitted from the table (as there are 25 spots and 26 letters in the alphabet). Check out resources below for further details.
Input:
- A String of lower case letters, called Plain Text.
- Another String of lower case letters, called Keysquare, or you can also generate it randomly.
You are expected to write a program that receives a Plain Text (string) and Keysquare (string) (or generate it randomly) and returns the encrypted ciphertext.
Example: Plain Text: i thought i was speed dating Keysquare: qxoaehgcrdkvsimutlfpbnzwy Cipher Text: VFCQTHGUFAOIMLQOGEXFVWVG
Details
Technical Specifications:
- Type of issue: No more than one implementation will be accepted for each language. Once the implementation for a language has been taken up (i.e if it is checked in the 'Issue Progress' section), you must choose from the remaining.
- Time Limit: Issues will be given on a first-come, first-serve basis. Once you take this issue up, you must complete it within 2 days, failing which the issue will be allocated to the next person who requested for this issue.
- Additional instructions: While making the Pull Request, attach screenshots of 5 sample inputs and their corresponding output.
Issue requirements / progress
- [ ] C
- [ ] C++
- [ ] Python
- [x] Java
Resources
http://practicalcryptography.com/ciphers/playfair-cipher/ https://learncryptography.com/classical-encryption/playfair-cipher
Directory Structure
For this issue, use the following directory of the Hacktoberfest-2k18 repository: /systems/cryptography/playfair-cipher/<language_name> (where language_name is one of the languages mentioned above.)
Note
Please claim the issue first by commenting here before starting to work on it.
I am willing to contribute to this repo by writing codes of playfair cipher in java
I would like to solve this in C++
Can I take this up for python?
sure go ahead.