Re: [MSEide-MSEgui-talk] How to AES/DES crypt/decrypt string variables with the MSEgui OpenSSL facilities ?

2012-07-16 Thread Martin Schreiber
On Monday 16 July 2012 14:05:47 Ivanko B wrote: Cipher-, compression- and encoding- chaining is ready for testing, please write a how-to. ;-) The AES256--BASE64 chain looks working. PS: Do You consider to extend the packager list with LZMA (best compression available) ? Is there a cross

Re: [MSEide-MSEgui-talk] How to AES/DES crypt/decrypt string variables with the MSEgui OpenSSL facilities ?

2012-07-16 Thread Ivanko B
http://www.birtles.org.uk/programming/LZMA.442b.7z PS: What me get is that the bloom of hundreds DELPHI custom components for crypting/archiving is a nightmare to analyze choose even use [building version issues etc]. It looks better to have a couple of ones to cover all the area - fast

Re: [MSEide-MSEgui-talk] How to AES/DES crypt/decrypt string variables with the MSEgui OpenSSL facilities ?

2012-07-09 Thread Martin Schreiber
IvankoB wrote: Now we have the tool against what many programmers have to struggle toughly :) I struggled (and still do) thoughly. ;-) .. and we have a LIBRARY SOLUTION not just a regular how-to :) Cipher-, compression- and encoding- chaining is ready for testing, please write a

Re: [MSEide-MSEgui-talk] How to AES/DES crypt/decrypt string variables with the MSEgui OpenSSL facilities ?

2012-07-04 Thread Martin Schreiber
On Wednesday 04 July 2012 07:40:33 Martin Schreiber wrote: keylength is 0 (use cipher default), I don't know what enc uses. Then the file structure must be the same, I don't have a documentation of enc file format. It seems it has a 'Salted__' header. I'll do the same. Martin

Re: [MSEide-MSEgui-talk] How to AES/DES crypt/decrypt string variables with the MSEgui OpenSSL facilities ?

2012-07-04 Thread IvankoB
OpenSSL is no standard. If you want to use openssl enc with tsymciphercryptohandler the parameters of tsymciphercryptohandler must match the parameters used by openssl enc. Default MSEgui keygeniterationcount is 5 (I'll change it to 1), enc uses 1. Default MSEgui keylength is 0 (use

Re: [MSEide-MSEgui-talk] How to AES/DES crypt/decrypt string variables with the MSEgui OpenSSL facilities ?

2012-07-04 Thread Martin Schreiber
On Wednesday 04 July 2012 08:25:15 Martin Schreiber wrote: On Wednesday 04 July 2012 07:40:33 Martin Schreiber wrote: keylength is 0 (use cipher default), I don't know what enc uses. Then the file structure must be the same, I don't have a documentation of enc file format. It seems it has

Re: [MSEide-MSEgui-talk] How to AES/DES crypt/decrypt string variables with the MSEgui OpenSSL facilities ?

2012-07-04 Thread IvankoB
It seems it has a 'Salted__' header. I'll do the same. Done, git master 8511bd50db6557aadbceb1f2eefa7ee6df64c6ee. It works, thanx ! PS: Now we have the tool against what many programmers have to struggle toughly :)

Re: [MSEide-MSEgui-talk] How to AES/DES crypt/decrypt string variables with the MSEgui OpenSSL facilities ?

2012-07-04 Thread Martin Schreiber
On Wednesday 04 July 2012 09:37:35 IvankoB wrote: It seems it has a 'Salted__' header. I'll do the same. Done, git master 8511bd50db6557aadbceb1f2eefa7ee6df64c6ee. It works, thanx ! PS: Now we have the tool against what many programmers have to struggle toughly :) I struggled (and

Re: [MSEide-MSEgui-talk] How to AES/DES crypt/decrypt string variables with the MSEgui OpenSSL facilities ?

2012-07-04 Thread IvankoB
Now we have the tool against what many programmers have to struggle toughly :) I struggled (and still do) thoughly. ;-) .. and we have a LIBRARY SOLUTION not just a regular how-to :) -- Live Security Virtual

Re: [MSEide-MSEgui-talk] How to AES/DES crypt/decrypt string variables with the MSEgui OpenSSL facilities ?

2012-07-04 Thread IvankoB
Done, git master 8511bd50db6557aadbceb1f2eefa7ee6df64c6ee. It works, thanx ! In PODPISKA too. -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape

Re: [MSEide-MSEgui-talk] How to AES/DES crypt/decrypt string variables with the MSEgui OpenSSL facilities ?

2012-07-04 Thread IvankoB
Martin Schreiber mse0-re5jqeeqqe8avxtiumw...@public.gmane.org писал(а) в своём письме Tue, 03 Jul 2012 12:35:40 +0500: On Tuesday 03 July 2012 08:51:48 IvankoB wrote: Exception or another error reporting/intercepting in case of failed (wrong keyphrase etc encryption related cuuses) data

Re: [MSEide-MSEgui-talk] How to AES/DES crypt/decrypt string variables with the MSEgui OpenSSL facilities ?

2012-07-04 Thread Martin Schreiber
On Wednesday 04 July 2012 13:49:49 IvankoB wrote: In case of a wrong key the result will be garbage. It is your application which has to decide if it is garbage or not... Hmm... trying to decrypt with a smallest data-vs-key mismatch raises ESSL exception which can be handled: Probably

Re: [MSEide-MSEgui-talk] How to AES/DES crypt/decrypt string variables with the MSEgui OpenSSL facilities ?

2012-07-04 Thread IvankoB
Hmm... trying to decrypt with a smallest data-vs-key mismatch raises ESSL exception which can be handled: Probably because of a padding error. The chance to trigger a padding error is 255/256 IIRC. If this is good enough for you... ;-) In this scenario, me hope on StrToInt conversion

Re: [MSEide-MSEgui-talk] How to AES/DES crypt/decrypt string variables with the MSEgui OpenSSL facilities ?

2012-07-03 Thread Ivanko B
Please write what exactly you do and what error messages you expect. = Exception or another error reporting/intercepting in case of failed (wrong keyphrase etc encryption related cuuses) data retrieval from/to ecrypted_stream.Read/Write/CopyFrom(..),

Re: [MSEide-MSEgui-talk] How to AES/DES crypt/decrypt string variables with the MSEgui OpenSSL facilities ?

2012-07-03 Thread Martin Schreiber
On Tuesday 03 July 2012 08:13:47 Ivanko B wrote: Please write what exactly you do and what error messages you expect. = Exception or another error reporting/intercepting in case of failed (wrong keyphrase etc encryption related cuuses) data retrieval from/to

Re: [MSEide-MSEgui-talk] How to AES/DES crypt/decrypt string variables with the MSEgui OpenSSL facilities ?

2012-07-03 Thread IvankoB
Exception or another error reporting/intercepting in case of failed (wrong keyphrase etc encryption related cuuses) data retrieval from/to ecrypted_stream.Read/Write/CopyFrom(..), stringlist.LoadFromStream/SaveToStream(ecrypted_stream),.. AFAIK, all these use stream's Read/Write internally so

Re: [MSEide-MSEgui-talk] How to AES/DES crypt/decrypt string variables with the MSEgui OpenSSL facilities ?

2012-07-03 Thread Martin Schreiber
On Tuesday 03 July 2012 08:51:48 IvankoB wrote: Exception or another error reporting/intercepting in case of failed (wrong keyphrase etc encryption related cuuses) data retrieval from/to ecrypted_stream.Read/Write/CopyFrom(..), stringlist.LoadFromStream/SaveToStream(ecrypted_stream),..

Re: [MSEide-MSEgui-talk] How to AES/DES crypt/decrypt string variables with the MSEgui OpenSSL facilities ?

2012-07-03 Thread Martin Schreiber
On Monday 02 July 2012 18:23:39 Ivanko B wrote: I don't understand, please write a complete example. = Me read AES+BASE64 (after-pass at the moment hough it's bad) externally encoded ASCII-text from a file then stripe out BASE64 ( it produces binary [AES-encoded] data then -

Re: [MSEide-MSEgui-talk] How to AES/DES crypt/decrypt string variables with the MSEgui OpenSSL facilities ?

2012-07-03 Thread Martin Schreiber
On Tuesday 03 July 2012 15:39:37 IvankoB wrote: Me have problems with tsymcryptohandler's decode - it can't decode data properly, se eteh atached project. However, 2.tar.gz demonstrates that the data the key match perfectly. Salt settings OK?

Re: [MSEide-MSEgui-talk] How to AES/DES crypt/decrypt string variables with the MSEgui OpenSSL facilities ?

2012-07-03 Thread Martin Schreiber
On Tuesday 03 July 2012 14:34:57 Martin Schreiber wrote: //decryption stream1:= ttextstream.create('test.enc',fm_read); try stream2:= nil; stream2:= tmsefilestream.create(fm_read); stream2.writedatastring(decodebase64(stream1.readdatastring)); //buffer for

Re: [MSEide-MSEgui-talk] How to AES/DES crypt/decrypt string variables with the MSEgui OpenSSL facilities ?

2012-07-03 Thread IvankoB
Can be simplified to //decryption stream1:= ttextstream.create('test.enc',fm_read); try stream2:= nil; stream2:= tmsefilestream.createstringcopy( decodebase64(stream1.readdatastring)); //buffer for encrypted data

Re: [MSEide-MSEgui-talk] How to AES/DES crypt/decrypt string variables with the MSEgui OpenSSL facilities ?

2012-07-03 Thread Martin Schreiber
On Tuesday 03 July 2012 15:39:37 IvankoB wrote: Me have problems with tsymcryptohandler's decode - it can't decode data properly, se eteh atached project. However, 2.tar.gz demonstrates that the data the key match perfectly. Where is the result format of the openssl enc command defined?

Re: [MSEide-MSEgui-talk] How to AES/DES crypt/decrypt string variables with the MSEgui OpenSSL facilities ?

2012-07-03 Thread IvankoB
Where is the result format of the openssl enc command defined? Especially how it stores the salt? What is the keygen iteration count it uses? The commands are as follows : #- #!/bin/sh echo -n 1:4:212 /tmp/212.in

Re: [MSEide-MSEgui-talk] How to AES/DES crypt/decrypt string variables with the MSEgui OpenSSL facilities ?

2012-07-03 Thread Martin Schreiber
On Tuesday 03 July 2012 18:20:55 IvankoB wrote: Where is the result format of the openssl enc command defined? Especially how it stores the salt? What is the keygen iteration count it uses? The commands are as follows : #- #!/bin/sh echo -n 1:4:212

Re: [MSEide-MSEgui-talk] How to AES/DES crypt/decrypt string variables with the MSEgui OpenSSL facilities ?

2012-07-03 Thread Martin Schreiber
On Tuesday 03 July 2012 17:24:58 IvankoB wrote: Can be simplified to //decryption stream1:= ttextstream.create('test.enc',fm_read); try stream2:= nil; stream2:= tmsefilestream.createstringcopy( decodebase64(stream1.readdatastring));

Re: [MSEide-MSEgui-talk] How to AES/DES crypt/decrypt string variables with the MSEgui OpenSSL facilities ?

2012-07-03 Thread Ivanko B
git master b2566e9e97e644c9b5e63bff648dcbdd3470cad0 has base64 parameter and msestring variants for tcustomcryptohandler.encrypt(), decrypt(). It is planned to chain cryptohandlers and to implement a base64 cryptohandler. === Great thanx ! Will be checked tomorrow. Sure, but how

Re: [MSEide-MSEgui-talk] How to AES/DES crypt/decrypt string variables with the MSEgui OpenSSL facilities ?

2012-07-03 Thread Martin Schreiber
On Tuesday 03 July 2012 20:15:20 Ivanko B wrote: git master b2566e9e97e644c9b5e63bff648dcbdd3470cad0 has base64 parameter and msestring variants for tcustomcryptohandler.encrypt(), decrypt(). It is planned to chain cryptohandlers and to implement a base64 cryptohandler. === Great

Re: [MSEide-MSEgui-talk] How to AES/DES crypt/decrypt string variables with the MSEgui OpenSSL facilities ?

2012-07-03 Thread Ivanko B
It seems not: http://stackoverflow.com/questions/759722/openssl-des3-decrypting-in-java OpenSSL's enc utility uses a non-standard (and low quality) key derivation algorithm for passwords. The following code shows how the enc utility generates the key and initialization vector, given salt

Re: [MSEide-MSEgui-talk] How to AES/DES crypt/decrypt string variables with the MSEgui OpenSSL facilities ?

2012-07-03 Thread Martin Schreiber
On Wednesday 04 July 2012 07:08:50 Ivanko B wrote: It seems not: http://stackoverflow.com/questions/759722/openssl-des3-decrypting-in-java OpenSSL's enc utility uses a non-standard (and low quality) key derivation algorithm for passwords. The following code shows how the enc utility

Re: [MSEide-MSEgui-talk] How to AES/DES crypt/decrypt string variables with the MSEgui OpenSSL facilities ?

2012-07-02 Thread IvankoB
How to decode BASE64 ? Me have cypher not found at : cbase64,crh: tsymciphercryptohandler; [...] crh:= tsymciphercryptohandler.create(nil); crh.ciphername:= 'aes-256-cbc'; // default digest is MD5 cbase64:= tsymciphercryptohandler.create(nil); cbase64.ciphername:= 'base64'; crh.key:= passw; s3:=

Re: [MSEide-MSEgui-talk] How to AES/DES crypt/decrypt string variables with the MSEgui OpenSSL facilities ?

2012-07-02 Thread Ivanko B
How to decode BASE64 ? Me have cypher not found at : cbase64,crh: tsymciphercryptohandler; [...] crh:= tsymciphercryptohandler.create(nil); crh.ciphername:= 'aes-256-cbc'; // default digest is MD5 cbase64:= tsymciphercryptohandler.create(nil); cbase64.ciphername:= 'base64'; crh.key:= passw; s3:=

Re: [MSEide-MSEgui-talk] How to AES/DES crypt/decrypt string variables with the MSEgui OpenSSL facilities ?

2012-07-02 Thread IvankoB
How to decode BASE64 ? Me have cypher not found at : cbase64,crh: tsymciphercryptohandler; [...] crh:= tsymciphercryptohandler.create(nil); crh.ciphername:= 'aes-256-cbc'; // default digest is MD5 cbase64:= tsymciphercryptohandler.create(nil); cbase64.ciphername:= 'base64'; crh.key:= passw; s3:=

Re: [MSEide-MSEgui-talk] How to AES/DES crypt/decrypt string variables with the MSEgui OpenSSL facilities ?

2012-07-02 Thread Ivanko B
Oops, BASE64 shoud be implemented as on option (escaping from BIN to TEXT) of encoder (BASEing before asking password) not a sepatare pass (after asking). Anyway, here are both (Enc/Dec)oders for BASE64: == procedure Base64Decode(const s:string; const ostream:tstream; const

Re: [MSEide-MSEgui-talk] How to AES/DES crypt/decrypt string variables with the MSEgui OpenSSL facilities ?

2012-07-02 Thread Martin Schreiber
On Monday 02 July 2012 16:31:09 IvankoB wrote: How to decode BASE64 ? Me have cypher not found at : cbase64,crh: tsymciphercryptohandler; [...] crh:= tsymciphercryptohandler.create(nil); crh.ciphername:= 'aes-256-cbc'; // default digest is MD5 cbase64:= tsymciphercryptohandler.create(nil);

Re: [MSEide-MSEgui-talk] How to AES/DES crypt/decrypt string variables with the MSEgui OpenSSL facilities ?

2012-07-02 Thread Ivanko B
You propably need to compare a hash value of the original data with the decrypted data. Are there related error codes ? const maxlinelength: integer = 0): string; function decodebase64(const atext: string): string; lib/common/kernel/mseformatstr.pas = Are they

Re: [MSEide-MSEgui-talk] How to AES/DES crypt/decrypt string variables with the MSEgui OpenSSL facilities ?

2012-07-02 Thread Martin Schreiber
On Monday 02 July 2012 18:23:39 Ivanko B wrote: You propably need to compare a hash value of the original data with the decrypted data. Are there related error codes ? The hash must be in your data record. openssl checks padding errors only. const maxlinelength: integer =

Re: [MSEide-MSEgui-talk] How to AES/DES crypt/decrypt string variables with the MSEgui OpenSSL facilities ?

2012-06-27 Thread Martin Schreiber
On Tuesday 26 June 2012 08:50:41 IvankoB wrote: Me wrote a large OpenSSL wrapper file doing that but You wrote own compact implementation, AFAIK - how can me use it ? Place a tasymciphercryptohandler (tab NoGui) in the form/datamodule, setup the necessary parameters. Set the property

Re: [MSEide-MSEgui-talk] How to AES/DES crypt/decrypt string variables with the MSEgui OpenSSL facilities ?

2012-06-27 Thread Ivanko B
Great thanx ! 2012/6/27, Martin Schreiber mse00...@gmail.com: On Tuesday 26 June 2012 08:50:41 IvankoB wrote: Me wrote a large OpenSSL wrapper file doing that but You wrote own compact implementation, AFAIK - how can me use it ? Place a tasymciphercryptohandler (tab NoGui) in the

Re: [MSEide-MSEgui-talk] How to AES/DES crypt/decrypt string variables with the MSEgui OpenSSL facilities ?

2012-06-26 Thread Martin Schreiber
On Monday 25 June 2012 16:29:59 IvankoB wrote: Me wrote a large OpenSSL wrapper file doing that but You wrote own compact implementation, AFAIK - how can me use it ? Place a tasymciphercryptohandler (tab NoGui) in the form/datamodule, setup the necessary parameters. Set the property

Re: [MSEide-MSEgui-talk] How to AES/DES crypt/decrypt string variables with the MSEgui OpenSSL facilities ?

2012-06-26 Thread IvankoB
Me wrote a large OpenSSL wrapper file doing that but You wrote own compact implementation, AFAIK - how can me use it ? Place a tasymciphercryptohandler (tab NoGui) in the form/datamodule, setup the necessary parameters. Set the property cryptohandler of your tmsefilestream descendants

Re: [MSEide-MSEgui-talk] How to AES/DES crypt/decrypt string variables with the MSEgui OpenSSL facilities ?

2012-06-26 Thread Martin Schreiber
On Tuesday 26 June 2012 08:50:41 IvankoB wrote: Me wrote a large OpenSSL wrapper file doing that but You wrote own compact implementation, AFAIK - how can me use it ? Place a tasymciphercryptohandler (tab NoGui) in the form/datamodule, setup the necessary parameters. Set the property