Questions tagged [pgp]

The OpenPGP encrypted data format (RFC 4880), and its implementations PGP and GnuPG.

Filter by
Sorted by
Tagged with
5 votes
1 answer
2k views

Binary format of encrypted PGP private key?

Short Version of the Question: I would like to remove any predictable information from an encrypted private keys binary representation. Does anyone have a hint where the binary format for encrypted ...
KayleeTheMech's user avatar
2 votes
1 answer
62 views

Older key as PGP subkey?

Currently I have a 2048-bit PGP key. Suppose I create a new 4096-bit key. Can I add that old key as a subkey of this new one?
Mostafa Shahverdy's user avatar
2 votes
3 answers
233 views

Is PGP's way of maintaining email security optimal? [duplicate]

I read a book called "computer networking: A top-down approach". It talked about how PGP creates an email message between Alice and Bob to maintain confidentiality, integrity, and authenticity. Let me ...
drdot's user avatar
  • 359
4 votes
1 answer
454 views

Is there a way to turn a PGP key into its semi-prime counterpart?

From my understanding of PGP keys they use the RSA algorithms to encrypt/decrypt messages. So, I know that the RSA algorithms use a semi-prime number to encrypt/decrypt messages. So, what I was ...
Peter Dwyer's user avatar
9 votes
3 answers
2k views

Why does OpenPGP encryption produce different ciphertexts from the same plain text?

With the same plain text to be encrypted and the same public key, OpenPGP tends to produce a different ciphertext every time I run the encryption operation. Why is this?
torstack45's user avatar
3 votes
1 answer
2k views

Different kind of PGP keys or IDs, how to interpret them?

When people say "Here's my PGP key", they tend to come up with all sorts of different stuff. Sometimes they provide an 8-digit hexadecimal number, which seems to be a key ID (although I'm not sure). ...
RocketNuts's user avatar
  • 1,387
6 votes
2 answers
3k views

Why is padding the plaintext with a random string before encryption worse than OAEP / PKCS#7?

I'm reading about OAEP / PKCS padding used for PGP to turn deterministic algorithms like RSA from deterministic encryption to probabilistic encryption (randomness in the resulting output). That way ...
Xeoncross's user avatar
  • 663
0 votes
1 answer
514 views

Chosen Ciphertext Attack on the Public Key in PGP

In Secrets & Lies (2000), Schneier describes a chosen ciphertext attack on the public key under PGP: "Since RSA and ElGamal are malleable, known changes can be made to the symmetric key that is ...
Marcel's user avatar
  • 155
4 votes
1 answer
850 views

Is a chosen ciphertext attack on PGP still possible?

In a paper from 2002 (pdf), Jallad et al describe a chosen ciphertext attack on PGP by taking advantage of the CFB mode that the block ciphers use under PGP. It's quite a devastating attack. Is this ...
Marcel's user avatar
  • 155
1 vote
1 answer
316 views

Private key can't be traced (GPG)?

I am very new to cryptography. I was reading about GPG/PGP Basics when a doubt arose: As per my understanding, everyone knows the algorithm (from GPG) with which I generated my key pair. If I show my ...
Severus Tux's user avatar
2 votes
1 answer
248 views

Is this cascading encryption, and is my security weakened as a result?

I'm trying to understand what is, and what is not, considered cascading encryption. All of the posts and conversations I've read over the past few days discourage the practice, including this article. ...
John's user avatar
  • 21
10 votes
1 answer
3k views

Why does "gpg --export-secret-keys" ask for a password? [closed]

What is it about the architecture of GPG that requires me to enter the password of the secret key when I export it with "gpg --export-secret-keys"? I would expect that gpg can just copy the relevant ...
hut's user avatar
  • 329
5 votes
1 answer
1k views

Can gnupg master key decrypt something encrypted with subkey?

When creating gpg subkeys, the master key signs and certifies that a subkey belongs to that master. That's ok, but, can master key decrypt something encrypted by a subkey? I guess no, but I want to be ...
Albert Inmand's user avatar
8 votes
1 answer
10k views

How to generate fingerprint for PGP public key

I would like to know how to generate a fingerprint for an openPGP public key. To be clear, I'm interested in how the fingerprint is generated. I'm aware that I can get the fingerprint with a ...
cdblades's user avatar
2 votes
1 answer
376 views

Using e-ID Number for Encryption and Digital Signing

I want to use e-ID number for performing Encryption/Decryption and Digital Signing - and in order to do so, I've opted a PGP-oriented approach which goes a bit like this. Generating PGP key-pair ...
MSalman's user avatar
  • 21
0 votes
1 answer
4k views

How long can a RSA public key be?

If I create an RSA of 4096 bits, what would be the range of the length in bytes of the public key in DER format? Also, will the private key always be exactly 4096 bits (512 bytes)? Does the public ...
Nathan Parker's user avatar
3 votes
1 answer
3k views

Perfect Forward Secrecy in PGP/asynchronous email

Looking at the RFC for PGP email/asynchronous chat with PFS here https://datatracker.ietf.org/doc/html/draft-brown-pgp-pfs-03 can anyone tell me why the following scheme is no good? Alice and Bob ...
user29550's user avatar
3 votes
2 answers
2k views

Why does GPG ciphertext length differ with fixed plaintext length?

Thank you for your reply. Based on your inputs. I was investigated further, find details below Step 1) Input string for encryption is UUID format Input data = c0c6f311-a793-4d65-9374-1c0e45f5382c ...
Harinath GI's user avatar
8 votes
1 answer
4k views

gpg --gen-random quality level: is higher "better"?

The GNU Privacy Guard manual pages have this to say about using the gpg --gen-random 0|1|2 count command: Emit count random bytes of the given quality level 0, 1 ...
camercu's user avatar
  • 333
1 vote
0 answers
870 views

Simplest way for strong cryptography in chat [closed]

I am a beginner in cryptography and I am interested for several weeks on this for my chat application. Basically, it is a centralized model. All messages are stored and potentially visible by ...
Wattler12's user avatar
2 votes
2 answers
175 views

Initializing PGP keys by one side

I am using a PGP method to encrypt and decrypt messages shared between users A and B. Upon the start of a message exchange is the initialization of the public and secret keys by both Users. Lets say ...
WJA's user avatar
  • 227
7 votes
1 answer
233 views

Why does GnuPG save an array of remainders when generating prime numbers?

In looking at GPG's gen_prime() function, found within the cyphers/primegen.c file of ...
Z. Charles Dziura's user avatar
2 votes
1 answer
171 views

Encryption on the cloud with versioning

Can file-versioning, which is available for instance in Dropdox, weaken the security of encrypted files if someone is able to see two or more snapshots of the ciphertext at different times? To be ...
octo's user avatar
  • 101
6 votes
1 answer
3k views

ECDH and ECDSA in PGP with known public key

How are used ECDH and ECDSA in combination with public key ? Usually these methods are used for establish a secret themselves, ...
Alexander.It's user avatar
5 votes
1 answer
435 views

OpenPGP Public-Key algorithm

What means when pgpdump shows this kind of algorithm in the Public-Key Encrypted Session Key Packet? ...
Alexander.It's user avatar
2 votes
1 answer
475 views

Possible to detect if a message is PGP encrypted/signed (ciphertext)

Let's say I have a text field somewhere (i.e. an interactive user submitted text field on a PHP script, or a console application. Basically anything that accepts user input.) How can I detect if said ...
anonymous's user avatar
7 votes
2 answers
4k views

Why must we generate the signature before any compression being done at PGP?

I have done some research on PGP and I found out there are of two reasons why we must generate the signature before doing any compression. Yet, I am not sure I really understand them both. One ...
Shinji Kagawa's user avatar
1 vote
0 answers
186 views

Details related to the ZIP algorithm used in PGP message encryption? [closed]

I am very new to PGP. PGP encryption works with hash function, asymmetric encryption, symmetric encryption and a zip algorithm (LZ77). What I know is that the zip algorithm is used to reduce the ...
Shinji Kagawa's user avatar
3 votes
1 answer
632 views

Implementing forward secrecy in OpenPGP with public key authentication

I am trying to consider the feasibility of implementing an encrypted file sharing system, which both provides forward secrecy but also allows public key verification. I am stuck on the marriage ...
William Thomas's user avatar
5 votes
1 answer
1k views

Generating PGP key *without* random generator? (using fixed input only)

I understand why in general, a strong random generator or source of entropy is used when generating PGP keys. However, I have a use case where I want to generate PGP keys deterministically, i.e. ...
RocketNuts's user avatar
  • 1,387
0 votes
3 answers
232 views

Some doubts about GnuPG

I've reading on GPG since yesterday and I have a doubt: the whole system of double key encryption does make sense but it looks to me like either way you are compromising something in terms of security....
Issam2204's user avatar
0 votes
2 answers
1k views

How to decrypt a PGP message with only the two primes and the public exponent?

I'm trying to decrypt a PGP Message that is encrypted with an RSA key, but I only have this information: Public exponent: 65537 Prime 1: ...
Quark's user avatar
  • 103
3 votes
1 answer
21k views

PGP public RSA key format

I have been trying to use Go (I could post the code, but I think I posted enough already...) to generate a PGP RSA key. However every time I try to encrypt something with it, something fails. However, ...
Travis's user avatar
  • 131
0 votes
1 answer
466 views

Is it a bad idea to use PGP encryption for structured/predictable data?

I'm working on an app and need to encrypt some structured data. The data will be turned into a string form (JSON) before getting encrypted. The data format I'm using will always start with a ...
Akhil F's user avatar
  • 285
3 votes
2 answers
8k views

PGP digital signature vs SHA256 HMAC Comparison

First let me admit that I am not a mathematician or a cryptographer. I am responsible for assisting in making a recommendation on a project that is consolidating payment processes within a company's ...
J_Marshall's user avatar
5 votes
1 answer
4k views

How do revocation certificates work in PGP?

I've already read how to build and upload them, but I'm wondering how revocation certificates work, what informations they hold and so on. Suppose my private key is compromised, but I have a ...
Giacomo Tesio's user avatar
7 votes
1 answer
61k views

How to decrypt a '.enc' file that has been encrypted with RSA using a public key? [closed]

While solving a CTF challenge online, I came across a situation where I needed to decrypt a '.enc' file that has been encrypted using someone's public key. The ...
learnerX's user avatar
  • 687
1 vote
1 answer
688 views

How are RSA and ElGamal compatible in PGP?

I'm starting to play with PGP and I don't understand how if your key pair is RSA you can encrypt a message for someone whose key is for example ElGamal. How does the asymmetric key exchange work if ...
pvieito's user avatar
  • 13
0 votes
1 answer
8k views

How do you break encryption on a message? [closed]

This may seem like a simple question, but I have just started studying cryptography and I can't seem to find any information on this at all. I am trying to write a "simple" encrypted messenger using ...
Chris's user avatar
  • 3
6 votes
2 answers
2k views

Signing Files vs. Signing File Hashes

What are the security pitfalls that may occur by signing a list of file hashes, versus signing individual files? In short, the security trade-offs between: ...
Zach Riggle's user avatar
0 votes
1 answer
930 views

How exactly to extract information base 10 from a PGP RSA key pair?

I think I understand the mathematics of RSA ok. I'm not so computer savvy though. How, exactly, can I extract $n$, $e$, $d$, $p$ and $q$ from a PGP RSA public key pair? Is there like a converter ...
Joe's user avatar
  • 121
0 votes
1 answer
1k views

GPG & Mcrypt - difference?

in short I'm learning GUI programming in python and thought it could be interesting to make a small GUI for symmetric encryption. Not being mad/mathematical/experienced (take your pick) enough to try ...
Aaron W.'s user avatar
6 votes
2 answers
810 views

Can you fake messages from recorded message-history?

Lets assume Eve has a lot of PGP conversation with Alice and records all those messages. Bob is also regularly communicating with PGP with Alice. If Bob doesn't care about not having a signature ...
rubo77's user avatar
  • 207
6 votes
1 answer
7k views

What characters are valid in PGP encrypted and signed messages?

What characters may be present in a PGP encrypted message or a PGP signature? For example, do encrypted messages only use the Roman alphabet + some numbers and symbols? Can the character set be ...
cheese1756's user avatar
5 votes
2 answers
705 views

PGP String-to-Key specifiers

I've been reading through the PGP Standard and here I'm a little confused. This section is discussing converting string data to a session key. I'm confused about the paragraph in bold. First off, what ...
Yelneerg's user avatar
-1 votes
1 answer
2k views

PGP message integrity : How can receiver of an email check the integrity using the sender's public key?

PGP message integrity: Basically, only private key can decrypt message encrypted with public key. But in the message integrity service in PGP does the reverse, where the Hash of the message if ...
Balu's user avatar
  • 9
3 votes
1 answer
144 views

Familiar key signing over video call

Say that a friend of mine and I have both generated new PGP keys, and we want to use a video call to verify each other's new keys because we live on opposite sides of the planet. While we could both ...
Jon Gjengset's user avatar
1 vote
0 answers
94 views

Want to use ECC but am clueless [closed]

First off, I'm not an experienced cryptography or computer person, please bear with me. I have some basic experiences with PGP software though (not much of a redemption huh?). I have some data that I'...
zakshaks's user avatar
8 votes
2 answers
7k views

How do I create a short signature? (e.g. less than 100 bytes)

I want to put information into a QR code and have it signed so that the authenticity of the information can be verified. But QR codes have limited storage capacity and when I used e.g. gpg I get ...
Erik Engheim's user avatar
6 votes
1 answer
544 views

Difference RSA keypair creation openSSL and openPGP?

Creating a 2048bits RSA keypair I figured that doing this using openssl takes as an input 32bytes of "randomness" from ...
humanityANDpeace's user avatar