flat assembler
Message board for the users of flat assembler.

Index > Main > DES/3DES in assembly

Author
Thread Post new topic Reply to topic
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8359
Location: Kraków, Poland
Tomasz Grysztar 25 Jul 2006, 15:02
Has anyone tried implementing DES/3DES in assembly? I need one, and was going to do it myself, but just thought it would be good to check if someone got it already.
Post 25 Jul 2006, 15:02
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 25 Jul 2006, 15:18
boss says DES is not safe anymore... and that you should use AES
Post 25 Jul 2006, 15:18
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8359
Location: Kraków, Poland
Tomasz Grysztar 25 Jul 2006, 15:50
Not that I have choice. Wink
It's for SmartCards, BTW.

PS. As for AES/Rijandel, we've got it already on the board somewhere...
Post 25 Jul 2006, 15:50
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 25 Jul 2006, 16:06
ummm, some HW-close smartcard driver coding? mmmmmmm....

Wink
Post 25 Jul 2006, 16:06
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3175
Location: Denmark
f0dder 25 Jul 2006, 16:12
Tomasz, try looking for "john the ripper", a unix password cracker... it has some DES routines that should be very optimized, or so it's said.
Post 25 Jul 2006, 16:12
View user's profile Send private message Visit poster's website Reply with quote
Reverend



Joined: 24 Aug 2004
Posts: 408
Location: Poland
Reverend 25 Jul 2006, 18:55
There are lots of crypto implementations on Witeg's site. All are in masm, but written very, very well and thus easy to make fasm-compilable. There's no DES/3DES, but I found:
Quote:
NewDES (SRC) 2.82 KB NewDES algo (anything like a new version of DES... and weaker than DES)
Post 25 Jul 2006, 18:55
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8359
Location: Kraków, Poland
Tomasz Grysztar 26 Jul 2006, 00:03
I found some here, but it's GAS syntax, which is strange enough that I finally done it myself. Wink
It's far from being optimized but at least it appears to be working, and that's enough for me right now.

I'm attaching it here in case of someone else searching for such solution. Note: the provided functions encode/decode just 64-bit blocks given in EDX:EAX. But it should easy to put them in a loop (combined with XOR operation for CBC) to make larger encodings.


Description: DES/3DES routines in fasm, 32-bit, with Win32 demonstration skeleton.
Download
Filename: des.asm
Filesize: 16.41 KB
Downloaded: 621 Time(s)

Post 26 Jul 2006, 00:03
View user's profile Send private message Visit poster's website Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3175
Location: Denmark
f0dder 26 Jul 2006, 08:09
When you get the need for speed, google for "DES bitslice", and perhaps add MMX or DES to the party too Smile
Post 26 Jul 2006, 08:09
View user's profile Send private message Visit poster's website Reply with quote
Ivan2k2



Joined: 08 Sep 2004
Posts: 80
Location: Russia, Angarsk
Ivan2k2 26 Jul 2006, 08:56
try this DES, it's masm syntax


Description:
Download
Filename: des.zip
Filesize: 5.05 KB
Downloaded: 535 Time(s)

Post 26 Jul 2006, 08:56
View user's profile Send private message ICQ Number Reply with quote
Ivan2k2



Joined: 08 Sep 2004
Posts: 80
Location: Russia, Angarsk
Ivan2k2 26 Jul 2006, 14:14
Post 26 Jul 2006, 14:14
View user's profile Send private message ICQ Number Reply with quote
Vasilev Vjacheslav



Joined: 11 Aug 2004
Posts: 392
Vasilev Vjacheslav 27 Jul 2006, 05:37
check this ftp's for crypto-information and ready algorithms in c++/c:
ftp.funet.fi
ftp.zedz.net


Description: drizz implementation
Download
Filename: mmx_des.zip
Filesize: 49.01 KB
Downloaded: 496 Time(s)

Description: x3chun implementation
Download
Filename: desx.zip
Filesize: 4.16 KB
Downloaded: 511 Time(s)

Description: x3chun implementation
Download
Filename: des.zip
Filesize: 5.74 KB
Downloaded: 489 Time(s)


_________________
[not enough memory]
Post 27 Jul 2006, 05:37
View user's profile Send private message Reply with quote
Vasilev Vjacheslav



Joined: 11 Aug 2004
Posts: 392
Vasilev Vjacheslav 27 Jul 2006, 05:39
and another


Description: witeg implementation
Download
Filename: newdes2.zip
Filesize: 2.82 KB
Downloaded: 494 Time(s)

Description: x3chun implementation
Download
Filename: newdes1.zip
Filesize: 1.52 KB
Downloaded: 484 Time(s)


_________________
[not enough memory]
Post 27 Jul 2006, 05:39
View user's profile Send private message Reply with quote
weiss



Joined: 03 Jan 2006
Posts: 25
weiss 02 Aug 2006, 09:37
Post 02 Aug 2006, 09:37
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.