gchq / gchq/CyberChef

Bug report: PGP Sign operation creates encrypted output, while it should be signed cleartext.

Open
#2,697 7 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
35.8k
Forks
4.1k
Avg merge
2d 26m
Merged PRs (30d)
33

Description

The PGP Sign function currently uses the box function from kbpgp. The box-function is meant for encryption. While it is functional it is not creating the correct output. The clearsign function from kbpgp should be used instead. This will create an RFC4880-compliant message with human-readable text and a PGP signature.

**To Reproduce**
Select the PGP Sign funtion.
Supply a private key and passphrase
Add some random input

The result is a PHP message with the header:
"-----BEGIN PGP MESSAGE-----"

Using the clearsign will create a message with the header:
"-----BEGIN PGP SIGNED MESSAGE-----"

**Additional context**
I have created PR #2696 to change the function from kbpgp.box to kbpgp.clearsign,

Contributor guide

Open the contributing guide

Research direction

Start at the CyberChef PGP Sign operation and inspect its use of kbpgp.box. Compare the reproduced output header with the expected cleartext-signed format, then review PR #2696 and verify the operation with a private key, passphrase, and sample input; done means it produces the RFC4880-style signed-message header rather than an encrypted-message header.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
cryptography
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.