Questions tagged [pgp]

Pretty Good Privacy (PGP) is a data encryption and decryption computer program that provides cryptographic privacy and authentication for data communication.

Pretty Good Privacy (PGP) is a data encryption and decryption computer program that provides cryptographic privacy and authentication for data communication. PGP is often used for signing, encrypting and decrypting texts, E-mails, files, directories and whole disk partitions to increase the security of e-mail communications. It was created by Phil Zimmermann in 1991.

PGP and similar products follow the OpenPGP standard (RFC 4880) for encrypting and decrypting data.

Resources

817 questions
4
votes
1 answer

Fail to gpg-decrypt BouncyCastlePGP-encrypted message

When I try to decrypt a message using GnuPG encrypted with BouncyCastle I get two gpg: [don't know]: invalid packet (ctb=xx) messages and the decryption fails. I am using BouncyCastle 1.54 and gpg (GnuPG) 2.0.30 on OSX Details 1) The PGP key was…
gv0tch0
  • 391
  • 1
  • 2
  • 14
4
votes
5 answers

Is it safe to leave my password-protected PGP secret key available publicly?

My PGP secret keys are always password protected, which means you need to decrypt it using a symmetric key to get access to my private key. I am interested in making my password protected PGP secret key publicly available but I am not entirely sure…
Sam Goto
  • 475
  • 6
  • 11
4
votes
1 answer

Convert java.security.PublicKey into bouncy castle PGPPublicKey

I am trying to encrypt a string using bouncy castle. The library I am using to retrieve the public key for the encryption returns it as a java.security.PublicKey object. How do I convert it into a PGPPublicKey object so that I can use it to encrypt…
user2078217
  • 129
  • 2
  • 12
4
votes
1 answer

Looking for a model explaining the internal structure of a PGP-signed & encrypted file

I'm trying to debug & extend an existing piece of Java code using BouncyCastle to decrypt and verify secured attachments. I've looked through the BouncyCastle samples but what it's harder to extract from there is a model of what a PGP-secured…
wishihadabettername
  • 14,231
  • 21
  • 68
  • 85
4
votes
1 answer

How to determine fingerprint of imported OpenPGP key in PHP using the GnuPG module?

In php I have a public key, but I do not know fingerprint of this key. How can I encrypt a text by this public key? Here is the code: $gpg = new gnupg(); putenv("GNUPGHOME=/tmp"); $pubkey = "-----BEGIN PGP PUBLIC KEY BLOCK----- Version: GnuPG…
Mr-EsSi
  • 60
  • 1
  • 7
4
votes
3 answers

Go - Golang openpg - Create Key pair and create signature

I'm currently working on openpgp in combination with golang. I use the following code to generate a new keypair and create a self-signature on the resulting public key: package main import ( "bytes" "crypto" "time" …
Thea Queen
  • 45
  • 1
  • 5
4
votes
1 answer

PGP Encryption - PHP openssl

I have this RSA 2048 key on a local "key.key" file: -----BEGIN PGP PUBLIC KEY BLOCK----- Version: GnuPG v1.4.11 (GNU/Linux) ... ... ... -----END PGP PUBLIC KEY BLOCK----- How can I use it in PHP to encrypt a string to send? I am on a shared…
jstudios
  • 856
  • 1
  • 9
  • 26
4
votes
1 answer

How do I use an old GPG key when I switch machines or work on different platforms?

I currently have "signing Git commits with GPG keys" as part of my workflow. I'm wondering how I can use my old signature on new computers or OSes.
batman
  • 5,022
  • 11
  • 52
  • 82
4
votes
1 answer

Can I create a reproducible PGP Keypair with a passphrase using Bouncycastle for C#?

EDIT: This code works. The key text is different every time, but the key material is the same. I have updated the code below to collect the data for key creation from the console, without echo. I would like to generate a Pgp keypair from a livecd…
spectator
  • 51
  • 5
4
votes
0 answers

Decrypt PGP string in C#

I've looked for an answer four about an hour now and can't find anything. This would usually be easy, but: We're not able to write to files or call an external file. We cannot use the BouncyCastle API. Most of the libraries I'm finding require…
Captain Skyhawk
  • 3,499
  • 2
  • 25
  • 39
4
votes
1 answer

Any way to PGP encrypt data stream and save it directly to the FTP without having to save it locally?

I have to send PGP encrypted file in asc format to FTP folder via sFTP. Is there a way to PGP encrypt a stream (which is CSV formatted stream) and push it to the sFTP without having to save it on local machine. Below is the function I use for PGP…
Learner
  • 3,904
  • 6
  • 29
  • 44
4
votes
4 answers

Using two public keys to encrypt a file

I am not sure if this is the correct place for this question as this might be more of a theory based question. But I was also interested in the C# implementation of the following. And how feasible it is I am planning on using PGP for encryption and…
Ron
  • 886
  • 13
  • 39
4
votes
1 answer

Restore PGP public key from private in bouncycastle

In algorythmic level it is possible to restore public key from private. But is there a way to do it in bouncycastle library with PGP keys? Thanks!
Mitya XMitya
  • 1,129
  • 9
  • 17
4
votes
1 answer

Python API to fetch PGP public key from key server?

Is there any Python API which can fetch a PGP public key from the public key server?
jass
4
votes
3 answers

Generating PGP keypair, and signing text with an encrypted PGP private key, in Javascript

I'm writing something that needs to do electronic signatures. Some users will be geeks like me and already have their own PGP keys. Most won't, and won't want to futz with installing or maintaining it anyway. As a workaround solution, I want to do…
Sai
  • 6,919
  • 6
  • 42
  • 54