0
$\begingroup$

I have been working with the following SDES Encryption templates and got the following as my ciphertext. I believe the ciphertext is correct because when I decrypted it I got my original plaintext.

enter image description here

If someone could inform me if the "encoded binary value is the ciphertext, and how do you convert this back to ASCII using the binary - ASCII table below?

enter image description here

Based on my results, I now have to answer the following questions, which I have answered in bold.

Plaintext binary value of e: 01100101

THE SUBKEYS WERE GENERATED USING THE KEY: 0101010110

Key 1:10011001

Key 2: 01101010

Encoded Binary Value: 11000001 (Is this regarded as the ciphertext?)

Finally convert, the encoded binary value back to ASCII: ? (Could someone please explain how this is done?)

$\endgroup$

1 Answer 1

1
$\begingroup$

Encoded Binary Value: 11000001 (Is this regarded as the ciphertext?)

Yes. Or at least it is considered a block of ciphertext, as in, the output of a block cipher. A block cipher in itself is not a CPA secure cipher, as identical input messages (plaintext) will lead to identical output.

Finally convert, the encoded binary value back to ASCII: ? (Could someone please explain how this is done?)

You look up 0110 on the top row listing the high order bits, and then lookup 0101 in the low order bits, so you'll find the lower case e again. Of course most computer languages have functions such as CHR$ to do this for you.

$\endgroup$
2
  • $\begingroup$ Thank you for your response. When it says convert the encoded binary value back to ASCII, is this the encoded binary value that I encrypted ("11000001") or do you just take the original plaintext for lower case "e"? Thanks for your help. $\endgroup$
    – user73362
    Oct 2, 2019 at 1:05
  • $\begingroup$ The latter. The ciphertext is binary, it doesn't represent a character, and as such it is not a good idea to convert it to text. ASCII actually only uses the 7 lower order bits, so 11000001 doesn't even represent an ASCII character. You would use hexadecimals or base 64 encoding if text is really required. $\endgroup$
    – Maarten Bodewes
    Oct 2, 2019 at 1:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.