Blowfish encryption

How difficult will it be to call a "C" library to implement Blowfish encryption?  The library is named OpenSSL and there is a "C" version with "lib" files available for the windows platform.  I want to use this library because I can decrypt on the Linux platform with compatibility.  I need to be able to encrypt and encode using the OpenSSL library.
0
Rafel
8/11/2008 4:26:12 PM
embarcadero.delphi.winsock 1874 articles. 2 followers. Follow

20 Replies
2272 Views

Similar Articles

[PageSpeed] 7

> {quote:title=Rafel Coyle wrote:}{quote}
> How difficult will it be to call a "C" library to implement Blowfish encryption?  

Well, it's very simple to call "C" library functions from Delphi. In fact, that's how the majority of the VCL and RTL are implemented; by calling "C" library functions in the Win32 API.

The trick is in declaring the functions in Delphi properly. For starters, they'll probably all need to be declared as "stdcall" (although I've run across a few that were "cdecl" instead).

Do a Google search on "Velthuis Delphi C"; Rudy Velthuis has written a couple of articles on the subject, and IIRC has a utility that will help do some of the translations. If you can't find him through Google, try the Non-Technical and Native API groups here; Rudy hangs out in both of them.
0
Ken
8/14/2008 2:40:33 PM
> {quote:title=Rafel Coyle wrote:}{quote}
> How difficult will it be to call a "C" library to implement Blowfish encryption?  The library is named OpenSSL and there is a "C" version with "lib" files available for the windows platform.  I want to use this library because I can decrypt on the Linux platform with compatibility.  I need to be able to encrypt and encode using the OpenSSL library.


There is a freeware unit out there called Cipher.pas that supports blowfish and many other encryption methods.
0
daniel
8/14/2008 8:38:25 PM
> {quote:title=Rafel Coyle wrote:}{quote}
> How difficult will it be to call a "C" library to implement Blowfish encryption?  The library is named OpenSSL and there is a "C" version with "lib" files available for the windows platform.  I want to use this library because I can decrypt on the Linux platform with compatibility.  I need to be able to encrypt and encode using the OpenSSL library.

Forgive my ignorance but isn't blowfish a standard?  In other words, wouldn't blowfish implemented in pure Delphi like the old TurboPower lockbox library be able to work with data encrypted on Linux?  My preference would be to avoid the dll completely if possible.

--
-Mike (TeamB)
0
Mike
8/15/2008 1:33:08 AM
> {quote:title=Mike Williams (TeamB) wrote:}{quote}
> > {quote:title=Rafel Coyle wrote:}{quote}
> > How difficult will it be to call a "C" library to implement Blowfish encryption?  The library is named OpenSSL and there is a "C" version with "lib" files available for the windows platform.  I want to use this library because I can decrypt on the Linux platform with compatibility.  I need to be able to encrypt and encode using the OpenSSL library.
> 
> Forgive my ignorance but isn't blowfish a standard?  In other words, wouldn't blowfish implemented in pure Delphi like the old TurboPower lockbox library be able to work with data encrypted on Linux?  My preference would be to avoid the dll completely if possible.
> 
> --
> -Mike (TeamB)
Blowfish is a standard but it is implemented by the different vendors in ways do do not produce the same result.  IOW you can encrypt with a component from one vendor, but it cannot be decrypted by another.  There are spacing, padding and other allowances in the specification that allows for these inconsistencies.  If we could use the OpenSSL, (written in "C"), that we could be more assured that this will not happen because the OpenSSL package is on both Windows and Linux platforms.  Part of our requireme
nts is the be able to decrypt and encrypt on both of these platforms.

Our goal is to use Delphi to create and activex wrapper around the OpenSSL library.  This allows us to meet the requirements as identified in the previous paragraph.
0
Rafel
8/17/2008 7:37:58 PM
Rafel Coyle wrote:

> Our goal is to use Delphi to create and activex wrapper around the
> OpenSSL library.  This allows us to meet the requirements as
> identified in the previous paragraph.

You might find IdSSLOpenSSL.pas and IdSSLOpenSSLHeaders.pas (included
in the Indy 10 distribution with RAD Studio) could make this easier
even if you don't want to use Indy sockets. There is even a
IdSSLOpenSSLHeadersNET.pas to help you build your ActiveX in dotNET if
you prefer it.


Eric Thorniley
--
0
Eric
8/18/2008 2:17:16 AM
> {quote:title=Eric Thorniley wrote:}{quote}
> Rafel Coyle wrote:
> 
> > Our goal is to use Delphi to create and activex wrapper around the
> > OpenSSL library.  This allows us to meet the requirements as
> > identified in the previous paragraph.
> 
> You might find IdSSLOpenSSL.pas and IdSSLOpenSSLHeaders.pas (included
> in the Indy 10 distribution with RAD Studio) could make this easier
> even if you don't want to use Indy sockets. There is even a
> IdSSLOpenSSLHeadersNET.pas to help you build your ActiveX in dotNET if
> you prefer it.
> 
> 
> Eric Thorniley
OpenSSL is one aspect of the technology.  Blowfish is another part of the OpenSSL library.
I am certain that Blowfish is not part of the OpenSSL implementation within Indy.
>
0
Rafel
8/19/2008 5:06:45 AM
Rafel Coyle wrote:

> OpenSSL is one aspect of the technology.  Blowfish is another part of
> the OpenSSL library.  I am certain that Blowfish is not part of the
> OpenSSL implementation within Indy.


True, it is not immediately available in Indy. 

There are some bf function names and constants declared in the Indy
header files but the Blowfish function call addresses (BF_encrypt etc.)
have not been set up in the way that some of the DES calls have been
done.

Having glanced at the OpenSSL Blowfish.h I see there really is not much
of it and there is nothing that should be difficult to translate.

If you want your ActiveX to cover the whole of the OpenSSL
functionality you have a big task ahead. There is rather a lot of it
scattered in a lot of .h files and delivered in two .dlls. Using the
Indy code as a start might save you some effort. If you only want the
Blowfish calls the Indy file would be a bit over the top and I think
you will only need LIBeay32.dll.

I think these particular calls will need the cdecl calling convention
that Ken White mentioned as the alternative style.

I noticed the copyright requirements for Blowfish are a bit different
from most of OpenSSL - you are required to credit Eric Young for his
work.

Eric
--
0
Eric
8/20/2008 12:37:55 AM
> {quote:title=Eric Thorniley wrote:}{quote}
> Rafel Coyle wrote:
> 
> > OpenSSL is one aspect of the technology.  Blowfish is another part of
> > the OpenSSL library.  I am certain that Blowfish is not part of the
> > OpenSSL implementation within Indy.
> 
> 
> True, it is not immediately available in Indy. 
> 
> There are some bf function names and constants declared in the Indy
> header files but the Blowfish function call addresses (BF_encrypt etc.)
> have not been set up in the way that some of the DES calls have been
> done.
> 
> Having glanced at the OpenSSL Blowfish.h I see there really is not much
> of it and there is nothing that should be difficult to translate.
> 
> If you want your ActiveX to cover the whole of the OpenSSL
> functionality you have a big task ahead. There is rather a lot of it
> scattered in a lot of .h files and delivered in two .dlls. Using the
> Indy code as a start might save you some effort. If you only want the
> Blowfish calls the Indy file would be a bit over the top and I think
> you will only need LIBeay32.dll.
> 
> I think these particular calls will need the cdecl calling convention
> that Ken White mentioned as the alternative style.
> 
> I noticed the copyright requirements for Blowfish are a bit different
> from most of OpenSSL - you are required to credit Eric Young for his
> work.
> 
> Eric
> --
All I want is the Blowfish or any of the 128 bit encryption ciphers available to me so that I can create an activeX dll for consumption by Foxpro.  The key to using the OpenSSL implementation is that it "should" be compatible on the Linux platform.  I can to the "C" work to integrate it into an existing product on the Linux platform.  As far as the cdecl calls that is a bit over my head.
0
Rafel
8/20/2008 5:20:23 AM
Rafel Coyle wrote:

> As far as the cdecl calls that is a bit over my head.

It's not half as frightening as it sounds. Rudy Velthuis's articles on
importing libraries mentioned elsewhere in this thread are really
helpful. It is not always obvious what calling convention you should
use, and sometimes the calls will work intemittently with the wrong
one. Usually you get an access violation.

I have done a simple exmaple import of blowfish.h and tested a couple
of calls. You will find the code in attachments titled Blowfish/OpenSSL
- including the test app. If you want to use it, I would recommend
modifying it to use dynamic loading of the library. With the simple
external declaration method a missing dll prevents your application
from launching and does not give you chance to present the user with
much help about what is wrong.

I have been looking at the OpenSSL docs. The simple BF calls I have
imported have a comment saying that you should use the EVP calls
instead. This makes it easier to change to different encryption
methods. Evp.h looks quite a bit more complex to import.

HTH

Eric
--
0
Eric
8/21/2008 4:35:19 AM
> {quote:title=Eric Thorniley wrote:}{quote}
> Rafel Coyle wrote:
> 
> > As far as the cdecl calls that is a bit over my head.
> 
> It's not half as frightening as it sounds. Rudy Velthuis's articles on
> importing libraries mentioned elsewhere in this thread are really
> helpful. It is not always obvious what calling convention you should
> use, and sometimes the calls will work intemittently with the wrong
> one. Usually you get an access violation.
> 
> I have done a simple exmaple import of blowfish.h and tested a couple
> of calls. You will find the code in attachments titled Blowfish/OpenSSL
> - including the test app. If you want to use it, I would recommend
> modifying it to use dynamic loading of the library. With the simple
> external declaration method a missing dll prevents your application
> from launching and does not give you chance to present the user with
> much help about what is wrong.
> 
> I have been looking at the OpenSSL docs. The simple BF calls I have
> imported have a comment saying that you should use the EVP calls
> instead. This makes it easier to change to different encryption
> methods. Evp.h looks quite a bit more complex to import.
> 
> HTH
> 
> Eric
> --
I am amazed at what you have done.  We need to go offline to complete this if you can base64 encode and base64 decode the string.  The string data looks bad when you display it on a form in its current state.  You can submit any costing information to me direct offline.  If the meantime I will take a stab at it myself.
0
Rafel
8/21/2008 6:49:17 AM
Rafel Coyle wrote:

> if you can base64 encode and base64 decode the string.

Delphi has built-in support for this in EncdDecd.pas. EncodeStream and
DecodeStream have the main functionality, and there are string-based
wrappers for them. Just add EncdDecd to the uses list for my test app,
and replace
  MmoData.Lines.Text := TBytesToStr(FData);
with
  MmoData.Lines.Text := EncodeString(TBytesToStr(FData));

I think you will then have what you want. 

If you use strings to handle raw data, you might be wise to declare
them as AnsiString so they are definitely 8-bit strings. The default
string type is different in dotNet Delphi and is going to change with
the next version of Delphi. I did not set a good example in my test app!

Eric
--
0
Eric
8/21/2008 12:28:57 PM
> {quote:title=Eric Thorniley wrote:}{quote}
> Rafel Coyle wrote:
> 
> > As far as the cdecl calls that is a bit over my head.
> 
> It's not half as frightening as it sounds. Rudy Velthuis's articles on
> importing libraries mentioned elsewhere in this thread are really
> helpful. It is not always obvious what calling convention you should
> use, and sometimes the calls will work intemittently with the wrong
> one. Usually you get an access violation.
> 
> I have done a simple exmaple import of blowfish.h and tested a couple
> of calls. You will find the code in attachments titled Blowfish/OpenSSL
> - including the test app. If you want to use it, I would recommend
> modifying it to use dynamic loading of the library. With the simple
> external declaration method a missing dll prevents your application
> from launching and does not give you chance to present the user with
> much help about what is wrong.
> 
> I have been looking at the OpenSSL docs. The simple BF calls I have
> imported have a comment saying that you should use the EVP calls
> instead. This makes it easier to change to different encryption
> methods. Evp.h looks quite a bit more complex to import.
> 
> HTH
> 
> Eric
> --
I am amazed at what you have done.  We need to go offline to complete this if you can base64 encode and base64 decode the string.  The string data looks bad when you display it on a form in its current state.  You can submit any costing information to me direct offline.  If the meantime I will take a stab at it myself.
0
Rafel
8/22/2008 1:49:27 AM
> {quote:title=Eric Thorniley wrote:}{quote}
> Rafel Coyle wrote:
> 
> > if you can base64 encode and base64 decode the string.
> 
> Delphi has built-in support for this in EncdDecd.pas. EncodeStream and
> DecodeStream have the main functionality, and there are string-based
> wrappers for them. Just add EncdDecd to the uses list for my test app,
> and replace
>   MmoData.Lines.Text := TBytesToStr(FData);
> with
>   MmoData.Lines.Text := EncodeString(TBytesToStr(FData));
> 
> I think you will then have what you want. 
> 
> If you use strings to handle raw data, you might be wise to declare
> them as AnsiString so they are definitely 8-bit strings. The default
> string type is different in dotNet Delphi and is going to change with
> the next version of Delphi. I did not set a good example in my test app!
> 
> Eric
> --
Is this encoding and decoding result different that what will result from the OpenSSL library?  Remember I will be encrypting, encoding in Windows and decoding and decrypting using OpenSSL on a Linux box.
0
Rafel
8/22/2008 2:11:21 AM
> {quote:title=Eric Thorniley wrote:}{quote}
> Rafel Coyle wrote:
> 
> > if you can base64 encode and base64 decode the string.
> 
> Delphi has built-in support for this in EncdDecd.pas. EncodeStream and
> DecodeStream have the main functionality, and there are string-based
> wrappers for them. Just add EncdDecd to the uses list for my test app,
> and replace
>   MmoData.Lines.Text := TBytesToStr(FData);
> with
>   MmoData.Lines.Text := EncodeString(TBytesToStr(FData));
> 
> I think you will then have what you want. 
> 
> If you use strings to handle raw data, you might be wise to declare
> them as AnsiString so they are definitely 8-bit strings. The default
> string type is different in dotNet Delphi and is going to change with
> the next version of Delphi. I did not set a good example in my test app!
> 
> Eric
> --
Eric,

Perhaps I am barking up the wrong tree.  I just did a raw encryption test using the results of your code with the encryption data only (no encoding) written to a text file compared the results of my work written to a text file on a Linux box and the results are not compatible.  I simply do not seem to be able to encrypt on Windows and Decrypt on Linux OpenSSL Blowfish cfb64.  I am encrypting with the same key and the same data (16 bytes).
0
Rafel
8/22/2008 5:00:23 AM
Rafel Coyle wrote:

> Is this encoding and decoding result different that what will result
> from the OpenSSL library?  Remember I will be encrypting, encoding in
> Windows and decoding and decrypting using OpenSSL on a Linux box.

Yes, it is not encryption - it is a standard open encoding to base64.
The encrypted output has a full range of values in the data including
null values - so it is a bit of a problem if you want to send it in a
text file etc. because intermediate processing may object. (For
instance, it may discard everything after the first null.) The encoding
uses only standard characters - but makes the message longer. You
decode it - and then you have the recovered but still encrypted byte
sequence reday send to the decryption code.

The Delphi version does exactly the same as any other. It has been
around for a long time without change - I'm sure you are safe to use it.


Eric
--
0
Eric
8/23/2008 12:29:48 AM
Rafel Coyle wrote:

> I simply do not seem to be able to encrypt on Windows
> and Decrypt on Linux OpenSSL Blowfish cfb64.  I am encrypting with
> the same key and the same data (16 bytes).

It should work. 

I have posted an updated test app in attachments with extra features:

1. You can load/save to file and do Base64 encoding. 

It will save base64 to file if you have the base64 check box checked
and you save with a .txt extension - otherwise it will save the raw
encypted data.

It will assume that a .txt file is base 64 encoded if the checkbox is
checked when you load it.

2. It has a built-in test to encode the original test vectors created
by Eric Young - and it does produce the right result.

3. You can switch between ecb, cbc cfb64 and ofb64 modes.

4. You can reset the initialisation vectors.

5. It now displays the encryption and decryption iv values in the
status bar so you can see them changing.

6. Nulls in the output data are now stripped out before sending it to
the display - otherwise it may truncate the data (especially in cbc
mode where the input has to be padded out with nulls to make each
message length a multiple of 8.)



Things that may be breaking it for you are:

1. Sending text files without encoding them as base 64 will only work
if there is nothing processing them and truncating them at the first
null character. Indeed, the memo control in which I display the raw
data will truncate it in this way.

2. You have to make sure that you get the initialisation vectors in
step between the encrypter and decrypter. I've added a reset button to
the test app so you can definitely start at zero. The encryption
depends on what was sent previously except in ecb mode, and you cannot
decrypt it unless you have all the data from the very beginning. You
can reset to zero for every message - but it is then less secure.


Eric Thorniley
--
0
Eric
8/23/2008 1:17:19 AM
Eric Thorniley wrote:

> It should work

I'm glad it did, and so should a new version I have posted in
attachments.

This one loads the dll dynamically when you make the first call to it.

Alternatively (compiler directive), you can use some linked-in .obj
files and avoid the dll completely. The OpenSSL project has built-in
support for compiling with bcc32. This means that even I could do it!
However, I had to translate some macros and C functions that are not
exported to the .obj files. So, in this version, it all depends on the
accuracy of my translations. It seems to work with the test data.
(Blowfish.pas contains the original C if you want to verify it.)

This all proves that the Rudy Velthuis's intstructions work
brilliantly.

Regards

Eric Thorniley
---
0
Eric
8/26/2008 10:56:05 PM
I know this thread is a few weeks old, but I just found it and wanted to 
know if you've found a solution.
If not, let me know because I have expertise in encryption algorithms.


> How difficult will it be to call a "C" library to implement Blowfish 
> encryption?

Not difficult at all.
But the problem is not with calling the library, but rather -- as you have 
already discovered -- calling the IDENTICAL routine which produces a 
byte-for-byte match of ciphertext from plaintext, and vice-versa.  This is 
absolutely necessary if you want cross-platform compatibility.


>  The library is named OpenSSL and there is a "C" version with "lib" files 
> available for the windows platform.

I think you're confusing some terminology here.  If you need to use 
Blowfish, which is a block cipher (symmetric), then you shouldn't be 
touching SSL, which is used for asymmetric ciphers (public key).  By far, 
the simplest solution is to take Delphi code of a Blowfish algorithm and 
then use that exact same code on your Linux application.  You didn't mention 
many details about your Linux app, so I don't know if it's 
command-line-driven or if it's running under X-Windows, nor did you mention 
why exactly you NEED to use OpenSSL.  Is this a third-party Linux 
application which is calling OpenSSL, or is it an application which you 
yourself have developed and have the full source code for it?
0
Tuyen
9/11/2008 10:08:00 PM
> {quote:title=Tuyen Nguyen wrote:}{quote}
> I know this thread is a few weeks old, but I just found it and wanted to 
> know if you've found a solution.
> If not, let me know because I have expertise in encryption algorithms.
> 
> 
> > How difficult will it be to call a "C" library to implement Blowfish 
> > encryption?
> 
> Not difficult at all.
> But the problem is not with calling the library, but rather -- as you have 
> already discovered -- calling the IDENTICAL routine which produces a 
> byte-for-byte match of ciphertext from plaintext, and vice-versa.  This is 
> absolutely necessary if you want cross-platform compatibility.
> 
> 
> >  The library is named OpenSSL and there is a "C" version with "lib" files 
> > available for the windows platform.
> 
> I think you're confusing some terminology here.  If you need to use 
> Blowfish, which is a block cipher (symmetric), then you shouldn't be 
> touching SSL, which is used for asymmetric ciphers (public key).  By far, 
> the simplest solution is to take Delphi code of a Blowfish algorithm and 
> then use that exact same code on your Linux application.  You didn't mention 
> many details about your Linux app, so I don't know if it's 
> command-line-driven or if it's running under X-Windows, nor did you mention 
> why exactly you NEED to use OpenSSL.  Is this a third-party Linux 
> application which is calling OpenSSL, or is it an application which you 
> yourself have developed and have the full source code for it?

The OpenSSL library contains on Linux contains other ciphers including: BlowFish, TwoFish, AES, etc.  I knew that OpenSSL was open source aznd had windows and linux versions which meant that the chances for a encryption novice like me to get cross platform solution to work would be higher than starting from scratch.  

We did get the problem solved after months, off and on, trying to get this to work.  It really became personal as I ran into a mountain of mis-communication and other vague interpretations of the BlowFish implementation.  Then we ran into the issue of encoding and decoding which is a standard process that is automatically done with most windows BlowFish components, but this is not a standard process in the linux world.  The libraries are there, but you have to have good documentation and examples are pref
erred.  This is where things went off track with linux.  It seems that different vendors use different padding schemes with base64 encoding.  This produced different results on the windows platform alone when using different vendors components let alone trying to do any thing cross platform.

Sticking with OpenSSL was the right choice for me ultimately and we got the job done.
0
Rafel
9/12/2008 5:09:11 AM
Rafel Coyle wrote:
> We did get the problem solved after months, off and on, trying to get this to work.  

I'm glad everything eventually worked out for the best, but for future 
reference I might add that this is typically the kind of work you should 
bring in an experienced external expert for. If you had firstly 
developed a working and reasonably standard compliant linux application 
(using not too obscure libraries)), I could probably have handed you 
fully compatible windows code in no more than one day total, including 
validation of compatibility in corner cases. (Given the "right" specs I 
might have done it in less than an hour, although in this case with 
miscommunication and conformance issues on the linux side, I think one 
day is more realistic than one hour.) That would have cost you EUR1000 
or less, depending on who you would have contracted. What did the delay 
and your own time cost you?
0
Utf
10/11/2008 12:04:27 PM
Reply:

Similar Artilces:

blowfish encryption
hello guys can you tell me any solution on how to decrypt using blowfish algo in pb 10.51, this is my first time decypting. i used pbcryptograph but it always return null value TIA here is my script n_cst_cryptography lnv_crypto PBCrypto pbcrypto TRY IF lnv_crypto.of_getInstance(pbcrypto) THEN sle_1.text = pbcrypto.encryptPlainTextUsingBlockCipher("Blowfish","765jdhfsl","password") //<---these always returns null and also my problem ELSE MessageBox("Alert", "You must generate a secret key first!") END IF CATCH (NoSuchAlgorithmException nsae) MessageBox("Alert", nsae.getMessage()) END TRY You might also consider using the Windows Crypto package - see http://www.topwizprogramming.com/freecode_crypto.html "Michael Barcelon" <amabanal@yahoo.com> wrote in message news:466f61f6$1@forums-1-dub... > hello guys > can you tell me any solution on how to decrypt using blowfish algo in pb > 10.51, this is my first time decypting. > > i used pbcryptograph but it always return null value > > TIA > ...

Encrypting Android-Delphi
I have written Android client and server with Delphi and Indy TCP server. I can communicate between those two but I need to somehow encrypt my communication. I can't find the right components which will give me the same result for encrypting string with Delphi and with Java. Anybody can point me to the right place. What components to use in Delphi and what code in Java? Thanks >What components to use in Delphi and what code in Java? non-technically, I don't know <g> you might try a more appropriate newsgroup. grega wrote: > I have written Android client and ...

Blowfish encryption with Chillkat
Hello, I have to implement a Blowfish encryption. I'm far from an encryption expert, so I thought I could use a component from Chillkat. But I do not manage to match the example vectors on http://www.schneier.com/code/vectors.txt, even with the example code provided by Chillkat on http://www.example-code.com/vbdotnet/blowfishEncryptTestVectors.asp. This code will only work with clear bytes or key bytes with the same characters each time (eg: 0000000000000000 or 1111111111111111). I have tested the example vectors against a flash demo on http://crypto.hurlant.com/demo/ and ...

Encryption / Hash in DELPHI XE5
Hii i would like to know if there is some components in XE5 to provide encryption or Hashing like : (i would be interrested by the 2 first...) - SHA-256 - RIPEMD-160 - MD6 - X509 Maybe there is function like that in IdHTTP ??? that i could get somewhere in the code ? Thank you > i would like to know if there is some components in XE5 to provide encryption or Hashing like : > (i would be interrested by the 2 first...) CryptoBlackbox package of our SecureBlackbox. https://www.eldos.com/sbb/desc-cryptobb.php Sincerely yours, Eugene Mayevski CTO, EldoS Corp. fer...

Delphi and Delphi for .Net
It seems that Delphi for .Net is slower than Delphi Win32 native applicaiton. I would like to know is it true all .Net application is slower than Win32 native applicaiton or it is Delphi for .Net only. Your information is great appreciated, Inung On 2011-06-21 18:20:17 +0100, Inung Huang said: > It seems that Delphi for .Net is slower than Delphi Win32 native applicaiton. > I would like to know is it true all .Net application is slower than > Win32 native applicaiton or it is Delphi for .Net only. If you are only running the code in the application once then, yes, yo...

Encryption & Decryption in Delphi
I have text encrypted with 3DES and decryption code in C# below: {code} // C# Code TripleDESHelper decrypter = new TripleDESHelper(); string content = decrypter.Decrypt(sASCII); {code} After 4 hours jugling googling, I still unable to work this out in Delphi. I tried using Lockbox3 using below code: {code} // Delphi Code Codec1.DecryptString(sDecrypted,sEncrypted,TEncoding.Unicode); {code} and always get "wrong mode" message Anybody can help me? I tought TripleDESHelper is built in in Visual Studio, is it also in Delphi? ...

Help needed with Blowfish encryption
Hi, I need to encrypt a string using Blowfish (either Delphi 7 or Delphi 2009). I have tried DCPCrypt but never succeeded in getting the correct encrypted string. Does anyone know how I can achieve the following and get the following result: This is the task: I must encrypt using Blowfish 'CBC'. To test that the result is correct, we try: Password is 'motdpasseDilicom' String to encrypt: 'DILICOM:9782000000006-3010000000006' Initialization vector: '00000000' The result should be: 'YVV2myd52pjPexG2wGveNSgRgdsT+PfaxI4MxC9WYQEz5alOtdHD4Q==' Encoded in base64. or 'YVV2myd52pjPexG2wGveNSgRgdsTPfaxI4MxC9WYQEz5alOtdHD4Q' in base64URL I succeeded in a dotNet Framework environment but not in Delphi. Best Regards Isn't there a key-length involved? > {quote:title=Robert Triest wrote:}{quote} > Isn't there a key-length involved? The Key-length is not specified. I used the length of the password multiplied by 8. Still did not work. > The Key-length is not specified. I used the length of the password multiplied by 8. Still did not work. So if you change the password then the key length changes too?? If your password is 15 long then you key length is 120 bits?? See what length is used in the other systems and use the same generated key. What is the key length in the .Net framework app? If there is something different with the input or the implementation you will never ge...

Encryption tool for Delphi and PHP?
Hi, I need to exchange encrypted data between my Delphi application and some PHP running on a Linux box: adobe flex/flash + actionscript3 Backend: php5,mysql,xml OS Platform: linux ubuntu 64bit Does anybody know of an encryption library that is available for both platforms? Thanks Jacob > {quote:title=Jacob Havkrog wrote:}{quote} > I need to exchange encrypted data between my Delphi application and some PHP running on a Linux box: I asked Google "aes php delphi" and it showed me http://www.example-code.com/delphi/crypt2_aes_matchPhp.asp Just about any stron...

Encryption & Decryption in Delphi [Edit]
I have text encrypted with 3DES and decryption code in C# below: {code} // C# Code TripleDESHelper decrypter = new TripleDESHelper(); string sDecrypted= decrypter.Decrypt(sEncrypted); {code} After 4 hours jugling googling, I still unable to work this out in Delphi. I tried using Lockbox3 using below code: {code} // Delphi Code Codec1.DecryptString(sDecrypted,sEncrypted,TEncoding.Unicode); {code} and always get "wrong mode" message Anybody can help me? I tought TripleDESHelper is built in in Visual Studio, is it also in Delphi? Edited by: eldi munggaran on Jan...

Delphi XE2 DataSnap encryption filter
Hi, I'm using Delphi XE2. I want my DataSnap application to communicate over internet and I need to encrypt communication between server and client. Can someone show me example how to use datasnap encryption filter to encrypt communication? Thanks in advance! ...

Encryption & Decryption in Delphi [Edit]
Anybody can help me to Decrypt 3DES / TrippleDES string in Delphi?, found myself jugling for 6 hours without luck :( Edited by: eldi munggaran on Jan 7, 2015 7:11 AM ...

delphi.internet.winsock: text and base64
This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. --JivePart=_18c8b.zeB8CwDOH5aMJzMl Content-Type: text/plain; charset="Utf-8" See message in delphi.internet.winsock group. --JivePart=_18c8b.zeB8CwDOH5aMJzMl Content-Type: image/jpeg; name="buffer1.JPG" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="buffer1.JPG" /9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0a HBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zN...

delphi.internet.winsock
I was having some issues with XanaNews so I went to the Emb web version and was getting... delphi.internet.winsock - group not available. The server is throwing HTTP Status 500. Anyone else having trouble with newsgroups. Many other groups seem ok. -- Ray El 02/02/2014 8:05, Raymond Alexander escribió: > I was having some issues with XanaNews so I went to the Emb web version > and was getting... > > delphi.internet.winsock - group not available. > > The server is throwing HTTP Status 500. > > Anyone else having trouble with newsgroups. ...

Pass phase encryption for Delphi XE(pbes2)
Hi, my project needed to implement for encryption and decryption method with pbes2 algorithm, Any suggestion of tools/component/dll for above requirement ? Regards, Cw lee c w wrote: > Hi, my project needed to implement for encryption and decryption method with pbes2 algorithm, > Any suggestion of tools/component/dll for above requirement ? > > Regards, > Cw See if this DLL and example of using it works for you http://www.example-code.com/delphiDll/crypt2_pbes2.asp -- Jeff Overcash (TeamB) (Please do not email me directly unless asked. Thank You)...

Blowfish encryption/decryption algorithm for asp.net
I required Blowfish encryption/decryption Algorithm runable in : Asp.net1.1 Server side language : VB.netmotive: to encrypt password,emailid using blowfish algo and to decrypt those.if there is any component its ok.please send me related files or urls. Check out the thread here:http://forums.asp.net/1336313/ShowThread.aspx#1336313Darrell Norton, MVPDarrell Norton's BlogPlease mark this post as answered if it helped you!...

Encryption & Decryption in Delphi [Edit] #2
Anybody can help me to Decrypt 3DES / TrippleDES string in Delphi?, found myself jugling for 6 hours without luck :( Edited by: eldi munggaran on Jan 7, 2015 7:11 AM ...

Password Encryption through Open Client using Delphi
I am going to develop a client application using Delphi 6 Enterprise Edition to access Sybase using Open Client with password encryption feature. I have read passages on how to do password encryption through Open Client. However, it looked like C code. Can anyone enlighten me on how and where to put the password encryption codes in my Delphi program. I am quite sure it should be somewhere around the database component property. But I don't know what exactly to do. Thanks for your help. ...

Licensing, encryption and obfuscation of Delphi Windows apps
A bunch of years ago we wrote a Windows application using Delphi 7 and tons of third party controls. We used ICE License by Ionworx to lock it up and license it. It's worked fine but my current copy of ICE will not work on anything past XP and I'm not really wanting to keep using it even if I can upgrade. His tools are still available for purchase but I don't think he's made any changes in years and he hasn't responded to any of my emails since about 2012. I need a new more up to date solution that's acti vely being developed. After talking with a tech guy at Embarcade...

Are OpenSSL Libraries a good choice for encryption in Delphi and Lazarus
Good day I was wondering whether using the OpenSSL libraries for Non-SSL/TLS, in other words normal symmetric encryption (maybe AES) and asymmetric encryption (maybe RSA) without the need for SSL/TLS specifically, is a good idea? Good idea as in "Is it one of the preferred libraries to use?". Is there another library that is more preferred which I would be able to use with Delphi and FPC/Lazarus? It should be a well trusted library. It does not have to be a delphi/fpc/pascal library. I don't mind using libraries as DLLs in Windows as long as it has its counterparts on L...

Delphi Encryption Compendium (DEC) 5.2 question
Does anybody have an example on how to get MD5 hash for a string? Inside the package is the example how to encrypt/decrypt unicode strings, but not how to get MD5 (or any other) hash. Thanks. Denis Miller wrote: > Does anybody have an example on how to get MD5 hash for a string? > > Inside the package is the example how to encrypt/decrypt unicode > strings, but not how to get MD5 (or any other) hash. Generally speaking - and this applies to all libraries and component sets - you don't hash strings and characters, but bits and bytes. The API might make yo...

RC4, AES, Blowfish, DES
Just got a copy of Stuffit. It can encrypt files using: RC4 (512 bit) DES (64 bit) Blowfish (448 bit) AES (256 bit) I'm seeking views on which algorithm to use. It strikes me that 512 bit RC4 is probably best (512 seems so big ;-)) but I read all over the place that RC4 has weaknesses. So should I use Blowfish at a lower bit rate? Anyway another consideration is not wanting to be tied into one particular supplier of software and I'd also like to be able to decrypt from a number of platforms MacOSX, Linux, Windows (diff flavours). Does this impact on my choice ...

Delphi 2009
I've done some searching on the web, and i can't seem to find any answer to the problem i have. The client is made in c++ using winsock send & recieve. The server is done with Indy IdTCPServer component. When the winsock client connects, IdTCPServer get knowledge of it. However, when the winsock client sends a chararray with the function send(), nothing gets parsed in IdTCPServer.Execute. I know the client works, since i built a winsock testserver for the occation. However when using Acontext.Connection.IOHandler.ReadLn it does not. Is it known that Indy vs winsock base do...

LockBox Encryption issue
Hi all, I posted a few days ago because I was stuck on a Delphi to BCB conversion issue when trying to impliment some of the LockBox Rijndael encryption functions. Remy pointed me in the right direction but i've still got a problem and I'm not sure where the problem is stemming from. My code is shown below - it basically wraps up the encryption and decryption of a given stream. The encryption side of things seems to work but the decryption is failing. It seems to be failing on the line iBytesToDecrypt = (*RDLBlk)[1]; which should return the decrypted size of the so...

How to set sybase openclient password encryption in delphi,thanks!
I don't know how to set sybase openclient password encryption in delphi,somebody help me,please! You probably need to contact Borland to find this out. The attribute is a connection property and if using a vendor interface, the vendor needs to provide a means of accomplishing this. pv study wrote: > > I don't know how to set sybase openclient password encryption in > delphi,somebody help me,please! ...

Web resources about - Blowfish encryption - embarcadero.delphi.winsock

Encryption - Wikipedia, the free encyclopedia
For technical reasons, an encryption scheme usually uses a pseudo-random encryption key generated by an algorithm. It is in principle possible ...

REPORT: Facebook’s Outdated Web Encryption Technology May Have Enabled Prism
Facebook still uses encryption keys with 1,024-bit lengths, while the industry standard used by Internet companies — including Apple, Microsoft, ...

WhatsApp CEO Jan Koum Supports Apple and Tim Cook in Encryption Fight
WhatsApp CEO Jan Koum: I have always admired Tim Cook for his stance on privacy and Apple’s efforts to protect user data and couldn’t agree ...

Search Twitter - encryption
Sign in Sign up Search Refresh Tech Investor News @ TechInvestNews 2m Secusmart puts its BlackBerry encryption chip to work on the desktop (Netflash) ...

Nature - Private Photo Gallery, Video, Password and Noted Manager with encryption on the App Store
... compare customer ratings, see screenshots, and learn more about Nature - Private Photo Gallery, Video, Password and Noted Manager with encryption. ...

Amazon’s latest version of Fire OS disables encryption
Update, March 5: Amazon announced in a statement that it will bring back encryption to its Fire line with a future update coming this spring. ...

Amazon values encryption so much that it drops support on Kindle Fire tablets
Amazon has came out in support of encryption, following Apple's recent legal battles with the US government, saying that it "plays a very, very ...

iPhone encryption is a ‘gift from God,’ says prison inmate
Will criminals switch to iPhones just because voice and text conversations are encrypted by default? Governments all over the world have been ...

Amazon ends encryption on tablets: Report
Amazon is no longer supporting encryption on its Fire devices, according to a recent report.

Seriously, Amazon? Fire tablets drop encryption, are less secure
... Fire OS 5 is a step backward in protecting consumers. The outrage blows up as tech leaders throw support behind Apple in its iPhone encryption ...

Resources last updated: 3/6/2016 11:55:27 AM