pgp

Easiest way to decrypt PGP-encrypted files from VBA (MS Access)

杀马特。学长 韩版系。学妹 提交于 2019-12-12 09:55:20
问题 I need to write code that picks up PGP-encrypted files from an FTP location and processes them. The files will be encrypted with my public key (not that I have one yet). Obviously, I need a PGP library that I can use from within Microsoft Access. Can you recommend one that is easy to use? I'm looking for something that doesn't require a huge amount of PKI knowledge. Ideally, something that will easily generate the one-off private/public key pair, and then have a simple routine for decryption.

Problem decrypting PGP in python with pyme without user interaction

倖福魔咒の 提交于 2019-12-12 09:27:21
问题 I am trying to decrypt messages using pyme (a python wrapper from gpgme). It works fine if I type in the password when it prompts but I cannot get the passphrase callback to work. Here is the code import pyme.core def Callback( x, y, z ): print 'in passphrase callback' return 'passphrase' plain = pyme.core.Data() cipher = pyme.core.Data(sys.stdin.read()) c = pyme.core.Context() c.set_armor(1) c.set_passphrase_cb(Callback) c.op_decrypt( cipher, plain ) plain.seek(0,0) print plain.read() When I

BouncyCastle in-memory PGP encryption in C#

匆匆过客 提交于 2019-12-12 07:56:36
问题 I've been trying to use the BouncyCastle library to do PGP encryption/decryption. I have some code that I need to modify to use streams only - no files. I tried removing the PgpUtilities.WriteFileToLiteralData() and then making it return a stream, but it didn't work (output stream was empty). To be more clear here is what the method should be: public static Stream EncryptFile(MemoryStream inputStream, PgpPublicKey encKey, bool withIntegrityCheck) Here is the code I need to modify: private

OpenPGP Encryption Using BouncyCastle Lightweight API

前提是你 提交于 2019-12-12 03:52:52
问题 I have to encrypt some content using a 256 bit AES-CBC key. The encryption protocol to be followed is OpenPGP. Since the key size is 256 bit and the public/private keys will also be of 4096 bit I will have to use the lightweight APIs. I have found several questions that show how to encrypt using a 256 bit AES-CBC key but I cannot figure out how to integrate that with PGP. The most obvious approach is to encrypt it using the AES engine and then encrypt the result using the public key as it is

Using BCPG public key in ObjectivePGP for generating PGPKey its return nil

被刻印的时光 ゝ 提交于 2019-12-11 17:25:08
问题 My Public key : -----BEGIN PGP SIGNATURE----- Version: BCPG v1.48 lQH+BFomf0kDBADUrV1KFuGFxvRhA7yCO07q5vtvKTjnP4wRn5KyXMyjYX2R5rvGkQkpWwBfzGCxMA+ieeW5mWFrNFod4A6wXGzXiiEZ3/i4EfvyipKk38sLVdW8I3sux1lnjp4t+6p1RTAVAwx0yWGjNHlLcbwhtFNyoIW1fxUckVZwW3PJrJm2owARAQAB/gMDAkpUpa7K3etCYNSXyy/c0CfQ1fMVnWtls9UNiLyj8Hi3qyaBK0E942xZQkiq60qCirnPtWTsndKkMnHuGcOVSusYwP20aKj2Z4vrfKAtSx1CoJVPtk0M/qt/cbUQqpkFrow6RBxCI5k/6xaxK+174WtEQRSD/Dzr99jPBdbI8zYB/1Nzj7uFZPci0i8x04TzR8aSFx5vTXc9v5nSEYUoNd

PGP Encryption with Apache Camel

强颜欢笑 提交于 2019-12-11 16:31:24
问题 I am trying to encrypt and decrypt a file using PGP Encryption/Decryption methodology with Apache Camel. Further I have installed Kleopatra to generate the private and public keys. Using Kleopatra i have generated my keys successfully. The secret key and public keys are in ".asc" extension. Below is the piece of code i am using to encrypt the file import org.apache.camel.CamelContext; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.impl.DefaultCamelContext; public class

PHP exec pgp command

谁说我不能喝 提交于 2019-12-11 08:54:06
问题 I am want to use PHP to 'exec' a pgp encryption command. Regardless of the command line I get either a err 64 (parser error) or 162 (complete failure during an encode). So I have reduced the command line within the PHP program to this simple fingerprint display which stills errs out: exec("/opt/pgp/bin/pgp --fingerprint", $results); If I run "/opt/pgp/bin/pgp --fingerprint" on a command line I get "2 keys found" and the expected display. But the same exec under PHP gives me the parser error

Python and PGP/encryption

。_饼干妹妹 提交于 2019-12-10 15:33:33
问题 i want to make a function using python to encrypt password by the public key. at the user end i need to install PGP software which will generate the key pair .i want to use public key only for encryption and private key for decryption. The problem is coming with the encryption function(how to use key for encryption) and also in pgp installing . can somebody tell me the correct way to do this thanks 回答1: Here is an open source project for using pgp with python. I think this is what you're

java sign public pgp key with bouncycastle

大兔子大兔子 提交于 2019-12-09 20:56:28
问题 I've got a doubt.. I have to sign a pgp public key using bouncycastle api supposedly. Now: to my understanding signing a key with another means ultimately adding to this public key a "certificate". Thus lacking any other way, I've gone blind searching in the library. my only find so far has been method generateCertification inside PGPSignatureGenerator. But this method generate a certification between a master PgpPublicKey and another PgpPublicKey.. And this strikes me as strange: I assumed

PGP-signing multipart e-mails with Python

一个人想着一个人 提交于 2019-12-09 09:31:49
问题 I'm currently trying to add PGP signing support to my small e-mail sending script (which uses Python 3.x and python-gnupg module). The code that signs message is: gpg = gnupg.GPG() basetext = basemsg.as_string().replace('\n', '\r\n') signature = str(gpg.sign(basetext, detach=True)) if signature: signmsg = messageFromSignature(signature) msg = MIMEMultipart(_subtype="signed", micalg="pgp-sha1", protocol="application/pgp-signature") msg.attach(basemsg) msg.attach(signmsg) else: print('Warning: