# S-DES Binary converted to ASCII?

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.

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?

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?)

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.

• 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. Oct 2 '19 at 1:05
• 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. Oct 2 '19 at 1:07