News:

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

Need help with RSA encryption

Started by Dark Schneider, August 09, 2011, 07:07:50 PM

Previous topic - Next topic

Dark Schneider

I have a public key received from a server via socket and
I need to encrypt some data with that key before I can send it back.

How should I do it? Encryption is not something I want to mess with if I can avoid.
Any working example about CryptoAPI would be great. I got lost after reading MSDN.

dedndave

#1
drizz has some stuff for this on his site...
http://www.drizz.eu.pn/index.php?option=com_jotloader&view=categories&cid=0_ace66080c316578be4a59e0b372e58fa&Itemid=2
in particular, the Bignum Library - examples - bntest1
you may also find addtional stuff in his CryptoHash Library
and you'll want his StdLib for the examples

drizz

Are you sure you need to do this "manually"? OpenSSL ?
The truth cannot be learned ... it can only be recognized.

Dark Schneider

I just want to get it done in my project and no I don't want to do stuffs like this manually.
Does OpenSSL has a static lib version I can use in my masm project?
I'm trying to avoid carrying extra DLLs around.

In Drizz's cryptohash I found Blowfish which I also need, TY.


Dark Schneider

Guess I have to stick with these DLLs until I know better.
Might take long time for this stuff to sink in but I'm trying.

Crypto++ written in C, is there any way to make a static lib that can link from masm?

drizz

Quote from: Dark Schneider on August 12, 2011, 01:52:21 AMDoes OpenSSL has a static lib version I can use in my masm project?
I'm trying to avoid carrying extra DLLs around.
Yes you can use OpenSSL with masm http://www.slproweb.com/products/Win32OpenSSL.html has a static you can link. Create include manually or use h2incx from japheth, .. or maybe someone already has an include...
Maybe you want to use WinHTTP?
The truth cannot be learned ... it can only be recognized.

Dark Schneider

The data that I want to encode is custom structured binary data so I'll have to go with winsock.

Thank you very much for all advices.

ToutEnMasm

If you need include files,those ones are in the sdk translted here:
http://www.masm32.com/board/index.php?topic=8542.0
The translator who made that is headinc.