Gnupg - Passing Decryption To Application












1















When you decrypt a file with GnuPG with the -d option and the file is in ascii form, it simply scrolls down the screen and can be read. But what if it isn't an ascii file that was encrypted, but say a Word file (foo.doc.gpg). So I end up with a decrypted binary file (foo.doc) that scrolls down the screen, but is still unreadable.



What I'm asking, is there a single command using gpg -d... where the output is then read by Libre Office, which translates the .doc file to readable form which then scrolls down - ie I don't wish to save this file at any point to my hard drive if I can help it, owing to its sensitive data and possible security risk.



gpg -d /EncryptDir/foo.doc.gpg>foo && libreoffice foo && shred fooallows me to read the file as normal, and is then shredded once I close Libre Office, but it is temporarily saved to my drive while it is open (being read). Is there a more direct solution avoiding the temporary saving of foo?










share|improve this question

























  • Not a solution, but with the save-to-file scenario, how do you know you actually shred all the copies of the decrypted file? LibreOffice may well store it in a temporary file somewhere too. This might be an issue if you make LibreOffice read from a pipe somehow (which it doesn't seem to be able to do as far as I can see).

    – Kusalananda
    7 hours ago













  • what about libreoffice <(gpg -d /EncryptDir/foo.doc.gpg ) ? (I didn't test it, so I couldn't write as an answer)/

    – Archemar
    7 hours ago











  • @ Archemar. That doesn't work. It says error: cannot find file <(gpg -d...)

    – Paul Benson
    7 hours ago













  • @Kusalananda. Don't see what you mean. There is only one copy made by gpg when it decrypts a file - unless you are implying Libre Office makes hidden copies when it opens and closes files.

    – Paul Benson
    7 hours ago











  • @PaulBenson Many editors, including Vim for example, will save temporary data to disk while you are viewing and/or editing a file.

    – Kusalananda
    6 hours ago


















1















When you decrypt a file with GnuPG with the -d option and the file is in ascii form, it simply scrolls down the screen and can be read. But what if it isn't an ascii file that was encrypted, but say a Word file (foo.doc.gpg). So I end up with a decrypted binary file (foo.doc) that scrolls down the screen, but is still unreadable.



What I'm asking, is there a single command using gpg -d... where the output is then read by Libre Office, which translates the .doc file to readable form which then scrolls down - ie I don't wish to save this file at any point to my hard drive if I can help it, owing to its sensitive data and possible security risk.



gpg -d /EncryptDir/foo.doc.gpg>foo && libreoffice foo && shred fooallows me to read the file as normal, and is then shredded once I close Libre Office, but it is temporarily saved to my drive while it is open (being read). Is there a more direct solution avoiding the temporary saving of foo?










share|improve this question

























  • Not a solution, but with the save-to-file scenario, how do you know you actually shred all the copies of the decrypted file? LibreOffice may well store it in a temporary file somewhere too. This might be an issue if you make LibreOffice read from a pipe somehow (which it doesn't seem to be able to do as far as I can see).

    – Kusalananda
    7 hours ago













  • what about libreoffice <(gpg -d /EncryptDir/foo.doc.gpg ) ? (I didn't test it, so I couldn't write as an answer)/

    – Archemar
    7 hours ago











  • @ Archemar. That doesn't work. It says error: cannot find file <(gpg -d...)

    – Paul Benson
    7 hours ago













  • @Kusalananda. Don't see what you mean. There is only one copy made by gpg when it decrypts a file - unless you are implying Libre Office makes hidden copies when it opens and closes files.

    – Paul Benson
    7 hours ago











  • @PaulBenson Many editors, including Vim for example, will save temporary data to disk while you are viewing and/or editing a file.

    – Kusalananda
    6 hours ago
















1












1








1








When you decrypt a file with GnuPG with the -d option and the file is in ascii form, it simply scrolls down the screen and can be read. But what if it isn't an ascii file that was encrypted, but say a Word file (foo.doc.gpg). So I end up with a decrypted binary file (foo.doc) that scrolls down the screen, but is still unreadable.



What I'm asking, is there a single command using gpg -d... where the output is then read by Libre Office, which translates the .doc file to readable form which then scrolls down - ie I don't wish to save this file at any point to my hard drive if I can help it, owing to its sensitive data and possible security risk.



gpg -d /EncryptDir/foo.doc.gpg>foo && libreoffice foo && shred fooallows me to read the file as normal, and is then shredded once I close Libre Office, but it is temporarily saved to my drive while it is open (being read). Is there a more direct solution avoiding the temporary saving of foo?










share|improve this question
















When you decrypt a file with GnuPG with the -d option and the file is in ascii form, it simply scrolls down the screen and can be read. But what if it isn't an ascii file that was encrypted, but say a Word file (foo.doc.gpg). So I end up with a decrypted binary file (foo.doc) that scrolls down the screen, but is still unreadable.



What I'm asking, is there a single command using gpg -d... where the output is then read by Libre Office, which translates the .doc file to readable form which then scrolls down - ie I don't wish to save this file at any point to my hard drive if I can help it, owing to its sensitive data and possible security risk.



gpg -d /EncryptDir/foo.doc.gpg>foo && libreoffice foo && shred fooallows me to read the file as normal, and is then shredded once I close Libre Office, but it is temporarily saved to my drive while it is open (being read). Is there a more direct solution avoiding the temporary saving of foo?







gpg libreoffice






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 7 hours ago







Paul Benson

















asked 7 hours ago









Paul BensonPaul Benson

1313




1313













  • Not a solution, but with the save-to-file scenario, how do you know you actually shred all the copies of the decrypted file? LibreOffice may well store it in a temporary file somewhere too. This might be an issue if you make LibreOffice read from a pipe somehow (which it doesn't seem to be able to do as far as I can see).

    – Kusalananda
    7 hours ago













  • what about libreoffice <(gpg -d /EncryptDir/foo.doc.gpg ) ? (I didn't test it, so I couldn't write as an answer)/

    – Archemar
    7 hours ago











  • @ Archemar. That doesn't work. It says error: cannot find file <(gpg -d...)

    – Paul Benson
    7 hours ago













  • @Kusalananda. Don't see what you mean. There is only one copy made by gpg when it decrypts a file - unless you are implying Libre Office makes hidden copies when it opens and closes files.

    – Paul Benson
    7 hours ago











  • @PaulBenson Many editors, including Vim for example, will save temporary data to disk while you are viewing and/or editing a file.

    – Kusalananda
    6 hours ago





















  • Not a solution, but with the save-to-file scenario, how do you know you actually shred all the copies of the decrypted file? LibreOffice may well store it in a temporary file somewhere too. This might be an issue if you make LibreOffice read from a pipe somehow (which it doesn't seem to be able to do as far as I can see).

    – Kusalananda
    7 hours ago













  • what about libreoffice <(gpg -d /EncryptDir/foo.doc.gpg ) ? (I didn't test it, so I couldn't write as an answer)/

    – Archemar
    7 hours ago











  • @ Archemar. That doesn't work. It says error: cannot find file <(gpg -d...)

    – Paul Benson
    7 hours ago













  • @Kusalananda. Don't see what you mean. There is only one copy made by gpg when it decrypts a file - unless you are implying Libre Office makes hidden copies when it opens and closes files.

    – Paul Benson
    7 hours ago











  • @PaulBenson Many editors, including Vim for example, will save temporary data to disk while you are viewing and/or editing a file.

    – Kusalananda
    6 hours ago



















Not a solution, but with the save-to-file scenario, how do you know you actually shred all the copies of the decrypted file? LibreOffice may well store it in a temporary file somewhere too. This might be an issue if you make LibreOffice read from a pipe somehow (which it doesn't seem to be able to do as far as I can see).

– Kusalananda
7 hours ago







Not a solution, but with the save-to-file scenario, how do you know you actually shred all the copies of the decrypted file? LibreOffice may well store it in a temporary file somewhere too. This might be an issue if you make LibreOffice read from a pipe somehow (which it doesn't seem to be able to do as far as I can see).

– Kusalananda
7 hours ago















what about libreoffice <(gpg -d /EncryptDir/foo.doc.gpg ) ? (I didn't test it, so I couldn't write as an answer)/

– Archemar
7 hours ago





what about libreoffice <(gpg -d /EncryptDir/foo.doc.gpg ) ? (I didn't test it, so I couldn't write as an answer)/

– Archemar
7 hours ago













@ Archemar. That doesn't work. It says error: cannot find file <(gpg -d...)

– Paul Benson
7 hours ago







@ Archemar. That doesn't work. It says error: cannot find file <(gpg -d...)

– Paul Benson
7 hours ago















@Kusalananda. Don't see what you mean. There is only one copy made by gpg when it decrypts a file - unless you are implying Libre Office makes hidden copies when it opens and closes files.

– Paul Benson
7 hours ago





@Kusalananda. Don't see what you mean. There is only one copy made by gpg when it decrypts a file - unless you are implying Libre Office makes hidden copies when it opens and closes files.

– Paul Benson
7 hours ago













@PaulBenson Many editors, including Vim for example, will save temporary data to disk while you are viewing and/or editing a file.

– Kusalananda
6 hours ago







@PaulBenson Many editors, including Vim for example, will save temporary data to disk while you are viewing and/or editing a file.

– Kusalananda
6 hours ago












0






active

oldest

votes











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f505500%2fgnupg-passing-decryption-to-application%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f505500%2fgnupg-passing-decryption-to-application%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Histoire des bourses de valeurs

Why is there Russian traffic in my log files?

Rename multiple files to decrement number in file name?