keybase / keybase/keybase-issues
Sign and encrypt include Public-Key Encrypted Session Key Packet for both signer and recipient?
- Dominant language
- No language data
- Stars
- 899
- Forks
- 40
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
When signing and encrypting, why does both the webapp and keybase cmdline include Public-Key Encrypted Session Key Packet for both the signer and the recipient?
Check out the following command line:
```
$ keybase pgp encrypt max < "msg.txt" | pgpdump
New: Public-Key Encrypted Session Key Packet(tag 1)(524 bytes)
New version(3)
Key ID - 0x2478DF98CED355D3
Pub alg - RSA Encrypt or Sign(pub 1)
RSA m^e mod n(4096 bits) - ...
-> m = sym alg(1 byte) + checksum(2 bytes) + PKCS-1 block type 02
New: Public-Key Encrypted Session Key Packet(tag 1)(268 bytes)
New version(3)
Key ID - 0x980A3F0D01FE04DF
Pub alg - RSA Encrypt or Sign(pub 1)
RSA m^e mod n(2048 bits) - ...
-> m = sym alg(1 byte) + checksum(2 bytes) + PKCS-1 block type 02
New: Symmetrically Encrypted and MDC Packet(tag 18)(1 bytes) partial start
Ver 1
Encrypted data [sym alg is specified in pub-key encrypted session key]
```
Compare the above with the following:
```
$ gpg --encrypt --sign --armor -u matt@implbits.com -r themax@gmail.com < msg.txt | pgpdump
Old: Public-Key Encrypted Session Key Packet(tag 1)(268 bytes)
New version(3)
Key ID - 0x980A3F0D01FE04DF
Pub alg - RSA Encrypt or Sign(pub 1)
RSA m^e mod n(2048 bits) - ...
-> m = sym alg(1 byte) + checksum(2 bytes) + PKCS-1 block type 02
New: Symmetrically Encrypted and MDC Packet(tag 18)(512 bytes) partial start
Ver 1
Encrypted data [sym alg is specified in pub-key encrypted session key]
(plain text + MDC SHA1(20 bytes))
```
This is an issue because with Keybase, signed and encrypted PGP Messages contain a clear text identifier for the signer (the Key ID in the Public-Key Encrypted Session Key Packet). This is very uncool for scenario where someone want to author a PGP Message and communicate it via a public forum without divulging that there is a relationship with the recipient.
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the reported output with `keybase pgp encrypt` and `pgpdump`, then compare it with the `gpg --encrypt --sign` output shown in the issue. The payload names no source files or tests; done would require an agreed design and verification that signed, encrypted messages no longer expose the signer identifier while remaining valid.
Written by the indexing model from the issue text.
Assessment
- Domain
- cryptography, security
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100