lockbox-3

TSimpleCodec.Begin_EncryptMemory - Wrong mode

ⅰ亾dé卋堺 提交于 2021-01-29 07:12:43
问题 I get TSimpleCodec.Begin_EncryptMemory - Wrong mode exception wile executing the following code. Is it something wrong? FLibrary := TCryptographicLibrary.Create(Self); FCodec := TCodec.Create(Self); FCodec.CryptoLibrary := FLibrary; FCodec.BlockCipherId := 'native.AES-256'; FCodec.ChainModeId := 'native.ECB'; FCodec.Password := 'password'; plain := 'The plain text'; FCodec.EncryptString(plain, astr); FCodec.DecryptString(dec, astr); 回答1: When initialising the codec by run-time code, you need

Lockbox digital signature component problem

徘徊边缘 提交于 2020-01-13 03:20:10
问题 I'm evaluating TurboPower LockBox library for digital signing. I've created a 1024 bit RSA key and tried to sign a 260 bytes of text with it. After changing one or two characters in the text the signature is still valid for it. Is that ok? Or maybe it's a problem with this library. Changing even one character has a crucial effect. Do I need to create a larger key? UPDATE To test the library I used the demo application that comes with it. I have generated a 1024 RSA key pair and then tried the

How do I install LockBox 3 into Delphi 7?

丶灬走出姿态 提交于 2019-12-24 01:54:38
问题 This is my first time installing the libraries for Lockbox. I downloaded version 3.4.3 from sourceforge and have Delphi 7. The first step is to get this sucker to compile under Delphi 7 and it's been hell. I do hope that the components are easier to use once installed. Ok. I have a unit that looks like this. unit uTPLb_StrUtils; interface uses SysUtils, uTPLb_D7Compatibility; function AnsiBytesOf(const S: string): TBytes; implementation function AnsiBytesOf(const S: string): TBytes; begin /

Converting TurboPower Lockbox 2 to LockBox 3

不想你离开。 提交于 2019-12-24 01:02:02
问题 I am currently in the process of converting a project (that uses encryption) from Delphi 6 to XE. This project uses the old Delphi Encryption Compendium which does not work in XE. So I figured that I would swap from that component set to LockBox. There are two versions of LockBox - 2 and 3. I have no problems with using the LockBox2 in Delphi 6. I though that I would use LockBox3 in XE, but the problem that I have is that I cannot get the same results when used with ExFile demo program (from

PHP implementing Ciphertext Stealing (CTS) with CBC

大兔子大兔子 提交于 2019-12-22 10:06:04
问题 I have been trying to implement Ciphertext Stealing(CTS) in PHP for CBC. Referring below two links How can I encrypt/decrypt data using AES CBC+CTS (ciphertext stealing) mode in PHP? and http://en.wikipedia.org/wiki/Ciphertext_stealing I am confused and stuck on the last and simplest step of XOR. I know this is silly but having tried all the combinations, i don't know what am i missing. Code follows. // 1. Decrypt the second to last ciphertext block, using zeros as IV. $second_to_last_cipher

Secure keypair encryption solution in Delphi & PHP?

我怕爱的太早我们不能终老 提交于 2019-12-19 03:20:49
问题 My application sends encrypted files over the internet, I need to be able to do the following: ( Client side Delphi 2010) : Encrypt files using public key shipped with my application & upload it to server ( Server side PHP) : Decrypt the uploaded file using my private key stored on server (Work on the uploaded file...) Sounds simple but I can't find any reliable code/component, I found these components: DCPcrypt. This is what I'm using right now in development but doesn't seem to support

AES Encrypt/Decrypt Delphi & PHP

僤鯓⒐⒋嵵緔 提交于 2019-12-17 19:37:23
问题 My Delphi application uses TurboPower LockBox 3 to encrypt a plaintext information using AES 256. I now want to decrypt this information using PHP. But TurboPower LockBox 3 has some interoperability issues. Please check the post by LockBox 3 author here for details : http://lockbox.seanbdurkin.id.au/tiki-view_forum_thread.php?comments_parentId=363&topics_offset=1 And a similar post on Stackoverflow Secure keypair encryption solution in Delphi & PHP? In LockBox 3, during encryption, you set a

Installing LockBox 3 to Delphi 7

女生的网名这么多〃 提交于 2019-12-13 21:17:23
问题 I am trying to install Lockbox 3.5 to Delphi 7. I have come to the point where it should compile, but I am having some trouble with TBytes . Delphi sees TBytes as an Undeclared identifier . I am a student in my first year and don't know exactly how to fix this problem. function SelfTest_Key: TBytes; This script is found under uTPLb_BlockCipher. function Stream_to_Base64(ASource: TStream; const ATransform: TBytes = nil) : TBytes; This script is found under uTPLb_StreamUtils I would really

TPLockBox3 and PHP - AES Encrypt in Delphi, Decrypt in PHP

霸气de小男生 提交于 2019-12-13 11:34:56
问题 I have a trouble with lockbox3 and PHP mcrypt. I can't pass IV to PHP. Delphi code: var Codec: TCodec; CL: TCryptographicLibrary; PlainStream: TStringStream; CipherStream: TMemoryStream; begin PlainStream := TStringStream.Create(Edit1.Text); CipherStream := TMemoryStream.Create; CL := TCryptographicLibrary.Create(nil); Codec := TCodec.Create(nil); Codec.CryptoLibrary := CL; Codec.ChainModeId := uTPLb_Constants.CBC_ProgId; Codec.StreamCipherId := uTPLb_Constants.BlockCipher_ProgId; Codec

TurboPower LockBox 3: AES128 and padding ISO 10126

大兔子大兔子 提交于 2019-12-12 01:47:00
问题 I know this is a withdrawn standard. Nevertheless, the customer wants it (and we know who's always right). So, how do I do it? Ho can I choose ISO 10126 padding for an AES128 encryption? Edit: The LB version in use is 3.4.1 (I didn't have the time/knowledge to fix the latest release to run with XE2) 回答1: (1) You can roll your own padding. If you roll your own padding to make the message size an exact multiple of block cipher, TPLB3 will not try to add any additional padding. (2) For most