Sign in to follow this  
Followers 0
jaenster

Crypting

20 posts in this topic

#1 ·  Posted (edited)

This is a crypt function, its fast and short in code, and really strong..

Maby i remake it in php

#INCLUDE <STRING.AU3>
$text = "This is my text i want to encrypt"
$password = "This is my secret password "
$Cryped = Crypt($text,$password,0)
consolewrite($Cryped&@crlf)
$Decrypt= crypt($Cryped,$password,1)
consolewrite($Decrypt&@crlf)

func crypt($t,$pw,$type)
    if $type = 1 then $t = _HexToString($t)
    $Terug = ""
    $pwlen=stringlen($password)
    $textlen = stringlen($t)
    dim $text[$textlen+1]
    for $z = 1 to $pwlen
        for $i = 1 to $textlen
            $text[$i] = hex(bitxor(asc(stringmid($t,$i,1)),asc(stringmid($pw,$z,1))),2)
        next
    next
    for $i = 1 to ubound($text)-1
        if $type =1 then $terug &= chr(dec($text[$i]))
        if $type <> 1 then  $terug &= $text[$i]
    next
    return $Terug
endfunc

Edit : Updated the code

Edited by jaenster

-jaenster

Share this post


Link to post
Share on other sites



Hey, cool crypter! I tried to make one once, ended up turning it into a binary - text translator. Cryptology is a really cool topic, and there are some pretty involved algorithms is use out there these days. I still don't quite understand how to undo the ones that use random strings in random places, then randomly scramble it... I don't see how that could be undone. I also heard somewhere (don't remember from whom) that there were algorithms that were so complex that the government made them illegal because they couldn't figure out how to break them... lol.


- Dan [Website]

Share this post


Link to post
Share on other sites

Hey, cool crypter! I tried to make one once, ended up turning it into a binary - text translator.

That's what happend to mine! :P

Nice encryptor. I like it!


[left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]

Share this post


Link to post
Share on other sites

Hey, cool crypter! I tried to make one once, ended up turning it into a binary - text translator. Cryptology is a really cool topic, and there are some pretty involved algorithms is use out there these days. I still don't quite understand how to undo the ones that use random strings in random places, then randomly scramble it... I don't see how that could be undone. I also heard somewhere (don't remember from whom) that there were algorithms that were so complex that the government made them illegal because they couldn't figure out how to break them... lol.

you mean like md5? I'm pretty sure md5 can't be correctly decrypted....or am I wrong?

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Share this post


Link to post
Share on other sites

Just crazy that something can be encrypted, I don't want to go in paranoïa but - well

I use this pretty program which is just crazy speedy, sure it's not in au3 :D

The link : http://www.ruskwig.com/random_encryption.htm

There is an explanation on how it works ... :P

I don't think it's the same like this script, if not why not making a challenge in re-creating it in au 3

Share this post


Link to post
Share on other sites

Nice script jaenster :-)

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

you mean like md5? I'm pretty sure md5 can't be correctly decrypted....or am I wrong?

Indeed, that's incorrect. MD5 isn't an encryption algorithm in the first place, so there is nothing to decrypt. MD5 is a hash algorithm, and is meant to be a one-way operation. Edited by -Ultima-

[ WinINet.au3 | Array.au3 (Optimized) | _UnixTimeParse() ]

Share this post


Link to post
Share on other sites

Nice, I like this.


Ha, I haven't been on these forums since... 2006, almost. Behold, my legacy signature:My AutoIt idol is Valuater. You know you love him, too.My Stuff: D&D AGoT Tools Suite

Share this post


Link to post
Share on other sites

(And one more note about MD5 -- while it isn't something you decrypt, IINM, finding collisions for MD5 hashes is a trivial matter nowadays, so technically, MD5 is a broken hash algorithm)


[ WinINet.au3 | Array.au3 (Optimized) | _UnixTimeParse() ]

Share this post


Link to post
Share on other sites

Indeed, that's incorrect. MD5 isn't an encryption algorithm in the first place, so there is nothing to decrypt. MD5 is a hash algorithm, and is meant to be a one-way operation.

ah, i see. thank you.

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Share this post


Link to post
Share on other sites

I forgot that i post this :) ,, But anywhy thanks :D


-jaenster

Share this post


Link to post
Share on other sites

Is there a way of decrypting it once it has been crypted? I can see how it crypts it... but How would I make a func to decrypt it?

I must be tired. :)

Share this post


Link to post
Share on other sites

Is there a way of decrypting it once it has been crypted? I can see how it crypts it... but How would I make a func to decrypt it?

I must be tired. :)

You send the encrypted source along with $24.95 to me :D

[center]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.[/center]

Share this post


Link to post
Share on other sites

You send the encrypted source along with $24.95 to me :)

I love your clever answers, Smoke :D

Kurt


Awaiting Diablo III..

Share this post


Link to post
Share on other sites

Is there a way of decrypting it once it has been crypted? I can see how it crypts it... but How would I make a func to decrypt it?

I must be tired. :)

Created a new crypt function for you.

And it works faster.

I also updated the main script

#INCLUDE <STRING.AU3>
$text = "This is my text i want to encrypt"
$password = "This is my secret password "
$Cryped = Crypt($text,$password,0)
consolewrite($Cryped&@crlf)
$Decrypt= crypt($Cryped,$password,1)
consolewrite($Decrypt&@crlf)

func crypt($t,$pw,$type)
    if $type = 1 then $t = _HexToString($t)
    $Terug = ""
    $pwlen=stringlen($password)
    $textlen = stringlen($t)
    dim $text[$textlen+1]
    for $z = 1 to $pwlen
        for $i = 1 to $textlen
            $text[$i] = hex(bitxor(asc(stringmid($t,$i,1)),asc(stringmid($pw,$z,1))),2)
        next
    next
    for $i = 1 to ubound($text)-1
        if $type =1 then $terug &= chr(dec($text[$i]))
        if $type <> 1 then  $terug &= $text[$i]
    next
    return $Terug
endfunc

-jaenster

Share this post


Link to post
Share on other sites

Is there a way of decrypting it once it has been crypted? I can see how it crypts it... but How would I make a func to decrypt it?

I must be tired. :whistle:

Hmm, just came along this topic... Just in case you are haven't been eating or sleeping for the past couple of weeks pondering this question (and to make sure you won't pay Smoke because I need the money more! :P): you don't seem to NEED to make a function for decrypting, because believe it or not but an example how to decrypt it can be found in the 6th line of the code :D

Sorry for this useless post, I must be tired too! :lmao:


Roses are FF0000, violets are 0000FF... All my base are belong to you.

Share this post


Link to post
Share on other sites

aww i was thinking this was a how-to on how to crypt walk

/cry

hehe but just as good though :whistle:

Share this post


Link to post
Share on other sites

Nice code, i'll use it somewhere :whistle:

Thanks!


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  
Followers 0