gchq/CyberChef · warning · OperationError
Enter the private key of the signer.
Error message
Enter the private key of the signer.
What it means
PGPEncryptAndSign.run reads args[0] as the signer's private key. If it is falsy the operation aborts before importing any key - signing cannot proceed. This is an input-validation guard.
Source
Thrown at src/core/operations/PGPEncryptAndSign.mjs:73
"type": "text",
"value": ""
}
];
}
/**
* @param {string} input
* @param {Object[]} args
* @returns {string}
*
* @throws {OperationError} if failure to sign message
*/
async run(input, args) {
const message = input,
[privateKey, passphrase, publicKey] = args;
let signedMessage;
if (!privateKey) throw new OperationError("Enter the private key of the signer.");
if (!publicKey) throw new OperationError("Enter the public key of the recipient.");
const privKey = await importPrivateKey(privateKey, passphrase);
const pubKey = await importPublicKey(publicKey);
try {
signedMessage = await promisify(kbpgp.box)({
"msg": message,
"encrypt_for": pubKey,
"sign_with": privKey,
"asp": ASP
});
} catch (err) {
throw new OperationError(`Couldn't sign message: ${err}`);
}
return signedMessage;
}
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, publicKey] = args;
if (!privateKey || !privateKey.trim()) {
throw new Error('Signer private key argument is required before running PGP Encrypt and Sign.');
} Type guard
const isArmouredPrivateKey = (s) =>
typeof s === 'string' && /-----BEGIN PGP PRIVATE KEY BLOCK-----/.test(s); Prevention
- Populate the signer private-key argument first.
- Provide a passphrase if the key is locked.
- Also supply the recipient public key.
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 supplied only the recipient public key and forgot the signer private 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 public key of the signer.
AI-assisted analysis of gchq/CyberChef@4290ea7539 (2026-08-13).
Data as JSON: /api/errors/aba26d181e68b002.
Report an issue: GitHub.