Jump to content
Tuts 4 You

Basic encryption techniques


Busted

Recommended Posts

Posted

Hi all,

I am searching for some basic encryption techniques that I could implement into my Masm code, for example I want to encrypt a primary number that my serial is calculated off.

Cheers Busted

Posted (edited)

Can you define the following please? 'basic' & 'encryption'

The following should work as a simple string obfuscation although it is about as safe as a gerbil at a mardi gras after-party. It does fit the bill of 'basic' and 'encryption' though. If you are interested in some real encryption though you could check out Drizz's crypto/hash library where there is a few lgorithms to choose from or you could even mix and match them to make something.

EncryptString PROC uses esi lpDecryptedString:DWORD,lpEncryptedString:DWORD  mov esi,lpDecryptedString
mov edi,lpEncryptedString xor ecx,ecx
jmp @f .repeat
rol al,cl
xor al,0DCh
stosb
add ecx,1
@@:
movzx eax,byte ptr [esi+ecx]
.until !eax
retEncryptString ENDPDecryptString PROC uses esi lpEncryptedString:DWORD, lpDecryptedString:DWORD mov esi,lpEncryptedString
mov edi,lpDecryptedString xor ecx,ecx
jmp @f .repeat
xor al,0DCh
ror al,cl
stosb
add ecx,1
@@:
movzx eax,byte ptr [esi+ecx]
.until !eax
retDecryptString ENDP

HR,

Ghandi

Edited by ghandi
Posted

Drizz's crypto/hash library dont work for me i see many many errors on this hash library.

I download this stdlib is one of Drizz's projects listed under software engineering.

stdlib is a collection of "standard" MASM functions for text, file management etc.

Found on this tread http://forum.tuts4you.com/index.php?showtopic=10116

error.bmp

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
×
×
  • Create New...