Example of RSA using dc (Desk Calculator)

The following is a step by step example of how to use the desk calculator to encode a message with the RSA system.

The computer genterated all the normal text, bold text is what the computer user typed in, side notes are the text in italics.

insci14.ucsd.edu% dc (This starts the dc mode)
323
se (stores the previous number in the memory location "e". This is the encrypting exponent)
245363
sm (stores the previous number in the memory location "m". This is the modulus)
2905
sM (stores the previous number in the memory location "M". This is the Message)
lM (loads the number M)
323
^ (Calculates 2905^323)
p (prints it)
394640963357385617764656047824140968156973636384271917669713149365578\
1994794184047768930359080829541035994567598210273888495296794319718489\
7330700316202941295975001520569182876200209690073782855394435012180293\
8489742183855712824264547805658991359031005265935050657180106444244421\
9539205651361670572198656903640697217883495476698974620729615474442966\
6984128831782177324829436857056467048071167962203935493082025212842362\
2446341033437120457333483757580579382840090347748311820932240660735222\
4884431523006184389164193962742604421474184541343218449605062799402984\
5286100392022957335388735117754765945668564743036188727776426640912221\
0100618426121269231188642530195084753945589629755240117474425859956306\
4773532117923962098685291149315340156280817053566863096932842882062922\
6306693335539570991267861601737120380377220544657641011445485355675675\
0313123997295687323160649137057660249585066106479265588695234925992459\
1351328776030072261372545955349739288334420849599444704557189403933696\
1333266247843325129298893816531180100138851453157702117284099699906975\
1713826799658607066907637533383079730953113539726473391056060791015625\
lm (Loads the number "m")
% (Calculates 2905^323 mod m)
p (Prints it)
13388 (This is the final result of the RSA encryption system)
q (This quits dc)

To actually decode this message using dc would be way too painful. Trust me...use Mathematica



[Back| Home| Programs| Documentation| Internet| People]