Re: CALG_RSA_KEYX algorithm?

Thank you for your reply,

I know the RSA algorithm is same everywhere, but as far as I know
there are many encryption methods; for example one treats each byte in
a string as a number, encrypts each one of them seperately and
serializes them as the ciphertext, while the other one converts the
whole plaintext into a big number and encrypts it. There are padding
differences between methods too (PKCS1, OAEP etc.).

I also have my decrypting code ready but I can't make it decrypt data
coming from CryptEncrypt. I use the PHP functions I found here: . Which I think the reason it won't
work is because there are algorithm differences (by algorithm I mean
the 3rd step you mentioned). I might be wrong but I can't seem to find
another reason.


"lelteto" wrote:
CALG_RSA_KEYX is used to encrypt the SESSION Key. So first you will need to
1. select a symmetric algorithm (preferably AES)
2. generate a RANDOM key for it
3. encrypt your message / data with the above algo and key
4. now encrypt your symmetric key (from 2) with the receiving partys public
5. send the result from both 3 AND 4.

At the receiving end you first decrypt the session key with the private key
(data is from 4). This is a NORMAL RSA decryption so you should be able to
use whatever you want on your other platform.
After that you use the recovered session key and the same symmetric algo (1)
to decrypt the data / message.

Laszlo Elteto
SafeNet, Inc.

Relevant Pages

  • Re: Is it possible to encrypt without a key ?
    ... There is an algorithm that encrypts without a key. ... > outputs both ciphertext and the key required to decrypt. ...
  • Re: One time pad -- key distribution -- newbie question/comment
    ... sentences long in english) and encrypts the one time pad with it, ... It's like starting with gibberish, using a block cipher to encrypt ... How can anyone decrypt ...
  • Re: In Search for the Proper Crypto System
    ... You want 'C1' to be able to decrypt 'd' on permission from 'A', ... > text always encrypts to the same ciphertext, then I can just quiz the ... > about, transmitting the plain text would not be practical for the cheater, ... > but publishing a symetric key would be for later download and decryption. ...
  • Re: Attaching conditions to RIPA ?
    ... So if someone encrypts something with the ... without having the means to decrypt it again. ... in a case in which a disclosure requirement in respect of any protected information is imposed on any person by a section 49 notice-. ... that person is incapable, without the use of a key that is not in his possession, of obtaining access to the information and of disclosing it in an intelligible form, or. ...
  • Re: Help with Encryption Library
    ... The minimum text lengh for decryption depends on the algorithm block size ... encrypted data size is less then 8 bytes, ... Secure ASP.NET Applications: Authentication, Authorization, and Secure ... decStream.FlushFinalBlockwhenever the text to Decrypt was under 7 ...