News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

anyone attempt writing RSA in asm?

Started by ecube, February 21, 2009, 02:42:09 AM

Previous topic - Next topic

ecube

the big number stuff looks really confusing. I wanted a RSA code in a simple static lib that I could call but I can't even find any clean c/c++ rsa implementations that aren't insanley large or overly complex. wish witeg would write something, he's the MASM encryption guru, implemented just about all other encryption algs.

donkey

By RSA are you talking about RC6 ? It's patented so you can't use it without a royalty arrangement. I wrote an implementation while it was still being considered for AES but dumped it for Rijndael, free and no license/patent problems. I did exchange a few emails with RSA about using the algorithm but they just stopped responding after I told them I didn't want to pay for it. Pretty sure it's a violation of their patent rights to even post the code now, I posted the Rijndael code in the forum somewhere, in GoAsm format ofcourse ;)
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

ecube

no rsa, http://en.wikipedia.org/wiki/RSA the magic that makes ssl etc.. actually secure, private/public key genius.

donkey

I think Tola wrote one years ago, you would have to search for it at WinAsm.
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

ecube

Thanks but I highly doubt that, tola was asking for rc6 code which I provided to him year or two ago and RSA is a *lot more complex than rc6.


*update
checked the forum and didn't see anything

donkey

"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

ecube

yeah that's rc6 not rsa, think you're still confused about the two.

donkey

Quote from: E^cube on February 21, 2009, 06:32:39 AM
yeah that's rc6 not rsa, think you're still confused about the two.

Actually I'm not at all confused, just showing a post nearly 4 years old with Tola's implementation of RC6 in TASM. For RSA, I couldn't find any implementations in ASM though I am pretty sure WiteG has one, I will email him and asked if he's got one kicking around.
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

drizz

You can try my bignum library and see if that suits you. There is also a crypt/hash library that i've written.
The truth cannot be learned ... it can only be recognized.

ecube

thanks drizz I have all those algs implemented thanks to witeg and others, I was hoping you had a RSA one, i've been looking for usable rsa code for years. I admittedly aren't smart enough to implement it myself unfortunately.

drizz

:eek

Did you even look at the asm example? (bntest1.Asm)
I made the library mainly for RSA.
The truth cannot be learned ... it can only be recognized.

ecube

nice :) didn't see that, what block size is the RSA implementation?

drizz

Any block size.
invoke bnInit, Max number of bits

There is no "CalculateRSAforME" function, you must calculate it by formula.
Must i point you to your own post link http://en.wikipedia.org/wiki/RSA
The truth cannot be learned ... it can only be recognized.

ecube

is this standard compliant? will  it be compadible with another stand compliant implementation of the same size? either way great work, codes beautiful, and honestly I can believe this is real yet, like I said a usable RSA implementation has been a many year quest. If it's real...wow.

drizz

Quote from: E^cube on February 21, 2009, 11:53:24 AMis this standard compliant? will  it be compadible with another stand compliant implementation of the same size?
It's math, i have never heard of math being non compliant. There is only data interpretation that might be different "big endian" / "little endian", thats why i have bnFromBytes & bnFromBytesEx, one reads the data without Bswap-ing and the other bswaps data.
The truth cannot be learned ... it can only be recognized.