Author | Message |
---|---|
mkumar4
Posts: 4
|
Posted 04:12 Apr 02, 2017 |
Prof., Using brute-force I'm able to generate the possible 10bit key and I can apply on bits available in "msg1.txt" to decrypt and get the 8bit plain text. However, I'm unable to figure out what is the correct key because on every run it gives me a random 8bit plain text code for all possible key.
Thank you. |
amclees2
Posts: 12
|
Posted 09:18 Apr 02, 2017 |
Since CASCII characters do not line up properly with SDES blocks (5 bits vs. 8 bits), you will have to apply SDES to the entire message and decode it from CASCII to a string. Once you do this and decode it one of the plaintexts will be a valid, English string. However, you have 1024 plaintexts and looking through all of them will take a while. TripleSDES has 1024 * 1024 = 1,048,576 possible keys so your solution for determining the valid plaintext will have to work fairly well. As for figuring out which plaintext is valid English, in the Lec05: Traditional and Modern Symmetric Key Ciphers powerpoint there is a section that might help that describes what is valid English (should be slide 25). |
mkumar4
Posts: 4
|
Posted 14:24 Apr 02, 2017 |
Prof. Total length of the entire message is 952 bits whereas to convert into CASCII we need multiple of 5. What we should in this case? |
amclees2
Posts: 12
|
Posted 14:47 Apr 02, 2017 |
From the project assignment: "Since SDES and TripleSDES only work on blocks of size 8 bits, when converting a CASCII string it is necessary to pad the bit representation with 0’s to obtain a multiple of 8. See the convert and toString methods in CASCII.java." The 0s are added the the end of the message to allow SDES/TripleSDES to be applied. 950 is the nearest multiple of 5 below 952, so there are 2 0s at the end of the message as padding and 950 / 5 = 190 characters in the message.
|