Jump to content

how to use RSA with Crypt.au3 ( or anything else )


Recommended Posts

so there is this post "Holographic Encryption with DARTIS" and the RSA came up.
There is  _RSA_crypt.7z  from autoit-script.ru but the file is not available ( if anyone has the file, please get me a working link ) , so I don't know what or how it was done.
My idea is to do the public key / private key (RSA) to exchange the hash/password ( call it what you will ), then, carry the rest of the communication with $CALG_AES_256 or the like. So it'd be doing a hybrid TCP/IP SSL, let's call it TCL 2.5 :P 
Anyhow, I need help for the simple reason that I'm quite clueless.
CryptoAPI Cryptographic Service Providers may have a clue via the CryptoAPI ( but to me is all just words ).
CryptEncrypt function say that: 

The Microsoft Enhanced Cryptographic Provider supports direct encryption with RSA public keys and decryption with RSA private keys. The encryption uses PKCS #1 padding. On decryption, this padding is verified. The length of plaintext data that can be encrypted with a call to CryptEncrypt with an RSA key is the length of the key modulus minus eleven bytes. The eleven bytes is the chosen minimum for PKCS #1 padding. The ciphertext is returned in little-endian format.

so it should be possible from server 2003 / XP onwards.

Thank you all who dare to go at it :) 

Edited by argumentum

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

Link to comment
Share on other sites

note that Crypto API is being replaced by Cryptography API: Next Generation (CNG). at this time it has by far less documentation, which means it's a lot easier to learn... ;)

the list of CNG Cryptographic Algorithm Providers lists RSA in the "Asymmetric Algorithms" section.

sorry that i cannot assist any further, but if i needed RSA in AutoIt that's where i would begin my quest.

Signature - my forum contributions:

Spoiler

UDF:

LFN - support for long file names (over 260 characters)

InputImpose - impose valid characters in an input control

TimeConvert - convert UTC to/from local time and/or reformat the string representation

AMF - accept multiple files from Windows Explorer context menu

DateDuration -  literal description of the difference between given dates

Apps:

Touch - set the "modified" timestamp of a file to current time

Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes

SPDiff - Single-Pane Text Diff

 

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

×
×
  • Create New...