modinverse.vbs
来自「可以进行任意多位的大整数的乘方、开方、四则运算等」· VBS 代码 · 共 30 行
VBS
30 行
'----------------------------------------------------------
' Modular Inverse Calculation Script
'-----------------------------------
'
' This VBScript code shows how to calculate the modular
' inverse of a number.
'
' The data in this example is taken from Handbook of
' Applied Cryptography (8.2, p287), by A. Menezes, P. van
' Oorschot, and S. Vanstone, CRC Press, 1996.
'
' Summary: compute b such that a*b mod n = 1.
'
' a = 38 13 1f
'
' n = 5b ab f8
'
' The result should be:
' b = 06 71 2f
'
'----------------------------------------------------------
Dim strHexA, strHexB, strHexN
strHexA = "38 13 1f"
strHexN = "5b ab f8"
strHexB = Hpmbmath.ModInverse(strHexA, strHexN)
Hpmbmath.Output("Result = " + strHexB)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?