Zip Component, Email Component, Encryption Component ActiveX Control for Zip Compression .NET Components for ASP.NET
ActiveX and .NET Components for Zip Compression, Encryption, Email, XML, S/MIME, HTML Email, Character Encoding, Digital Certificates, FTP, and more ASP Email ActiveX Component


Index of Chilkat Blog Posts

November 1, 2007

Convert .key File to .pvk Private Key File

This blog post describes how to convert a .key file (encrypted PEM) format into a .pvk which can be used the Chilkat PrivateKey class (or CkPrivateKey).

The .key file is a text file, and if you open it in a text editor, you’ll see something like this:

-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: DES-CBC,AF79F04F0F24239B
	
lrPuO3GAUVfo0+Mx9a2Btjqr+VkOiOGbks/QgYo2mrE9GX/YOzLhemTQPMVF2gd8
C20PJVuFLjDgocHit6cGRvFlwRGbRbxaCbq6zifrgzAfBa9CRbj1awaiHjFfNe/4
TrJCrO3tP3XMaKvYsYH9B1wHEPzNvAMcyag5rF5t6SfLVqFikhhzapfYBEx+YqoK
jGAIMlZSiXtByB9vJHUHY4pAvPU2YFQpfG8UaS7cvLGJne8fVT4I7IBEbY0SIPiL
njSsHiTnJ1xz+oWn0lpTpC46/Dk6mqxJDnDryYAvGAiXTrusdM3hHBOc/muUwQkC
6n1ZV6kClTf4bgwHndY+gzMhyc3Xgocgx4r4tuGVBM3LnFDVM0pnpJi19OZteUTz
TDagJn21J/bPlOKVuBRzhQlDF7Tcg08AlXHQ5Pul7l78dT/oOstAludAkkbT5fvV
c1vqCE2XdyLR54CjPLtMw75B0wDYMrlp8/AxlQB3fOlHsICuVhp9oZsCUl9/CsQi
uuWGF/EVstbu2TvRuvbKP9ABDk3I4UxBEYXzXZ/zAHlcXoHZWdez4pwg/jJPJ0E3
jWBgEJjDOinx1Q4cJn/FVCUffWNHvUsEvr5YmpCGy5uOadcAAdg8oVdUtsAFs2wS
dvYvXWnDXKCM83HyAVtkWgm/FEtId+1Rh6zBx6QWDTNZ4ZKZBWlP+LmXAF1pLhVv
u3wgrHu4PncONVQgIHDUGBDHLzje/H4QI80V8dMdA97Mj0+XlNQ/hKy+20YD0vV8
1pLyXN1HJUheQJWPQEyb3VOuaLIxza+1cWCRSIBCNfYXjvVIBMFLeQ==
-----END RSA PRIVATE KEY-----

(The .key file is the type of file generated by WS_FTP.)

There is a "pvktool" at http://www.drh-consultancy.demon.co.uk/pvk.html
that can be used to convert from a .key to .pvk.

Run pvk with these options to convert:

pvk -in Test.key -strong -topvk -out Test.pvk

The tool will prompt for both input and output passwords.

Now that you have a .pvk, it may be loaded into the Chilkat PrivateKey class:

ASP: PVK to XML
SQL Server: PVK to XML
C#: PVK to XML
C++: PVK to XML
Delphi: PVK to XML
Visual FoxPro: PVK to XML
Java: PVK to XML
Perl: PVK to XML
Python: PVK to XML
Ruby: PVK to XML
VB.NET: PVK to XML
Visual Basic: PVK to XML
VBScript: PVK to XML


Privacy Statement. Copyright 2000-2011 Chilkat Software, Inc. All rights reserved.
Send feedback to support@chilkatsoft.com

Components for Microsoft Windows XP, 2000, 2003 Server, Vista, Windows 7, and Windows 95/98/NT4.