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

  1. Provide the signer's ASCII-armoured PGP public key in the first argument.
  2. Verify the key begins with '-----BEGIN PGP PUBLIC KEY BLOCK-----'.
  3. 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

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


AI-assisted analysis of gchq/CyberChef@4290ea7539 (2026-08-13). Data as JSON: /api/errors/12e2038edef9a1bb. Report an issue: GitHub.