harbor run -t LiteCoder/gpg-decrypt-key-analysisharbor download LiteCoder/gpg-decrypt-key-analysisYou are given a GPG-encrypted message and a backup archive containing key-ring material. Your task is to extract the private key, import it, decrypt the message, verify its signature, and produce structured output summarizing the results.
gpg, tar, standard shell utilities, and any scripting language available on the system/app/app/secret_message.gpg — A GPG-encrypted (and possibly signed) file intended for the target user./app/backup_keys.tar.gz — A tar.gz archive containing the target user's GPG key-ring backup (private and public keys)./app/backup_keys.tar.gz) and locate the key-ring data inside it./app/secret_message.gpg and save the plaintext to /app/decrypted_message.txt./app/result.json./app/decrypted_message.txtThe raw plaintext content of the decrypted message, with no extra formatting added.
/app/result.jsonA JSON object with the following structure:
{
"key_info": {
"user_id": "<Name and/or email from the key's UID>",
"fingerprint": "<Full 40-character uppercase hex fingerprint of the primary key>",
"key_type": "<Algorithm, e.g. RSA, DSA, ECC, ed25519>",
"key_size": <integer, key size in bits, e.g. 2048, 4096>
},
"decryption": {
"success": true,
"plaintext_file": "decrypted_message.txt"
},
"signature": {
"present": <boolean, true if the message was signed>,
"valid": <boolean, true if signature verification succeeded; false if verification failed; null if no signature>,
"signer_id": "<UID of the signer if signature is present, otherwise null>"
},
"archive_contents": ["<list of relative file paths found inside backup_keys.tar.gz>"],
"cleanup_done": <boolean, true if the imported private key was removed after operations>
}
fingerprint field must be the full 40-hex-character fingerprint in uppercase with no spaces.key_size must be an integer (not a string).archive_contents must list all file paths as they appear inside the tar archive.decryption.success to false and plaintext_file to null, and still produce result.json.signature.present to false, signature.valid to null, and signature.signer_id to null.