Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to decrypt encrypted PVK file ?

508 views
Skip to first unread message

Michael Leung

unread,
Sep 23, 2004, 10:28:11 PM9/23/04
to
Hello,

I would like to decrypt an encrypted PVK file. I would like to get it
into unencrypted PRIVATEKEYBLOB format so that I can CryptImportKey() it
into a key container.

I am not sure how to use CryptoAPI to achieve this.
Do I have to write my own encryption and hashing algorithms to do this ?

Appreciate your help.

Many thanks,
Michael.

Daniel Sie [MSFT]

unread,
Sep 24, 2004, 12:10:19 AM9/24/04
to
Do you have the SPC file associated with this key?

--
Thanks,

Daniel Sie [MSFT]

This posting is provided "AS IS" with no warranties, and confers no rights.
"Michael Leung" <mmhl...@hotmail.com> wrote in message
news:eIsMj4do...@tk2msftngp13.phx.gbl...

Michael Leung

unread,
Sep 24, 2004, 12:47:06 AM9/24/04
to
Yes, I have a SPC file with several digital certificates in it.
What do I do next ?

Many thanks,
Michael.

Daniel Sie [MSFT]

unread,
Sep 24, 2004, 1:07:31 AM9/24/04
to
Use the PvkImprt.exe utility to import the cert and key into PFX. Now using
all public APIs, such as PFXImportCertStore,
CryptAcquireCertificatePrivateKey(), and CryptExportKey(), you should be
able to dump the key.

--
Thanks,

Daniel Sie [MSFT]

This posting is provided "AS IS" with no warranties, and confers no rights.
"Michael Leung" <mmhl...@hotmail.com> wrote in message

news:uPI1LGfo...@TK2MSFTNGP12.phx.gbl...

Michael Leung

unread,
Sep 24, 2004, 1:42:33 AM9/24/04
to
Is there a way to get around the PvkImprt step ?
Is it possible to do what PvkImprt do in code, using CryptoAPI ?

I would like to automate the signing process in code.

Thanks to your replies,

Pieter Philippaerts

unread,
Sep 26, 2004, 4:46:09 PM9/26/04
to
"Michael Leung" <mmhl...@hotmail.com> wrote in message
> Is it possible to do what PvkImprt do in code, using CryptoAPI ?

You can manually decode the PVK file; the file structure is documented
(unofficially) here: http://www.drh-consultancy.demon.co.uk/pvk.html

Regards,
Pieter Philippaerts


mahalak...@gmail.com

unread,
Mar 11, 2020, 9:09:02 AM3/11/20
to
Hi Michael,

I am getting error when trying to use CryptImportKey on a Encrypted PVK file. Can you suggest.

Regards
Maha

mahalak...@gmail.com

unread,
Mar 11, 2020, 9:10:43 AM3/11/20
to
Hi Pieter,

The link you provided is not valid, can you provide latest link. on how to import key from a pvk file and to sign data
Regards
Maha
0 new messages