English 中文(简体)
How can I decrypt encrypted files using a PEM private key?
原标题:
  • 时间:2010-03-25 10:38:29
  •  标签:
  • perl
  • pki
  • pem

I have files which have either been encrypted with a public key and the Blowfish algorithm, or a public key and the AES-256 algorithm.

I m looking to put together a Perl script that would be able to use the private keys (which I do have) to decrypt the files.

The public and private key files are all in PEM format, and while I can find ways of reading the PEM files, and ways of decrypting data with a key, I haven t yet found a way of going from PEM -> key.

Any suggestions?

问题回答

Isn t PEM just a base64 encoding (wrapped in --- BEGIN/END CERTIFICATE --- lines)? Try the Mime::Base64 module, or have a look at the source to the Convert::PEM module.





相关问题
Why does my chdir to a filehandle not work in Perl?

When I try a "chdir" with a filehandle as argument, "chdir" returns 0 and a pwd returns still the same directory. Should that be so? I tried this, because in the documentation to chdir I found: "...

How do I use GetOptions to get the default argument?

I ve read the doc for GetOptions but I can t seem to find what I need... (maybe I am blind) What I want to do is to parse command line like this myperlscript.pl -mode [sth] [inputfile] I can use ...

Object-Oriented Perl constructor syntax and named parameters

I m a little confused about what is going on in Perl constructors. I found these two examples perldoc perlbot. package Foo; #In Perl, the constructor is just a subroutine called new. sub new { #I ...

Where can I find object-oriented Perl tutorials? [closed]

A Google search yields a number of results - but which ones are the best? The Perl site appears to contain two - perlboot and perltoot. I m reading these now, but what else is out there? Note: I ve ...

热门标签