Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERangeError exception in THugeCardinal.MulPower2_NewAlgorithm( ShiftAmnt: integer) #36

Open
ppieczerak opened this issue Mar 12, 2025 · 0 comments

Comments

@ppieczerak
Copy link

Hello,

In order to play a bit with LockBox3 I have followed the guidelines shown in http://lockbox.seanbdurkin.id.au/Generate+an+RSA+key (had to use web.archive.org to get there) and when trying to generate RSA keys the newly created app raised ERangeError exception in THugeCardinal.MulPower2_NewAlgorithm( ShiftAmnt: integer) line 1450 with a call stack as shown below. Test app compiled with Delphi 12.2, run on Win11.

:76d0c424 KERNELBASE.RaiseException + 0x64
uTPLb_HugeCardinal.THugeCardinal.MulPower2_NewAlgorithm(6586580)
uTPLb_HugeCardinal.THugeCardinal.MulPower2_NewAlgorithm(1)
uTPLb_HugeCardinal.THugeCardinal.MulPower2(-1)
uTPLb_HugeCardinal.THugeCardinal.DividePrimitive($355AAD0,nil,$355AAB0,False)
uTPLb_HugeCardinal.THugeCardinal.Modulo($355AAD0)
uTPLb_HugeCardinalUtils.GeneratePrime(514,(uTPLb_RSA_Engine.TRSA_Gen_Key_Helper.Progress_Event,$355A6F0),(uTPLb_RSA_Engine.TRSA_Gen_Key_Helper.PrimalityTest_Event,$355A6F0),5,TMemoryStreamPool($356FC50) as IMemoryStreamPool,$355A730,0)
uTPLb_HugeCardinalUtils.Compute_RSA_Fundamentals_2Factors(1024,65537,nil,nil,nil,nil,$355A730,nil,nil,nil,nil,(uTPLb_RSA_Engine.TRSA_Gen_Key_Helper.Progress_Event,$355A6F0),(uTPLb_RSA_Engine.TRSA_Gen_Key_Helper.PrimalityTest_Event,$355A6F0),5,TMemoryStreamPool($356FC50) as IMemoryStreamPool,0,False)
uTPLb_RSA_Engine.TRSA_Engine.GenerateAsymetricKeyPair(1024,$3544460,(uTPLb_Codec.TCodec.GenerateAsymetricKeyPairProgress_Event,$3544460),nil,False)
uTPLb_Codec.TSimpleCodec.InitFromGeneratedAsymetricKeyPair
uTPLb_Codec.TCodec.InitFromGeneratedAsymetricKeyPair
uTPLb_Signatory.TSignatory.GenerateKeys

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant