Jump to content
Tuts 4 You

Ciphers In (m)asm


Soul

Recommended Posts

Posted (edited)

Hi people ,

I wrote a few ciphers in (M)ASM , these are:GRAIN,ICE,KASUMI,MERCY,MESH,PLAYFAIR.My request:can anybody test it on his OS ? I have tested it on W2k but maybe it would not work on other OS. :)

Edit:

Ok , i dropped the ripped ciphers out and I will revise them.

Edit2:

-revised version of KASUMI

-new cipher: Camellia

Edit3:

-new cipher: FROG

Edited by Soul
Posted (edited)

KeyInitialization proc cache:DWORD,szKey:DWORD,szKeylength:DWORD,szIVlength:DWORD

ADD ESP,4

MOV EAX,DWORD PTR SS:[ESP+4h]

MOV ECX,DWORD PTR SS:[ESP+8h]

MOV EDX,DWORD PTR SS:[ESP+0Ch]

MOV DWORD PTR DS:[EAX+280h],ECX

MOV ECX,DWORD PTR SS:[ESP+10h]

MOV DWORD PTR DS:[EAX+284h],EDX

MOV DWORD PTR DS:[EAX+288h],ECX

LEAVE

RETN

KeyInitialization ENDP

pretty bad coding m8, u sure u know what you're doing...?

firstly its a proc that takes params.. so it should end in a ret, considering it has an ebp frame

leave isnt needed either.. and the add esp,4 at the top makes no sense what so ever

should be like...

KeyInitialization proc cache:DWORD,szKey:DWORD,szKeylength:DWORD,szIVlength:DWORD

MOV EAX, [cache]

MOV ECX, [szKey]

MOV EDX, [szKeylength]

MOV DWORD PTR DS:[EAX+280h],ECX

MOV ECX,DWORD PTR SS:[szIVlength]

MOV DWORD PTR DS:[EAX+284h],EDX

MOV DWORD PTR DS:[EAX+288h],ECX

RET

KeyInitialization ENDP

looks better.. no?

Edited by evlncrn8
Posted

Suggests to me that its ripped from some other app? Perhaps CrypTool?

Did you code these or are they pulled from somewhere else?

Posted (edited)

He gives the info himself:

Ripped from C-Source

Regards,

Soul

Tho it's more like from C assembly than from source.

Yes I think it could (should) be cleaned a bit more.

More than ever, if routines are short. Often it's not hard to even optimize em then.

Nevertheless thanks for the efforts :)

Hard to find sources for uncommon crypt n hash ****..

Edited by Ufo-Pu55y
Posted (edited)
pretty bad coding m8, u sure u know what you're doing...?
He gives the info himself:

QUOTE

Ripped from C-Source

Regards,

Soul

Thx :)

Yeah it's correct , 3 of the sources are 100% ripped (KASUMI,MERCY,GRAIN) , the other (ICE,MESH,PLAYFAIR) are made by me himself.But thanks for response. ^^

Edited by Soul
Posted (edited)

ripped pretty damned badly... nice idea, but i'd seriously revise the code to show you actually have an understanding of the ciphers / cypher (depending on your personal spelling preference) and havent just kludged this together to look leet.. the ripping of c->asm can be done considerably better... out of curiousity, what program did you use to do the ripping?

Edited by evlncrn8
Posted (edited)
ripped pretty damned badly... nice idea, but i'd seriously revise the code to show you actually have an understanding of the ciphers / cypher (depending on your personal spelling preference) and havent just kludged this together to look leet.. the ripping of c->asm can be done considerably better... out of curiousity, what program did you use to do the ripping?

Well , you said it , it was a idea and 3 of them are ripped only.I used OllyDbg ;) nothing more.But if you wish , you can make it better ;)

Edited by Soul

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...