I have a question in regards to a task I've been given at uni. I need to encode the string 'Cyber' 2 characters at a time with RSA with padding being space.

What do the chunks look like than need to be encrypted? Should I just concatenate the ascii codes 'Cy',then 'be',then 'r ' , ex 'Cy'=67121, or should I separate them with a space - '6732121'?

I know the question is purely mathematical, just to see us calculating the stuff but I'm struggling to imagine how a program would interpret the decoded message.

Thanks in advance.

  • $\begingroup$ Welcome to Cryptography.SE. Cryptography includes Math,CS,EE,Stat, PHY, and not bounded with these; even DNAs can be use. The space padding is interesting because when you pad the message characters 'Cy' with spaces make sure that the interger value of the padded message must not be larger then $n$ the RSA modulus. Padding, usually, applied after the message, not before or in the middle. There is a specific reason for this; the streaming. Padding not-in-the-end can decrease performance. $\endgroup$
    – kelalaka
    Sep 23, 2023 at 10:06
  • $\begingroup$ This may help, if only by linking to A Small Example. $\endgroup$
    – fgrieu
    Sep 24, 2023 at 20:22


Your Answer

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

Browse other questions tagged or ask your own question.