Tag Info

New answers tagged


If you don't mind using ruby you can do something like this: require 'openssl' key = OpenSSL::PKey::RSA.new key.e = key.d = key.n = key.p = key.q = puts key.to_pem If you don't set p and q then you'll get the public key format, if you do you'll get the private key format


The only possible answer to this is to check out the OpenPGP format and see if the message adheres to that format. You may need to build in some mechanisms to filter out tiny mistakes or extensions in the message though. As Open PGP is, well, open, there should be plenty libraries that perform this parsing for you. Library recommendations are off topic here ...


Both reasons are basically the same. The issue here is the following: Often you only want to compress for transportation (e.g. for sending an email) and decompress for storage (e.g. when storing the email in you local email client) to more efficiently offer features like text search. Because the compression algorithm is non-deterministic you would have to ...


As for the first reason: in the future you probably need the decompressed form of the message. There won't be much you can do with the compressed message. But PGP is application level; you may want to verify that message at any time. Now you may want to verify the signature over that decompressed data without compressing it first. E.g. it's a good use case ...

Top 50 recent answers are included