gchq/CyberChef · warning · OperationError
Enter the private key of the signer.
Error message
Enter the private key of the signer.
What it means
PGPSign.run reads args[0] as the signer's private key. If it is falsy the operation aborts before importing any key - there is nothing to sign with. This is an input-validation guard thrown before any crypto runs.
Source
Thrown at src/core/operations/PGPSign.mjs:65
"type": "string",
"value": ""
}
];
}
/**
* @param {string} input
* @param {Object[]} args
* @returns {string}
*
* @throws {OperationError} if failed private key import or failed encryption
*/
async run(input, args) {
const message = input,
[privateKey, passphrase] = args;
let signedMessage;
if (!privateKey) throw new OperationError("Enter the private key of the signer.");
const privKey = await importPrivateKey(privateKey, passphrase);
try {
signedMessage = await promisify(kbpgp.box)({
"msg": message,
"sign_with": privKey,
"asp": ASP
});
} catch (err) {
throw new OperationError(`Couldn't sign message: ${err}`);
}
return signedMessage;
}
}
export default PGPSign;View on GitHub (pinned to 4290ea7539)
Solutions
- Provide the signer's ASCII-armoured PGP private key in the first argument.
- If the key is passphrase-protected, also fill the passphrase field.
- Verify the key begins with '-----BEGIN PGP PRIVATE KEY BLOCK-----'.
Defensive patterns
Strategy: validation
Validate before calling
const [privateKey, passphrase] = args;
if (!privateKey || !privateKey.trim()) {
throw new Error('Signer private key argument is required before running PGP Sign.');
} Type guard
const isArmouredPrivateKey = (s) =>
typeof s === 'string' && /-----BEGIN PGP PRIVATE KEY BLOCK-----/.test(s); Prevention
- Populate the signer private-key argument before running.
- Provide a passphrase if the key is locked.
- Use a key that has a signing subkey.
When it happens
Trigger: The 'Private key of signer' argument is empty; the args array is shorter than expected; the key text was not bound into the recipe.
Common situations: User forgot to paste the private key; an automated recipe with a blank key field; copy-paste that missed the clipboard.
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 public key of the signer.
AI-assisted analysis of gchq/CyberChef@4290ea7539 (2026-08-13).
Data as JSON: /api/errors/02d79ecd01ec7f15.
Report an issue: GitHub.