{"record":{"id":"171ba5da3871ed28","repo":"gchq/CyberChef","slug":"could-not-identify-a-key-manager-171ba5","errorCode":null,"errorMessage":"Could not identify a key manager.","messagePattern":"Could not identify a key manager\\.","errorType":"exception","errorClass":"OperationError","httpStatus":null,"severity":"error","filePath":"src/core/operations/PGPVerify.mjs","lineNumber":99,"sourceCode":"                        }\n                        if (signer.comment) {\n                            text += `(${signer.comment}) `;\n                        }\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":81,"sourceCodeEnd":112,"githubUrl":"https://github.com/gchq/CyberChef/blob/4290ea753912378913b1f3f54e0fc5720afeda5d/src/core/operations/PGPVerify.mjs#L81-L112","documentation":"Same condition as 529 but in PGPVerify.run: kbpgp.unbox succeeded and get_data_signer() returned a signer, but get_key_manager() is null/falsy - the signing key could not be bound to an imported manager. Like 529, this throw (line 99) is inside the surrounding try and is re-wrapped by the catch at line 104, surfacing as 'Couldn't verify message: ...'.","triggerScenarios":"The signing key is not the one supplied, or the supplied key lacks the signing subkey; the signature references a key absent from the keyring; the data_signer has no resolvable key manager.","commonSituations":"Wrong or outdated signer public key; only an encryption subkey supplied; key fingerprint mismatch with the signature's issuer.","solutions":["Supply the exact signer public key matching the signature's key ID.","Import the full public key (primary + signing subkey).","Cross-check the key fingerprint against the signature issuer."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if (!/-----BEGIN PGP PUBLIC KEY BLOCK-----/.test(publicKey)) {\n    throw new Error('Supply the signer armoured public key before running.');\n}","typeGuard":null,"tryCatchPattern":"try {\n    out = await chef.PGPVerify(msg, [pub]);\n} catch (e) {\n    if (/identify a key manager|verify message/.test(e.message)) {\n        // signing key missing - supply the correct signer public key\n    } else throw e;\n}","preventionTips":["Supply the signer full public key (primary + subkeys).","Match the signature's key ID to the imported key.","Remember the verbatim message is wrapped by 'Couldn't verify message' in this operation."],"tags":["pgp","kbpgp","signature","cryptography"],"backgroundTag":null,"analyzedSha":"4290ea753912378913b1f3f54e0fc5720afeda5d","analyzedAt":"2026-08-13T06:05:50.210Z","schemaVersion":2},"datasetVersion":"2026-08-13T09:17:06.757Z"}