Gnupg - Passing Decryption To Application
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
add a comment |
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
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 aboutlibreoffice <(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
add a comment |
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
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
gpg libreoffice
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 aboutlibreoffice <(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
add a comment |
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 aboutlibreoffice <(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
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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