Talk:RSA code: Difference between revisions

Content added Content deleted
Line 38: Line 38:
::* Blocking could be done in a another task. It's needed if m > n. And in the particular cases of the original task where the character encoding is sparse 30+ chars into 100s the decoding will blow up. With ASCII encoding it doesn't blow up but you get gibberish.
::* Blocking could be done in a another task. It's needed if m > n. And in the particular cases of the original task where the character encoding is sparse 30+ chars into 100s the decoding will blow up. With ASCII encoding it doesn't blow up but you get gibberish.
:::''In the general case, block size for encoded text, represented as text, will need to be at least 1 character larger than the unencrypted text. And 1 character is only possible when the block size was picked to be the largest possible for N. (And there is also the issue of determining the original message length -- humans can maybe ignore padding but our programs are easily confused)'' --[[User:Rdm|Rdm]] 14:00, 27 April 2011 (UTC)
:::''In the general case, block size for encoded text, represented as text, will need to be at least 1 character larger than the unencrypted text. And 1 character is only possible when the block size was picked to be the largest possible for N. (And there is also the issue of determining the original message length -- humans can maybe ignore padding but our programs are easily confused)'' --[[User:Rdm|Rdm]] 14:00, 27 April 2011 (UTC)
:::: I tried a couple of ways. First blocking before encoding and working back the blocking size to the text which I found to be messy. Later and easier just use the power of 2 just less than m for blocking. However, at some point I'll probably blow up something in the bignum support. Using decode(1 + size of n) would give it in characters just as easily. --[[User:Dgamey|Dgamey]] 03:27, 28 April 2011 (UTC)
::* An RSA/keygen task would be another good task. There are even subtasks possible within that.
::* An RSA/keygen task would be another good task. There are even subtasks possible within that.
::* A general character encoding and blocking task would be good
::* A general character encoding and blocking task would be good