Jump to content
Sign in to follow this  
SkinnyWhiteGuy

Crypto Suite

Recommended Posts

No thin rope here, as I'd love to be able to write my own encryption algorithm one day. The thing is, to be a truly secure algorithm, I'd need to know a lot more about cryptography. So far, all I have is a beginners understanding, and a few translated pieces of code. Twofish is kicking my butt right now, I'm barely starting to understand the Reference source code, and I have that in C, VB, Perl, and a version in Javascript. No, the Skinny Encryption Algorithm will have to wait till I have a lot more experience, and may never become a reality. Thanks for the reply though.

Share this post


Link to post
Share on other sites

After thinking about it for awhile, I may go back and give users an optional function parameter to allow you to choose which padding scheme you want used. There's 3 I can implement, the previous one (pad with null bytes), the current one (pad with n bytes, each byte has the value of n till block size is reached), and a third method (pad first with byte 80, then fill the rest with nulls till block size is reached). I was just going to ask if anyone would be interested/care if I did/didn't do something like that. With that option in, it would allow the scripts here to be more compatible with other systems you, the users, may use to interface/use this with, but if no one believes they will do such things with these scripts in the near future, I'll put that kind of update on the bottom of the list.

I want to use in the near future your functions MD5 to hash password (and align it to 128/256 bit length) and AES to encrypt text with this password as key.

Maybe there would be better to use SHA1 instead of MD5 because of hacked MD5

So here is my wish/vote for SHA1 - give it higher priority if possible please.

Thanks

I needn't another padding, so idea for you: if you will do it, make it as optional parametres with default to current behaviour for backward compatibility.

Edited by Zedna

Share this post


Link to post
Share on other sites

the cryptographic standard is to pad with null bytes, this is so it doesnt introduce any information that coould be decoded wrong and cause a crash. also you want to keeop the data to a minimum to avoid password cracking.

As for the question on base64, this isnt really an encryption process so no key. It really just converts the data into code that can be sent accross the web inan email (MIME) and can be decoded at the other end. By using 64 bits of data all characters etc can be encoded, and it is also the web standard for transfering binary data between two places.

Zedna- "http://en.wikipedia.org/wiki/SHA-1"]SHA

SHA1 is cracked, why not vote for SHA256 or SHA512 which are still secure :shocked: MD5 is 128 bit hash, SHA1 is 160 bits and guess what SHA256 is 256 bits and SHA512 is 512 bits *l*

Better yet why not implement a hash alogrythm that is totally secure, like one from the below list that doesnt have collisions

Hashes or make one from Blowfish or AES by converting the block cipher to a hash function info here

Share this post


Link to post
Share on other sites

I was wondering what was the standard, the main reason I was shying away from just padding with null bytes is, if some one used these functions to encrypt a file, and that file contained null bytes (especially at the end) older versions of the functions would strip those as well, corrupting the file. I was using the two padding schemes I listed above (referenced on wikipedia) to try to prevent that. Since you seem to have more experience with cryptography, which method would you recommend for maximum capabilities, and minimum downsides?

Also, I know some of the algorithms I listed are "cracked", but even so, they are still in wide use today, and I wanted to try to ensure maximum flexibility in the suite's usefulness. The cracked ones may take lesser priority, but they will be implemented. Thanks for the list, though, I may add some from there. I also like the idea of turning AES into a hashing function, so that I could eventually have a folder for each encryption algorithm with different versions in there (or maybe just more options on the functions themselves).

By the way, I know at one time you said you had some source code of different algorithms in C implemented. Any chance you have a Twofish implementation sitting around too? I'm still trying to understand the reference code, and it's still confusing, though a lot less so then at first.

Share this post


Link to post
Share on other sites

Nice collection you have there :)

i have 2 things that might be interesting for you:

nr1 is very simple:

;===============================================================================
;
; Description:      XOR simple symmetric cipher
; Parameter(s):     $vData, The data to En/Decrypt
;                   $vKey, The Key to use
;                   $fReturnString, Optional, if True The return value is a String
; Requirement(s):   
; Return Value(s):  En/Decrypted data, Binary unless $fReturnString is set
; Author(s):        piccaso
; CallTip:          _xor($vData,$vKey,[$fReturnString = False])
; Note(s):          XOR is a very simple type of encryption
;                   for the purpose of making data not human readable and only
;                   for data where security is not a defined requirement.
;                   If $fReturnString is set and the Return value contains a null
;                   it will be truncated
;
;===============================================================================
Func _xor($vData,$vKey,$fReturnString = False)
    Local $nDataLen, $nKeyLen, $vBin, $vSz
    Local $iDataPtr, $iKeyPtr = 0
    If IsBinary($vData) Then 
        $nDataLen = BinaryLen($vData)
    Else
        $nDataLen = StringLen($vData)
    EndIf
    If IsBinary($vKey) Then
        $nKeyLen = BinaryLen($vKey)
    Else
        $nKeyLen = StringLen($vKey)
    EndIf
    $vBin = DllStructCreate("ubyte key[" & $nKeyLen & "];ubyte data[" & $nDataLen & "];ubyte zterm")
    $vBin.key = $vKey
    $vBin.data = $vData
    For $iDataPtr = 1 To $nDataLen
        $iKeyPtr += 1
        DllStructSetData($vBin,2,BitXOR(DllStructGetData($vBin,2,$iDataPtr),DllStructGetData($vBin,1,$iKeyPtr)),$iDataPtr)
        If $iKeyPtr = $nKeyLen Then $iKeyPtr = 0
    Next
    If $fReturnString Then
        $vSz = DllStructCreate("char data[" & $nDataLen+1 & "]",DllStructGetPtr($vBin,2))
        Return $vSz.data
    EndIf
    Return $vBin.data
EndFuncoÝ÷ Ù©ÝjX­¶W­zËlr¸©µ«­¢+Ø¥¹±ÕÅÕ½Ðíá½È¹ÔÌÅÕ½Ðì((ìMÑÉ¥¹QÍÐ(ÀÌØíÍ-äôÅÕ½ÐíÑ¡-äÅÕ½Ðì(ÀÌØíÍÑôÅÕ½ÐíMÉÐÑÅÕ½Ðì)
½¹Í½±]É¥Ñ ÅÕ½ÐíÉåÁÑÍÑÈèÅÕ½ÐìµÀìÀÌØíÍѵÀì1¤ìÁàÈÜÁÀØÔÈÉÄÄÔäÌÀÀäÄÄÐÄ(ÀÌØíÙ¹ô}á½È ÀÌØíÍÑ°ÀÌØíÍ-ä¤)
½¹Í½±]É¥Ñ ÅÕ½Ðí¹ÉåÁÑ¥¸èÅÕ½ÐìµÀìÀÌØíÙ¹µÀì1¤)
½¹Í½±]É¥Ñ ÅÕ½ÐíÉåÁÑ¥¸èÅÕ½ÐìµÀì}á½È ÀÌØíÙ¹°ÀÌØíÍ-䤵Àì1¤)
½¹Í½±]É¥Ñ ÅÕ½ÐíÉåÁÑÍÑÈèÅÕ½ÐìµÀì}á½È ÀÌØíÙ¹°ÀÌØíÍ-ä±QÉÕ¤µÀì1¤(((ì  ¥¹ÉäMÁQÍÐ(ÀÌØí¥¸ô}I¹½µ ¥¹Éä ÄÀÈШԤìÕ­(ÀÌØí­äô}I¹½µ    ¥¹Éä ÈÔؤìÈÔÙ   åÑÌ­ä)
½¹Í½±]É¥Ñ ÅÕ½ÐìÕ­Ñ°ÈÔÙ  åÑÌ­äÅÕ½ÐìµÀì1¤(ÀÌØí¥Q¥µÈôQ¥µÉ%¹¥Ð ¤(ÀÌØí¹ô}á½È ÀÌØí¥¸°ÀÌØí­ä¤)
½¹Í½±]É¥Ñ ÅÕ½Ðí¹ÉåÁÐèÅÕ½ÐìµÀìQ¥µÉ¥ ÀÌØí¥Q¥µÈ¤µÀì1¤(ÀÌØí¥Q¥µÈôQ¥µÉ%¹¥Ð ¤(ÀÌØíô}á½È ÀÌØí¹°ÀÌØí­ä¤)
½¹Í½±]É¥Ñ ÅÕ½ÐíÉåÁÐèÅÕ½ÐìµÀìQ¥µÉ¥ ÀÌØí¥Q¥µÈ¤µÀì1¤)%ÀÌØí±ÐìÐìÀÌØí¥¸Q¡¸
½¹Í½±]É¥Ñ ÅÕ½ÐíÑQÉÍ¡ÌÌìÅÕ½ÐìµÀì1¤((ì´´)Õ¹}I¹½µ ¥¹Éä ÀÌØí¥M¥éôÈÔؤ(%1½°ÀÌØí¤°ÀÌØíÍ!à(%½ÈÀÌØí¤ôÄQ¼ÀÌØí¥M¥é($$ÀÌØíÍ!àµÀìô!à¡I¹½´ À°Áá°Ä¤°È¤(%9áÐ(%IÑÕɸ ¥¹Éä ÅÕ½ÐìÁàÅÕ½ÐìµÀìÀÌØíÍ!à¤)¹Õ¹ìôôÐí}I¹½µ ¥¹ÉoÝ÷ Ù©ÝiìZ^¡û¬y«­¢+Ø¥¹±ÕÅÕ½ÐíÉйÔÌÅÕ½Ðì()
½¹Í½±]É¥Ñ ÅÕ½Ðí¹ÉÑ¥¹ÄÈá­I¹½´ÑÅÕ½ÐìµÀì1¤(ÀÌØí¥¸ô}I¹½µ   ¥¹Éä ÄÀÈШÄÈà¤)
½¹Í½±]É¥Ñ ÅÕ½Ðí¹ÉÑ¥¹ÈÔØ    åÑÌ ÈÀÐà ¥Ð¤I¹½´-äÅÕ½ÐìµÀì1¤(ÀÌØí­äô}I¹½µ  ¥¹Éä ÈÔؤ((ÀÌØí¥Q¥µÈôQ¥µÉ%¹¥Ð ¤(ÀÌØí¹ô}IÐ ÀÌØí¥¸°ÀÌØí­ä¤(ÀÌØí¥ôI½Õ¹¡Q¥µÉ¥ ÀÌØí¥Q¥µÈ¤°È¤)
½¹Í½±]É¥Ñ ÅÕ½Ðí¹ÉåÁÐèÅÕ½ÐìµÀìÀÌØí¥µÀì1¤((ÀÌØí¥Q¥µÈôQ¥µÉ%¹¥Ð ¤(ÀÌØíô}IÐ ÀÌØí¹°ÀÌØí­ä¤(ÀÌØí¥ôI½Õ¹¡Q¥µÉ¥ ÀÌØí¥Q¥µÈ¤°È¤)
½¹Í½±]É¥Ñ ÅÕ½ÐíÉåÁÐèÅÕ½ÐìµÀìÀÌØí¥µÀì1¤)%ÀÌØí±ÐìÐìÀÌØí¥¸Q¡¸
½¹Í½±]É¥Ñ ÅÕ½ÐíÑQÉÍ¡ÌÌìÅÕ½ÐìµÀì1¤((ìQÍÐYѽÉ̡ɽ´]¥­¥Á¥¤((ìIÐ ÅÕ½Ðí-äÅÕ½Ðì°ÅÕ½ÐíA±¥¹ÑáÐÅÕ½Ðì¤ôô       ÌÄÙáäÐÁÁÌ)%}IÐ ÅÕ½ÐíA±¥¹ÑáÐÅÕ½Ðì°ÅÕ½Ðí-äÅÕ½Ðì°ÀÌØí}}1䤱ÐìÐì   ¥¹Éä ÅÕ½ÐìÁá     ÌÄÙáäÐÁÁÌÅÕ½Ðì¤Q¡¸
½¹Í½±]É¥Ñ ÅÕ½ÐíYѽÈÑÍÐÄ¥±ÅÕ½ÐìµÀì1¤((ìIÐ ÅÕ½Ðí]¥­¤ÅÕ½Ðì°ÅÕ½ÐíÁ¥ÅÕ½Ðì¤ôôÄÀÈÅ   ÀÐÈÀ)%}IÐ ÅÕ½ÐíÁ¥ÅÕ½Ðì°ÅÕ½Ðí]¥­¤ÅÕ½Ðì°ÀÌØí}}1䤱ÐìÐì  ¥¹Éä ÅÕ½ÐìÁàÄÀÈÅ ÀÐÈÀÅÕ½Ðì¤Q¡¸
½¹Í½±]É¥Ñ ÅÕ½ÐíYѽÈÑÍÐÈ¥±ÅÕ½ÐìµÀì1¤((ìIÐ ÅÕ½ÐíMÉÐÅÕ½Ðì°ÅÕ½ÐíÑѬÐݸÅÕ½Ðì¤ôôÐÕÀÅØÐÕÌÕÌàÌÔÔÈÔÐÑå   Ô)%}IÐ ÅÕ½ÐíÑѬÐݸÅÕ½Ðì°ÅÕ½ÐíMÉÐÅÕ½Ðì°ÀÌØí}}1䤱ÐìÐì  ¥¹Éä ÅÕ½ÐìÁàÐÕÀÅØÐÕÌÕÌàÌÔÔÈÔÐÑå   ÔÅÕ½Ðì¤Q¡¸
½¹Í½±]É¥Ñ ÅÕ½ÐíYѽÈÑÍÐÌ¥±ÅÕ½ÐìµÀì1¤((ì´´)Õ¹}I¹½µ ¥¹Éä ÀÌØí¥M¥é¤(%1½°ÀÌØí¤°ÀÌØíÍ!à(%½ÈÀÌØí¤ôÄQ¼ÀÌØí¥M¥é($$ÀÌØíÍ!àµÀìô!à¡I¹½´ À°Áá°Ä¤°È¤(%9áÐ(%IÑÕɸ ¥¹Éä ÅÕ½ÐìÁàÅÕ½ÐìµÀìÀÌØíÍ!à¤)¹Õ¹ìôôÐí}I¹½µ ¥¹Éä

CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map

Share this post


Link to post
Share on other sites

I might found a bug / problem / I might be wrong

If you run the following code

#include "Blowfish.au3"

$key = "TESTKEY"
$key2 = "testkey"
$message = "This is a test of the Blowfish encryption algorithm (Autoit version)."

ConsoleWrite($message & @LF & @LF)
$cipher = Blowfish($key, $message)
ConsoleWrite("""" & $cipher & "a")
MsgBox(0,0,$cipher & "a")
ConsoleWrite(@LF & @LF)
$plaintext = Blowfish($key, $cipher, 1)
ConsoleWrite($plaintext & @LF & @LF)oÝ÷ Ù.Â)e±ç­«më·
%w¬}¨¥±«­¢+Ù
½¹Í½±]É¥Ñ ÅÕ½ÐìÅÕ½ÐìÅÕ½ÐìÅÕ½ÐìµÀìÀÌØí¥Á¡ÈµÀìÅÕ½ÐíÅÕ½Ðì¤(5Í    ½à À°À°ÀÌØí¥Á¡ÈµÀìÅÕ½ÐíÅÕ½Ðì

The a is never show, cant't really tell you why, but my guess is that the encrypt hit a end character or something.


Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit

Share this post


Link to post
Share on other sites

Hey to all, sorry I haven't said anything about this all yet. With the new Binary data types, and Unicode support, I've been doing a lot of researching on which way would be the best to implement all these over again. So far, I've been planning on doing it via Plugins, to draw from C's raw power and speed for doing large texts/files, but Binary data has not been implemented in the Plugin SDK as of yet, so I'm patiently waiting for that, and then I'll update/upgrade all these to be much faster, and get rid of all the previous errors.

In the mean time, if anyone had some pointers/hints on making a regular DLL out of these (just need help compiling a DLL, I'll do all the internal coding myself, just not sure how to get the data into/out of the DLL), I'd be glad to make a version like that with a wrapper au3 file to make using it easier/faster. Currently, I have Dev-C++, but if need be, I can dig around in my CDs and find my copy of Visual C++ I have, and use it to make the DLL with.

Share this post


Link to post
Share on other sites

Hey to all, sorry I haven't said anything about this all yet. With the new Binary data types, and Unicode support, I've been doing a lot of researching on which way would be the best to implement all these over again. So far, I've been planning on doing it via Plugins, to draw from C's raw power and speed for doing large texts/files, but Binary data has not been implemented in the Plugin SDK as of yet, so I'm patiently waiting for that, and then I'll update/upgrade all these to be much faster, and get rid of all the previous errors.

In the mean time, if anyone had some pointers/hints on making a regular DLL out of these (just need help compiling a DLL, I'll do all the internal coding myself, just not sure how to get the data into/out of the DLL), I'd be glad to make a version like that with a wrapper au3 file to make using it easier/faster. Currently, I have Dev-C++, but if need be, I can dig around in my CDs and find my copy of Visual C++ I have, and use it to make the DLL with.

About the problem i have using Crypto Suite v1.1:

(Remind: Obfuscator 1.0.17, steel the same problem compiling my scripts (including AES_Optimized.au3 script from the crypto_suite_v1.1) :

"!File contains records longer than 2047 .. stopping process.")

Do you plan a fix ? When would you have time to unvail it ?

Thanks very much

Maximilian

Share this post


Link to post
Share on other sites

About the problem i have using Crypto Suite v1.1:

(Remind: Obfuscator 1.0.17, steel the same problem compiling my scripts (including AES_Optimized.au3 script from the crypto_suite_v1.1) :

"!File contains records longer than 2047 .. stopping process.")

Do you plan a fix ? When would you have time to unvail it ?

Thanks very much

Maximilian

I provided a solution in that very thread that you could use to fix it yourself :)

Edit:

http://www.autoitscript.com/forum/index.ph...st&p=384917

Just change the $hDir = "where ever your include directory for the crypto suite is"

You'll note, that there wasn't just 1 file but 2 that needed changing... this fix takes about 1 second... you just need to change the name or use that name of the .au3 it makes the include.

Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

I provided a solution in that very thread that you could use to fix it yourself :)

Edit:

http://www.autoitscript.com/forum/index.ph...st&p=384917

Just change the $hDir = "where ever your include directory for the crypto suite is"

You'll note, that there wasn't just 1 file but 2 that needed changing... this fix takes about 1 second... you just need to change the name or use that name of the .au3 it makes the include.

Thank you very much Smoke'N, works perfectly !

My champion !

Max

Share this post


Link to post
Share on other sites

hi,

Great work!!!

I am using your crypto suite. I am using it for encrypting and decryption the passsword data. I am using AES optimized. It seems to work fine but the problem arises when I write the value to a file. For example, I am encrypting the password "P@ssword01" and writing it to a file dat file pwd.dat. When I am reading encrypted password value from pwd.dat it is not get decrypted as expected. Is there something special I need to take care of this.

The idea is I do not want to store the password in clear text. Any suggestions will be appreciated.

Also a general question - what is the default encryption of the AES/AES_optimized script - AES 128 or AES 256.

Please advise.

Thanks.

Share this post


Link to post
Share on other sites

Hey, thanks. I really need to see about more optimizations/other changes I'd like to make to this script here soon, but work/life keeps getting in the way. Nonetheless, I'm here now.

As far as writing info to a file/reading it from a file, I remember helping someone in the help forum with this similar problem, and it came down to the writing/reading from the file that was the problem. When you go to write the encrypted data to a file, make sure you are writing in Binary Mode (18), and it should work. That's what fixed the problem last time, and I'm willing to bet it should work again.

As far as which encryption I'm using, it uses a 128 Bit block, and a 128,192, or 256 Bit key, depending on how long of a key you put in. Last time I checked, the titles of "AES 128" and "AES 256" referred to key size, not block size, so if that is what you mean, then it can do both. If your looking for the block size of 256... Well, technically speaking, that's not even AES, that's just plain old Rijndael (what AES is made from). While I don't have that on here now, I have been working on a version on and off of that for awhile, and I may post it here soon, again if I get the time to iron out all the bugs with it.

Share this post


Link to post
Share on other sites

Personaly,

To avoid having clear text passwords, i use a MD5 checksum. (search MD5 on forum)

I also use AES optimized to store a password key in a file. As you, i had problems with it cause AES sometimes uses unusal characters missinterpreted by filereadline. Now, i make a simple conversion using HEXA like this:

$key="your secret key"

$result=_stringtohex(AES_cipher($key,$text_to_encrypt)) ; gives you the HEXA version of your encrypted text

$result=AES_invCipher($key,_HexToString($text_to_decrypt)) ; gives you the clear text TRING version of your encrypted text

Does it help ?

Max

hi,

Great work!!!

I am using your crypto suite. I am using it for encrypting and decryption the passsword data. I am using AES optimized. It seems to work fine but the problem arises when I write the value to a file. For example, I am encrypting the password "P@ssword01" and writing it to a file dat file pwd.dat. When I am reading encrypted password value from pwd.dat it is not get decrypted as expected. Is there something special I need to take care of this.

The idea is I do not want to store the password in clear text. Any suggestions will be appreciated.

Also a general question - what is the default encryption of the AES/AES_optimized script - AES 128 or AES 256.

Please advise.

Thanks.

Share this post


Link to post
Share on other sites

SkinnyWhiteGuy you might want to update your zip file with my new base64 udf. ever since

! NEW with AutoIt v3.2.4.0 - Now compiled with Unicode support !

binary functions inside autoit have changed. It also might help to post links to the various source codes, since I've had mine updated since Jul 17. By doing that, it would have helped some of the people in here when the code broke.

Other then that, keep up the good work.

Share this post


Link to post
Share on other sites

hi guys,

thanks for the update and information. I was able to get through the problem. BUt I am observing a strange behavior and really want to consult with you guys, esp. skinnywhiteguy (author) and other members of the group.

What is the key criteria for the input. What is mean is not all the key are taken as invalid input by the AES code that I am using from the crypto suite. I tried many keys some of them work some of them do not. I really have no idea why some of the keys do not work.

For e.g the following keys work

01234567890123456789

0123456789abcdef0123456789abcdef

G0123456789abcdef01234G

Wabcdef123456789abcdW

But when i put a key such as below it failed

W0123456789abcde012345Wabcde

So now the issue is which key to be used.

I am building an application where I want user to provide the key. This key (USERKEY) will be used to encrypt/decrypt the username and password. Then there would be a key (SECRETKEY) within the code that will be used to encrypt the USERKEY. This gives us the flexibility where by user can update the username, password and the keys to encrypt the username and password whenever they want.

Any suggestions are welcome. I would really like to understand what kind of keys are necessary for the crypto suite AES code.

Regards,

fox

Share this post


Link to post
Share on other sites

Well, I can't tell you the exact reason why your having problems, mainly because I don't quite understand how you got some of those to work.

See, when I built the functions, they were more Proof of Concept's than polished/finished products, in so far as the keys for encryption were only meant to take certain inputs, but I neglected to add error checking into the function to accomadate for different length keys. Technically, the key you provide should only be 8, 12, or 16 characters long, and only those 3 exactly, so I'm not sure how you got some of those to work (quick visual count of letters didn't match any of those).

Now, one way it has been suggested to get around this limitation (cause I'm sure you don't want users of your program to have to make sure they're passwords are that long) is to use a separate hashing function (like MD5, or SHA-1) on the "key" they give, and use the results from that as the key. Given the fact that hashing functions always produce the same length hashes, no matter what size input text they were given, this would ensure that the key supplied to the functions was correct (at least length wise, but that's about all the key can have wrong with it any way).

Just as a general update for everyone reading/using this, I haven't abandoned this project... Well, at least not completely. The main thing I've noticed is that everyone using the suite I've seen all go for AES_Optimized. I have yet to see anyone say they used something else from it, so I think I'll concentrate on that (as it's also the most secure of the Encryption algorithms that were in the suite). Now, that doesn't mean the rest will go away. It just means that I'll probably remove the ZIP file of all of them, and just include each one separately, so users can just pick and choose what they want. That should allow me to update just the ones that need it when they need it, and keep from removing things others might actually be using. Also, for some of the things I got from other people on the forums, instead of me holding another copy here that would have to be updated by me every time they updated there, I'll just provide a link to their post on it, so everyone can always have the latest author supplied version.

Now, when I'm going to do all this... hehehe, that's something I'll have to figure out later...

Share this post


Link to post
Share on other sites

i'm just starting using nsca (nagios plugin)

it can uses all of securities that you have developped

so, with your work, i can start a new project : Nagios AutoIt Agent

thx for your work man, it's really amazing


-- Arck System _ Soon -- Ideas make everything

"La critique est facile, l'art est difficile"

Projects :

[list] [*]Au3Service : Run your exe as service V3 / Updated 29/07/2013 Get it Here [/list]

Share this post


Link to post
Share on other sites

seems really cool, but it doesn't work with the script above)

#include<rijndael.au3>
$encryptkey = ""
for $i = 1 to 32
    $encryptkey &= chr(Random(97,122,1))
Next    
ConsoleWrite(" Len "  & StringLen($encryptkey) & @crlf & $encryptkey & @crlf)
$sendmessage = "testmessageahaha"
ConsoleWrite($sendmessage & @crlf)
;ConsoleWrite(& @crlf)
$keyencrypted = _rijndaelCipher($encryptkey,$sendmessage)
if $keyencrypted = 0 then 
    ConsoleWrite("Erreur " & @error & @crlf)
    Else
    ConsoleWrite($keyencrypted & @crlf)
EndIf
$keydecrypted = _rijndaelInvCipher($encryptkey,$keyencrypted)
ConsoleWrite($keydecrypted & @crlf)

output

>"C:\Program Files\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "D:\Autoit3\Crypt Library\test_rijndael.au3" /autoit3dir "C:\Program Files\AutoIt3" /UserParams 
+>11:13:20 Starting AutoIt3Wrapper v.1.9.2
>Running AU3Check (1.54.9.0)  from:C:\Program Files\AutoIt3
+>11:13:20 AU3Check ended.rc:0
>Running:(3.2.6.0):C:\Program Files\AutoIt3\autoit3.exe "D:\Autoit3\Crypt Library\test_rijndael.au3"    
 Len 32
yxytvlknrhaxecslqgxnkgmlljqstrkn
testmessageahaha
0x8B4FE225D1F88F4F483ACCD6CADBB589
0x746573746D6573736167656168616861
+>11:13:20 AutoIT3.exe ended.rc:0
+>11:13:21 AutoIt3Wrapper Finished
>Exit code: 0   Time: 1.750

am i doing something wrong ?


-- Arck System _ Soon -- Ideas make everything

"La critique est facile, l'art est difficile"

Projects :

[list] [*]Au3Service : Run your exe as service V3 / Updated 29/07/2013 Get it Here [/list]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...