Bug 117928 - Cannot open encrypted file using PGP
Summary: Cannot open encrypted file using PGP
Status: RESOLVED DUPLICATE of bug 121140
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
6.0.4.2 release
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-31 10:52 UTC by robinxcollins
Modified: 2018-11-11 23:44 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description robinxcollins 2018-05-31 10:52:16 UTC
Description:
Refers to Closed bug #114550
Using Libreoffice 6.04 it is not possible to open a file that has just been saved using GPG key.

Steps to Reproduce:
1.Create spreadsheet in Calc
2.Save using Encrypt with GPG Key
3.Attempt to open file
4.Enter passphrase for key

Actual Results:  
Response:-
The password is incorrect. The file cannot be opened.

I have re-set passphrase on key and retried - no difference.

Expected Results:
Should have opened file in Calc


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Version: 6.0.4.2
Build ID: 1:6.0.4~rc2-0ubuntu0.16.04.1
CPU threads: 2; OS: Linux 4.4; UI render: default; VCL: gtk2; 
Locale: en-GB (en_GB.UTF-8); Calc: group

GL is currently disabled


User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.9) Gecko/20100101 Goanna/3.4 Firefox/52.9 PaleMoon/27.9.2
Comment 1 Xisco Faulí 2018-05-31 11:03:49 UTC
Are you using 6.0.4 version to encrypt it or it was encrypted in a previous version of LibreOffice?
Comment 2 robinxcollins 2018-05-31 11:43:45 UTC
This is a new installation with no previous LO packages.
Encryption has not been used before on any files.
New GPG key - it was originally 4096 bit RSA
I have tried with 2048 bit as well - same result
Comment 3 robinxcollins 2018-06-01 06:21:34 UTC
UPDATE:-
The saved file format seems to have a bearing on this.
Save calc file using .ods
Check Encrypt with PGP
Select key file - file saved.
Open file and prompt box appears requesting passphrase for that key.
File opens as expected.
HOWEVER - that key then seems to remain cached as even after logout/in it is then possible to access the file without any passphrase prompt.

If instead the file is saved using .xls format, the passphrase box that appears on re-opening the file seems to be the one used by Password Protect, not the one that specifically mention the encryption key.

So it may be that you cannot encrypt files using an external PgP key unless they are odf - in which case that option should vanish if a non-odf format is selected.

However it should not be possible to re-open an encrypted file without a key prompt.
Comment 4 Thorsten Behrens (allotropia) 2018-11-11 23:44:02 UTC
The remaining part (confusingly gpg encrypt is enabled) is duplicate to bug 121140.

The fact that passwords for GPG keys are cached for a while is a feature of the gpg agent, and can be configured there (default is something like 10 minutes).

*** This bug has been marked as a duplicate of bug 121140 ***