How can i encrypt MD5 hash with a private key ?
-
I have have a buffer with a check sum which I want to encrypt with the private key in a PKCS#12 certificate using the RSA public-key algorithm with a 1024-bit key lengthis used. I have tried using CryptoAPI in the following sequence: 1. CryptAcquireCertificatePrivateKey - returns HCRIPTPROV 2. CryptGetUserKey - using the returned HCRIPTPROV returns HCRYPTKEY 3. CryptEncrypt - saying 'Bad key' when used the returned from 2 HCRYPTKEY. Also I cannot understant where should be the password for the private key passed. :confused: I'll be gratefull if somenone has an idea how to do that
-
I have have a buffer with a check sum which I want to encrypt with the private key in a PKCS#12 certificate using the RSA public-key algorithm with a 1024-bit key lengthis used. I have tried using CryptoAPI in the following sequence: 1. CryptAcquireCertificatePrivateKey - returns HCRIPTPROV 2. CryptGetUserKey - using the returned HCRIPTPROV returns HCRYPTKEY 3. CryptEncrypt - saying 'Bad key' when used the returned from 2 HCRYPTKEY. Also I cannot understant where should be the password for the private key passed. :confused: I'll be gratefull if somenone has an idea how to do that
see MD5 is a HASH not public/private encryption/decryption algorithm. it is designed in the way to create hash from input answer. i don't have any private key. shoot me down if i am wrong.. anyway read more about it here http://en.wikipedia.org/wiki/MD5[^]
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
Never mind - my own stupidity is the source of every "problem" - Mixturecheers, Alok Gupta VC Forum Q&A :- I/IV Support CRY- Child Relief and You
-
see MD5 is a HASH not public/private encryption/decryption algorithm. it is designed in the way to create hash from input answer. i don't have any private key. shoot me down if i am wrong.. anyway read more about it here http://en.wikipedia.org/wiki/MD5[^]
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
Never mind - my own stupidity is the source of every "problem" - Mixturecheers, Alok Gupta VC Forum Q&A :- I/IV Support CRY- Child Relief and You
-
What makes you think that I assume MD5 is an enyption/decryption algorythm? What I wand is to encrypt the checksum of some content hashed using MD5 algorythm. I don't want to encrypt raw data using MD5 algorythm.
it seems i am getting old day by day :-) .. anyways go this link RSA encryption/decryption[^]
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
Never mind - my own stupidity is the source of every "problem" - Mixturecheers, Alok Gupta VC Forum Q&A :- I/IV Support CRY- Child Relief and You