Raised This Month: $51 Target: $400
 12% 

I was told to make a C++ module for crypto functions...


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Anpheus
Senior Member
Join Date: Aug 2004
Old 09-14-2004 , 20:46   I was told to make a C++ module for crypto functions...
Reply With Quote #1

And I'm really, really lost.

Bailophan, your "How to make a module" tells me little more than "Create a file with some stuff in it, and uncomment these lines here if you want these features."

And here I am, with a .cpp file, open, with the GPL, and a few includes.

And NO IDEA what to do.
Anpheus is offline
malex
Junior Member
Join Date: Aug 2004
Old 09-14-2004 , 20:49  
Reply With Quote #2

Look at the way the fun module is done, http://www.amxmodx.org/cgi-bin/viewcvs.cgi/amxmodx/fun/. It is one of the simpler ones I think.

\malex\
malex is offline
Anpheus
Senior Member
Join Date: Aug 2004
Old 09-14-2004 , 20:53  
Reply With Quote #3

I am. You have to realize that I was told to use C++ when I declared my lack of ANY past experience with it.


So... it looks like every variable passed to the NATIVE_CALL thinger is passed under cell *params

Cell being a type decleration, I can understand that, but *params means... undefined array of params[]?


Edit: It's a pointer... A pointer to the cells named params[]?? I'm confused.
Anpheus is offline
BAILOPAN
Join Date: Jan 2004
Old 09-14-2004 , 20:53  
Reply With Quote #4

Fun, GeoIP, Sockets, all very simple modules.

Basically... add amxxmodule.cpp, amxxmodule.h, moduleconfig.h to your project.

Configure your module in moduleconfig.h

Create a new file, like "mymodule.cpp".

Do:
[system includes]
#include <amxxmodule.h>
[other includes]

............................................. ............................
You could even make something like a crypto-module
http://www.eskimo.com/~weidai/cryptlib.v42.html

Actually, not a bad idea, maybe something I can do...
__________________
egg
BAILOPAN is offline
Anpheus
Senior Member
Join Date: Aug 2004
Old 09-14-2004 , 20:57  
Reply With Quote #5

That's what I planned on doing. Please don't steal my thunder :-p
Anpheus is offline
BAILOPAN
Join Date: Jan 2004
Old 09-14-2004 , 21:02  
Reply With Quote #6

hehe, sounds like a cool plan then
__________________
egg
BAILOPAN is offline
Anpheus
Senior Member
Join Date: Aug 2004
Old 09-14-2004 , 21:10  
Reply With Quote #7

Yeah, this CryptLib implementation is either incomplete (I see mixcolumns transformation, that's it), which is doubtful, or it's got just a HUGE AMOUNT of base functions all in the same file that I have opened yet. In which case, it kind of removes the point of it in that it is a series of classes that can operate independently.



So the type declarations that use <type> *<varname> are by-reference?
Anpheus is offline
BAILOPAN
Join Date: Jan 2004
Old 09-14-2004 , 21:13  
Reply With Quote #8

http://www.homeport.org/~adam/crypto/crypto++.phtml
looks newer...
__________________
egg
BAILOPAN is offline
Anpheus
Senior Member
Join Date: Aug 2004
Old 09-14-2004 , 21:15  
Reply With Quote #9

It'd probably be better for me to learn by writing my own implementation.

And I'm looking at the files, and again, it doesnt make sense to me right now.

It literally looks like the only transformation in the entire function is the MixColumns transformation. Which... can't be.
Anpheus is offline
BAILOPAN
Join Date: Jan 2004
Old 09-14-2004 , 21:24  
Reply With Quote #10

I dunno what you downloaded, but the zip I got had a ton of stuff in it.

IMO, It's a waste of time to reimplement what's been done a thousand times before... code re-use == teh win

You're not even learning anything by implementing crypto because 100% of the time you didn't write the cryptographic routines yourself.

I would google around for a nice set of utilities, because host applications never write their own in-house crypto, they always use code from other libraries
__________________
egg
BAILOPAN is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:36.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode