reset password
Author Message
ChristopherNg
Posts: 17
Posted 23:40 Mar 29, 2017 |

For question 3. Cracking SDES and TripleSDES number 1, it says:

1) Give the SDES encoding of the following CASCII plaintext using the key 0111001101. (The answer
is 64 bits long.)

I am confused on what the answer should be. If SDES encrypts into an 8 bit ciphertext, how do we get an answer that is 64 bits long?

Last edited by ChristopherNg at 23:41 Mar 29, 2017.
amclees2
Posts: 12
Posted 00:35 Mar 30, 2017 |

The plaintext CRYPTOGRAPHY is 12 characters, each of which is 5 bits. Thus, the total length of the CASCII encoded plaintext is 60 bits, which is then padded with 0s to 64 bits. SDES is applied to each block of 8 bits in the plaintext with the same key used each time.

ChristopherNg
Posts: 17
Posted 01:03 Mar 30, 2017 |
amclees2 wrote:

The plaintext CRYPTOGRAPHY is 12 characters, each of which is 5 bits. Thus, the total length of the CASCII encoded plaintext is 60 bits, which is then padded with 0s to 64 bits. SDES is applied to each block of 8 bits in the plaintext with the same key used each time.

okay that makes a lot more sense now. Thank you.

Ramprakash24
Posts: 5
Posted 14:23 Mar 30, 2017 |

When I convert the bits "00101" to character I'm getting the output as "T" but when I convert the character "T" to byte, I'm getting the output as "[B@15db9742" and not as "00101" can anyone help me how to get the desired output ?

Ramprakash24
Posts: 5
Posted 18:42 Mar 30, 2017 |

Dear Professor,

Can you please help me on how to find the key without the plaintext ? I couldn't get the logic for it

ytsai8
Posts: 47
Posted 01:06 Apr 02, 2017 |
Ramprakash24 wrote:

When I convert the bits "00101" to character I'm getting the output as "T" but when I convert the character "T" to byte, I'm getting the output as "[B@15db9742" and not as "00101" can anyone help me how to get the desired output ?

Your [B@15db9742 is the address of your array... if you want to print the array values, make your custom methods of toString that iterates through the array.

As of cracking the key, since the key is only 10 bits, there are only 210 possible combinations, which is only 1024 possibilities. Try each of them and see which one of the result makes sense. If you don't want to read 1024 results, you can filter out some results that doesn't make sense. Eventually you would need to use filters though, the triple des has 1024*1024 possibilities...but I mean if you can read 1 million results with no problem, you could still get the answers