views:

162

answers:

2

I can't find any help to implement PROV_RSA_AES CSP in c++. is there any article or book to help me out with it?

A: 

Here is an article about it.
Here is another one.

Sani Huttunen
i can't find the first part of this article.
Dave_19
the other one uses PROV_RSA_FULL.
Dave_19
You should be able to figure out the rest with those two articles.
Sani Huttunen
i'll give it a go.
Dave_19
A: 

i just want to use one, i figured how to get context but i'm still thinking about the size of buffer i need to use for CryptEncrypt() to get it working with aes256 ? i also want to use random salt.

AES256 in CBC-mode with PKCS#7-padding (which is the default) will need a buffersize that is the input-data rounded up to the next multiple of 16 (but always at least one byte more). Ie. 35 -> 48, 52 -> 64, 80 -> 96.

There is no salt involved in AES256. Are you talking about key-derivation? Or do you mean the IV?

Rasmus Faber