softtouch 9 Posted 23 hours ago Delphi 12.2, I installed LockBox 3 via GetIt. So far so good. I try to generate public and private keys, but I get all the time a range check error. Here is the example code: CryptoLib := TCryptographicLibrary.Create(nil); CodecRSA := TCodec.Create(nil); Signatory := TSignatory.Create(nil); CodecRSA.CryptoLibrary := CryptoLib; CodecRSA.StreamCipherId := 'native.RSA'; CodecRSA.AsymetricKeySizeInBits := 1024; Signatory.Codec := CodecRSA; Signatory.GenerateKeys; // <== Range Check Error Signatory.Free; CodecRSA.Free; CryptoLib.Free; What am I doing wrong? Share this post Link to post
PeterBelow 255 Posted 23 hours ago 54 minutes ago, softtouch said: Delphi 12.2, I installed LockBox 3 via GetIt. So far so good. I try to generate public and private keys, but I get all the time a range check error. Here is the example code: CryptoLib := TCryptographicLibrary.Create(nil); CodecRSA := TCodec.Create(nil); Signatory := TSignatory.Create(nil); CodecRSA.CryptoLibrary := CryptoLib; CodecRSA.StreamCipherId := 'native.RSA'; CodecRSA.AsymetricKeySizeInBits := 1024; Signatory.Codec := CodecRSA; Signatory.GenerateKeys; // <== Range Check Error Signatory.Free; CodecRSA.Free; CryptoLib.Free; What am I doing wrong? Probably nothing :). The default setting for range checking changed to "on" and the Lockbox version in GetIt may not reflect that yet. Try to use the latest version from github instead: https://github.com/TurboPack/LockBox3 Share this post Link to post
softtouch 9 Posted 23 hours ago I just installed the latest version from github, it does exactly the same. Share this post Link to post
Cristian Peța 117 Posted 6 hours ago (edited) - b8_1 := P8^ shl ShiftAmnt; + b8_1 := Byte(P8^ shl ShiftAmnt); //(3 shl 7) do not fit into Byte - b8_1 := P8^ shl ShiftComp8; + b8_1 := Byte(P8^ shl ShiftComp8); - PoweredFactor, Power, iFactor: integer; + PoweredFactor, Power, iFactor: uint32; After some changes in /run/utilities/uTPLb_HugeCardinal.pas no more errors... but it works? If it worked with range checking OFF then probably it will work. Edited 6 hours ago by Cristian Peța Share this post Link to post