Encryption/Decryption 

Function: calc[Decryption] - decrypt an encrypted message 

Calling Sequence:  

Decryption(K, n, d) 

Parameters: 

K -  encrypted message  

n - number code 

d - private key  

Description: 

  • Decryption(K, n, d) decrypts the encrypted message K using the RSA algorithm. n is the public key, d is the private key
 

Examples: 

> restart: with(calc):
 

> M:="Hello MathMaple users,
This is the end of some sample pages from Mathematics with Maple,
Cheers Harald":%;
 

Hello MathMaple users, 
This is the end of some sample pages from Mathematics with Maple,
Cheers Harald
Hello MathMaple users, 
This is the end of some sample pages from Mathematics with Maple,
Cheers Harald
Hello MathMaple users, 
This is the end of some sample pages from Mathematics with Maple,
Cheers Harald
 

> K:=Encryption(M,n,d):%;
 

[347304794433157304199193968435024038436766016215861350894124777007974650083816441116541206147932178651271322101217246351548577724269623875824265047928915848716269431649114464945058491629116213370400,...
[347304794433157304199193968435024038436766016215861350894124777007974650083816441116541206147932178651271322101217246351548577724269623875824265047928915848716269431649114464945058491629116213370400,...
[347304794433157304199193968435024038436766016215861350894124777007974650083816441116541206147932178651271322101217246351548577724269623875824265047928915848716269431649114464945058491629116213370400,...
[347304794433157304199193968435024038436766016215861350894124777007974650083816441116541206147932178651271322101217246351548577724269623875824265047928915848716269431649114464945058491629116213370400,...
[347304794433157304199193968435024038436766016215861350894124777007974650083816441116541206147932178651271322101217246351548577724269623875824265047928915848716269431649114464945058491629116213370400,...
[347304794433157304199193968435024038436766016215861350894124777007974650083816441116541206147932178651271322101217246351548577724269623875824265047928915848716269431649114464945058491629116213370400,...
[347304794433157304199193968435024038436766016215861350894124777007974650083816441116541206147932178651271322101217246351548577724269623875824265047928915848716269431649114464945058491629116213370400,...
 

> n;
 

8642164032178243726414822750966680856635713024444234449824028872111364801080832100916896912483751521478242990136206715552016038424758359735025799396557133328066851385601047972192037041052084538913797
8642164032178243726414822750966680856635713024444234449824028872111364801080832100916896912483751521478242990136206715552016038424758359735025799396557133328066851385601047972192037041052084538913797
8642164032178243726414822750966680856635713024444234449824028872111364801080832100916896912483751521478242990136206715552016038424758359735025799396557133328066851385601047972192037041052084538913797
 

> d;
 

7906015279616541290260863574810632999438882624499384856203205313462173106863783646772295459934369949744429258154780651035108895782946610677037000052754457489000263572386291419481557016635787455481103
7906015279616541290260863574810632999438882624499384856203205313462173106863783646772295459934369949744429258154780651035108895782946610677037000052754457489000263572386291419481557016635787455481103
7906015279616541290260863574810632999438882624499384856203205313462173106863783646772295459934369949744429258154780651035108895782946610677037000052754457489000263572386291419481557016635787455481103
 

> Decryption(K,n,d);
 

Hello MathMaple users, 
This is the end of some sample pages from Mathematics with Maple,
Cheers Harald
Hello MathMaple users, 
This is the end of some sample pages from Mathematics with Maple,
Cheers Harald
Hello MathMaple users, 
This is the end of some sample pages from Mathematics with Maple,
Cheers Harald