CryptoAPI and private key /not public/ encryption with CryptEncrypt - can not use CryptHash* functions
From: Przemek Wasylko (wasylek_at_remove-me.megapolis.pl)
Date: 12/26/04
- Previous message: Ivan Brugiolo [MSFT]: "Re: Enumerating the current user's privileges (GetTokenInformation API"
- Next in thread: Valery Pryamikov: "Re: CryptoAPI and private key /not public/ encryption with CryptEncrypt - can not use CryptHash* functions"
- Reply: Valery Pryamikov: "Re: CryptoAPI and private key /not public/ encryption with CryptEncrypt - can not use CryptHash* functions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Sun, 26 Dec 2004 15:08:00 +0100
Hello All :)
I have 3rd party library that supplies me with calculated by itself hash of
some data (so I can not use CryptHashData, etc). I don't know hash method,
I'm only supposed to encrypt that hash using private key in order to create
digital signature. I have SmartCard CSP with public/private keypair stored
on it. I would like to encrypt that SHA1 hash, but using private key not the
public one (in order to have another party validate signature by using
public key provided by me - i can extract public key from smartcard ). But
unfortunatelly I have found no obvious way to do that by using CryptoAPI,
maybe I am missing something. MSDN and other sources force me to use
CryptCreateHash/CryptHashData/CryptSignHash, but, as I mentioned before, I
can't do that (my code does not calculate hash). I would like to use
CryptEncrypt with private key and CryptDecrypt with public key. Is there
solution to my problem ?
Best regards
Przemek Wasylko
- Previous message: Ivan Brugiolo [MSFT]: "Re: Enumerating the current user's privileges (GetTokenInformation API"
- Next in thread: Valery Pryamikov: "Re: CryptoAPI and private key /not public/ encryption with CryptEncrypt - can not use CryptHash* functions"
- Reply: Valery Pryamikov: "Re: CryptoAPI and private key /not public/ encryption with CryptEncrypt - can not use CryptHash* functions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|