I have to calculate in hex this value :
Generator = 0x1D
Host_Rnd = 0x83
Modulus = 0x35
HostInerKey = ( Generator ^ Host_Rnd ) mod Modulus
must be : 0x2B
i have tryed
result is : 33 (0x21)
but correct result must be : 43 (0x2B)
where is my error ?
Generator = 0x1D
Host_Rnd = 0x83
Modulus = 0x35
HostInerKey = ( Generator ^ Host_Rnd ) mod Modulus
must be : 0x2B
i have tryed
B4X:
Dim Generator As Long = 29 ' (0x1D)
Dim Host_Rnd As Long = 131 ' (0X83)
Dim Modulus As Long = 53 ' ( 0x35)
Dim TmpPower As Long = Power(Generator ,Host_Rnd)
Dim HostInterKey As Int = TmpPower Mod Modulus
result is : 33 (0x21)
but correct result must be : 43 (0x2B)
where is my error ?
Last edited: