diff --git a/docs/demos.json b/docs/demos.json index 908846d..f50c34c 100644 --- a/docs/demos.json +++ b/docs/demos.json @@ -110,7 +110,7 @@ { "name": "模逆元计算", "irUrl": "demos/arithmetic/inv_mod.ir", - "remark": "输入a和n,计算能使(a*x mod n)=1的x并输出x" + "remark": "输入a和n,计算并输出满足(ax mod n)=1的x。如果模逆元不存在,程序返回1。" }, { "name": "32位无符号整数的完整加法", @@ -209,7 +209,7 @@ { "name": "El Gamal:消息解密", "irUrl": "demos/cryptography/elgamal_dec.ir", - "remark": "输入私钥(g,p,x)和密文(c1,c2),计算并输出明文m=(c2/(c1^x))=c2*(c1^x)^(-1) mod p", + "remark": "输入私钥(g,p,x)和密文(c1,c2),计算并输出明文m=c2/(c1^x)=c2*(c1^x)^(-1) mod p", "vmOptions": { "maxExecutionStepCount": 3000000 } diff --git a/docs/demos/cryptography/elgamal_dec.cmm b/docs/demos/cryptography/elgamal_dec.cmm index cb34c8a..e384460 100644 --- a/docs/demos/cryptography/elgamal_dec.cmm +++ b/docs/demos/cryptography/elgamal_dec.cmm @@ -2,7 +2,7 @@ * El Gamal decryption algorithm * (1) Read (g,p,x) from input * (2) Read ciphertext (c1,c2) from input - * (3) Compute plaintext m=(c2/c1)=c2*c1^(-1) mod p + * (3) Compute plaintext m=c2/(c1^x)=c2*(c1^x)^(-1) mod p * (4) Output m * * This implementation is for demonstration purposes only.