gchq/CyberChef · warning · OperationError
Enter the public key of the signer.
Error message
Enter the public key of the signer.
What it means
PGPVerify.run reads args[0] as the signer's public key. If it is falsy the operation aborts before importing any key - verification cannot proceed without the signer's public key. This is an input-validation guard.
Source
Thrown at src/core/operations/PGPVerify.mjs:62
"name": "Public key of signer",
"type": "text",
"value": ""
}
];
}
/**
* @param {string} input
* @param {Object[]} args
* @returns {string}
*/
async run(input, args) {
const signedMessage = input,
[publicKey] = args,
keyring = new kbpgp.keyring.KeyRing();
let unboxedLiterals;
if (!publicKey) throw new OperationError("Enter the public key of the signer.");
const pubKey = await importPublicKey(publicKey);
keyring.add_key_manager(pubKey);
try {
unboxedLiterals = await promisify(kbpgp.unbox)({
armored: signedMessage,
keyfetch: keyring,
asp: ASP
});
const ds = unboxedLiterals[0].get_data_signer();
if (ds) {
const km = ds.get_key_manager();
if (km) {
const signer = km.get_userids_mark_primary()[0].components;
let text = "Signed by ";
if (signer.email || signer.username || signer.comment) {
if (signer.username) {
text += `${signer.username} `;View on GitHub (pinned to 4290ea7539)
Solutions
- Provide the signer's ASCII-armoured PGP public key in the first argument.
- Verify the key begins with '-----BEGIN PGP PUBLIC KEY BLOCK-----'.
- Ensure the key includes the signing subkey that produced the signature.
Defensive patterns
Strategy: validation
Validate before calling
const [publicKey] = args;
if (!publicKey || !publicKey.trim()) {
throw new Error('Signer public key argument is required before running PGP Verify.');
} Type guard
const isArmouredPublicKey = (s) =>
typeof s === 'string' && /-----BEGIN PGP PUBLIC KEY BLOCK-----/.test(s); Prevention
- Populate the signer public-key argument before running.
- Validate the key is an armoured PGP public key block.
- Ensure the key includes the signing subkey that produced the signature.
When it happens
Trigger: The 'Public key of signer' argument is empty; the args array is missing element 0; the key text was not bound into the recipe.
Common situations: User forgot to paste the signer public key; programmatic call with a missing argument; blank UI field.
Related errors
- Enter the private key of the recipient.
- Enter the public key of the signer.
- Enter the public key of the recipient.
- Enter the private key of the signer.
- Enter the private key of the signer.
AI-assisted analysis of gchq/CyberChef@4290ea7539 (2026-08-13).
Data as JSON: /api/errors/12e2038edef9a1bb.
Report an issue: GitHub.