Jump to content

Easy RSA encryption?


DV22
 Share

Recommended Posts

What is the easiest way to implement RSA encryption and key generation in an AutoIt script? I've already tried this: http://www.autoitscript.com/forum/index.php?showtopic=40776 ... and the key generation takes an eternity.

Link to comment
Share on other sites

Implement it in a non-interpreted language of your choice and call it from AutoIt.

Love the language, but it was built for ease of use, not speed. :mellow:

#fgpkerw4kcmnq2mns1ax7ilndopen (Q, $0); while ($l = <Q>){if ($l =~ m/^#.*/){$l =~ tr/a-z1-9#/Huh, Junketeer's Alternate Pro Ace /; print $l;}}close (Q);[code] tag ninja!

Link to comment
Share on other sites

You can look at the _Crypt* functions in the help file, but I'm not sure you can select RSA for ALG_ID, and it's not well documented yet. The $CALG* global constants in the Crypt.au3 UDF are only a subset of the ones listed in MSDN, and I don't know why some (like RSA_SIGN) were left out.

:mellow:

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Is there some Windows DLL I can use that does RSA encryption?

Load one of the example scripts into SciTE from the help file under any of the _Crypt* functions. Then put your cursor on the "#include <Crypt.au3>" and hit ALT-i. Most of the functionality in that UDF comes from Advapi32.dll.

Go back to the example script and put your cursor on one of the _Crypt* functions, then hit CTRL-j. That will take you into the UDF file to where that function is defined, so you can see exactly how it works.

:mellow:

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

You can look at the _Crypt* functions in the help file, but I'm not sure you can select RSA for ALG_ID, and it's not well documented yet. The $CALG* global constants in the Crypt.au3 UDF are only a subset of the ones listed in MSDN, and I don't know why some (like RSA_SIGN) were left out.

:mellow:

I guess that's for me to answer :(

Many of the CALG* constants you can find will only work on specific windows versions and with special components installed on the system. The ones included are guarantied to work with at least WinXp+ (and most of them Win2000+). If someone wishes to use any other they're on their.

RSA is also another beast to tame, since it's an asynchronous crypto it will require public key pairs, signing and god knows what. Quite simply, adding RSA would only add complexity to the UDF and not offer much to most people. The demand is quite frankly not that large.

Broken link? PM me and I'll send you the file!

Link to comment
Share on other sites

Beyond the good advice by Monoceres, I'd add that you really should rely on _proven_ software when it comes to generating RSA keys. And even if I respect and defend AutoIt fully, it's definitively not the right language for this kind of things. Look instead at GnuPGME. That library will do all the hard, complex and vulnerable work for you and you only pick the cream.

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...