Does anyone know adress for ASM implementation of DES ? I have found this ones but when I try

mypass db "password",0
szName      db 32h dup(?)
output      db 1000 dup(?)
invoke	GetDlgItemText, _hWin, EDIT_NAME, ADDR szName, 32h
invoke   des_encrypt addr mypass addr szName,eax,addr output
program crashes. DESencrypt DESdecrypt Any help will be appreciated.
Posted on 2001-05-18 13:05:00 by LaptoniC
In the des-enc.asm file, there is the line: "mov ebx, " You push eax onto the stack, and eax is a number between 0-31. You are trying to access a memory location that you shouldn't. You need to change your code to the following:

mypass      db "password",0
szName      db 32h dup(?)
output      db 1000 dup(?)
length      dd ?

invoke   GetDlgItemText, _hWin, EDIT_NAME, ADDR szName, 32h
mov      length, eax
invoke   des_encrypt, addr mypass, addr szName, addr length, addr output
Either that, or change the des-enc.asm so it uses len directly, rather than as a pointer. Mirno
Posted on 2001-05-18 13:14:00 by Mirno
I have tried but code dies at this location

sub_4A6F38	proc near	
shr	ebx, 3
movzx	eax, byte ptr  ;Here access violation
and	esi, eax
jbe	short loc_4A6F5B
Thanks for the reply
Posted on 2001-05-19 06:42:00 by LaptoniC
I'm not a pro at this but I believe you can't do this: mov eax,byte ptr ;eax on both sides Try using another register for this: mov edx,byte ptr
Posted on 2001-05-19 08:29:00 by JimmyClif
Now, I've been messing around with linux for the past FOO hours, and my head is starting to spin around, and stuff. But using EAX on both sides shouldn't be any problem. But as I have been messing with linux for so long, I might be wrong :]. I'd try to boost the buffer sizes (a lot) and see if that doesn't help. "A friend of the devil is a friend of mine" - that's PIG, isn't it? :)
Posted on 2001-05-20 17:17:00 by f0dder
I dont know about the exception in the encryption routine, but you can use eax on both sides. There are some encyption routines (Square, Des...) that could easily to converted to pure assembly as they are written in inline c/asm.
Posted on 2001-05-21 03:40:00 by George
Good to know that you can.. oh well.. /me shruggs.
...that's PIG, isn't it?
huh? ;)
Posted on 2001-05-21 04:09:00 by JimmyClif
Anyway, why do you want to use DES? Unless you have to use it for some existing data, or to interface with something that requires DES, I'd suggest you to use something different, like blowfish or twofish or IDEA. DES is slower and more unsafe than the other algorithms. JimmyClif: where does the "a friend of the devil is a friend of mine" originate from? Pig (excellent music :D) uses the quote in one of his songs,
Posted on 2001-05-21 06:30:00 by f0dder
f0dder, This is from Grateful Dead.. I'm sorry but I didn't take your question serious at first *hehehe* as it's probably one of their most famous songs ;P (and I never heard of PIG either before) *g* Homepage: Lyrics:
Posted on 2001-05-21 07:06:00 by JimmyClif
I know that Blowfish or twofish ismore secure than DES or make MD5 has then blowfish.However I just need to encrypt with DES I have MD5 and Blowfish asm implementation but not DES.I have found couple of DES implementation in C but I cant convert it :(
Posted on 2001-05-21 10:55:00 by LaptoniC
Please LaptoniC, can you send me your Blowfish and MD5 asm implementation please (at least blowfish ^^) ? I would really appreciate it... :) Thanks in advance. Happy coding. This message was edited by Readiosys, on 5/21/2001 12:13:59 PM
Posted on 2001-05-21 12:09:00 by Readiosys
MD5 algo is on Iczelion's site already.For blowfish check out Egoiste's Website. Although his nick is egoiste his sources are awesome :)
Posted on 2001-05-21 20:42:00 by LaptoniC
Ok, i already knew these sources... i just thought it was an other implementation... :) Anyway... thanks a lot :).
Posted on 2001-05-22 16:58:00 by Readiosys