Offline Decryption

Decrypt files locally using a Futurecrypt decryption key

# Step 1: Determine the Key ID of the Key used to encrypt the file:
# (attempt to decrypt file without key: gpg --keyid-format long --decrypt "$FILE_TO_DECRYPT")
FC_KEYID=$(gpg --keyid-format long --decrypt "$FILE_TO_DECRYPT" 2>&1 | grep -o "[A-F0-9]\{16\}")
# Step 2 (Optional): Get the Decryption date and time
echo "Local decryption date and time:" $(date --d @"$FC_KEYDATE")
echo "UTC decryption date and time:" $(date -u -d @"$FC_KEYDATE")
# Step 3: Get the Decryption Key (Private Key)
# This will only work after the decryption date and time!
# This will only work for keys that have not been revoked!
# Please do not attempt to download keys faster than 1/second -
# Our denial-of-service protection may temporarily block your IP address.
sleep 1
gpg --import "$FC_KEYFILE"
# Step 4: Decrypt the file
DECRYPTED_FILE=$(echo "$FILE_TO_DECRYPT" | sed "s/._Futurecrypt.*//")
echo "Decrypted file:" $DECRYPTED_FILE
gpg --yes --output "$DECRYPTED_FILE" --decrypt "$FILE_TO_DECRYPT"
Decrypt Online