{"record":{"id":"77fc122863313ccf","repo":"gchq/CyberChef","slug":"the-data-does-not-appear-to-be-signed-77fc12","errorCode":null,"errorMessage":"The data does not appear to be signed.","messagePattern":"The data does not appear to be signed\\.","errorType":"exception","errorClass":"OperationError","httpStatus":null,"severity":"error","filePath":"src/core/operations/PGPVerify.mjs","lineNumber":102,"sourceCode":"                        }\n                        if (signer.email) {\n                            text += `<${signer.email}>`;\n                        }\n                        text += \"\\n\";\n                    }\n                    text += [\n                        `PGP key ID: ${km.get_pgp_short_key_id()}`,\n                        `PGP fingerprint: ${km.get_pgp_fingerprint().toString(\"hex\")}`,\n                        `Signed on ${new Date(ds.sig.when_generated() * 1000).toUTCString()}`,\n                        \"----------------------------------\\n\"\n                    ].join(\"\\n\");\n                    text += unboxedLiterals.toString();\n                    return text.trim();\n                } else {\n                    throw new OperationError(\"Could not identify a key manager.\");\n                }\n            } else {\n                throw new OperationError(\"The data does not appear to be signed.\");\n            }\n        } catch (err) {\n            throw new OperationError(`Couldn't verify message: ${err}`);\n        }\n    }\n\n}\n\nexport default PGPVerify;\n","sourceCodeStart":84,"sourceCodeEnd":112,"githubUrl":"https://github.com/gchq/CyberChef/blob/4290ea753912378913b1f3f54e0fc5720afeda5d/src/core/operations/PGPVerify.mjs#L84-L112","documentation":"Thrown when kbpgp.unbox successfully parses the input as a PGP message but the result has no data signer — the message carries no digital signature. PGPVerify is designed for signed or clearsigned messages; an unsigned message has nothing to verify. Note: this throw is inside the surrounding try block (line 66), so it is actually caught and re-wrapped by the catch at line 104 before reaching the caller.","triggerScenarios":"unboxedLiterals[0].get_data_signer() returns falsy. Occurs when the input is an encrypted-only PGP message (no signature packet), a PGP literal data packet without an accompanying signature, or a message whose signature packet was stripped or corrupted in transit.","commonSituations":"User encrypts a message with PGP Encrypt instead of PGP Sign or PGP Encrypt & Sign, then feeds it to PGP Verify. Or the user pastes a PGP public key block instead of a signed message. Or a clearsigned message was mangled by an email client that stripped the signature section.","solutions":["Produce the message with PGP Sign or PGP Encrypt & Sign so it includes a signature packet","Confirm the input begins with '-----BEGIN PGP SIGNED MESSAGE-----' or that the PGP MESSAGE block contains a signature packet","If the goal is decryption rather than signature verification, use PGP Decrypt instead of PGP Verify"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Pre-check: does the message look like a signed PGP message?\nfunction looksSigned(pgpMessage) {\n  const m = pgpMessage.trim();\n  return m.startsWith(\"-----BEGIN PGP SIGNED MESSAGE-----\") ||\n    (m.startsWith(\"-----BEGIN PGP MESSAGE-----\") &&\n     /BEGIN PGP SIGNATURE/.test(m));\n}\nif (!looksSigned(input)) {\n  throw new Error(\"Input has no PGP signature; use PGP Decrypt or a signed message.\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  const result = await chef.pgpVerify(input, [publicKey]);\n} catch (e) {\n  if (/does not appear to be signed/i.test(e.message)) {\n    // Re-route: try decrypt instead, or prompt user to provide a signed message\n  } else {\n    throw e;\n  }\n}","preventionTips":["Always sign messages with PGP Sign or PGP Encrypt & Sign if verification is needed downstream","Before calling PGP Verify, check that the message block contains a signature section"],"tags":["pgp","signature","crypto","kbpgp"],"backgroundTag":null,"analyzedSha":"4290ea753912378913b1f3f54e0fc5720afeda5d","analyzedAt":"2026-08-13T06:05:50.210Z","schemaVersion":2},"datasetVersion":"2026-08-13T09:17:06.757Z"}