Created attachment 141304 [details] File for testing (password: 1811) Problem description: When you choose to save your file with a password, it takes long time to save and open. Steps to reproduce: 1. Create a file with a large amount of contents. 2. Save your file with a password (Edit -> Save as). 3. Try to open it. Operating System: All Version: 6.1.0.0.alpha0+ Master
Created attachment 141305 [details] same file without password
Salim: you put "assigned", do you mean you're working on this as a dev?
yes
Ok, let's fill assignee field then.
opening the test file with password, it take 7.0 seconds and without 4.0 seconds a bit slow when switching between sheets and i think its because of the many chart on every sheet Version: 6.1.0.0.alpha0+ Build ID: 4ab0912cd214a4b0bdcbcdd2711b831dab9ca60a CPU threads: 8; OS: Linux 4.14; UI render: default; VCL: kde4; Locale: nl-BE (en_US.UTF-8); Calc: group
(In reply to Xavier Van Wijmeersch from comment #5) > opening the test file with password, it take 7.0 seconds and without 4.0 > seconds a bit slow when switching between sheets and i think its because of > the many chart on every sheet > > Version: 6.1.0.0.alpha0+ > Build ID: 4ab0912cd214a4b0bdcbcdd2711b831dab9ca60a > CPU threads: 8; OS: Linux 4.14; UI render: default; VCL: kde4; > Locale: nl-BE (en_US.UTF-8); Calc: group Hello, Try to add a simple modification to the file with password and save it. It will take a lot of time.
Yes, it hangs in Version: 6.1.0.0.alpha0+ Build ID: 24a57e2b854a1b8b3b8533ac72a6614ee29e374a CPU threads: 4; OS: Linux 4.13; UI render: default; VCL: gtk3; Locale: ca-ES (ca_ES.UTF-8); Calc: group
In previous versions like Version: 5.2.0.0.alpha0+ Build ID: 3ca42d8d51174010d5e8a32b96e9b4c0b3730a53 Threads 4; Ver: 4.10; Render: default; or Version: 4.3.0.0.alpha1+ Build ID: c15927f20d4727c3b8de68497b6949e72f9e6e9e it hangs at import time...
The import hang was fixed by author Mike Kaganski <mike.kaganski@collabora.com> 2017-11-07 13:33:48 +0300 committer Noel Grandin <noel.grandin@collabora.co.uk> 2017-11-07 14:26:11 +0100 commit f657454b69c813b90a8b3c1adb2feef1066dbd35 (patch) tree d1c57e8dc220ae1a5e7d1a2b49025685042318f3 parent 55d00081d0dc4cfa3361fa9da9389042f98773b5 (diff) tdf#31231: properly check for SvXMLImportFlags::ALL A regression from commit dc28e90d200a839d4017d548217ee5ce8a23f84 Adding Mike Kaganski to the loop in case Salim Habchi needs help to fix the export part...
Import = when you open the file ? Export = when you save the file ? Thank you very much, I will explore the tracks you gave me.
here is my commit on gerrit for this bug https://gerrit.libreoffice.org/#/c/53083/
I decreased the number of iterations in PBDFK2 because it was set to 100000 but it takes a lot of time to save a file (10 min). the problem comes from these iterations. I put the number of iterations to 1000. now it takes 10 sec to save a file. the derived key is sufficient for this type of files and it is very secure if you choose a good password. The informations below shows how long an attacker would take to cover the entire password space of a single salted hashed password. Complexity password * Comprehensive8: 4 hours 46 minutes * 8 random lowercase letters: 12 hours * 8 random letters: 123 days * 8 letters + digits + punctuation OR 4 random Diceware words: 325 years From: https://cryptosense.com/blog/parameter-choice-for-pbkdf2/ Other link: https://www.cloudberrylab.com/download/CloudBerry%20Lab%20Security%20Considerations.pdf If you want to test this patch with the old testing file you must save at least one time the file with this patch. I will add the same file with my patch.
Thorsten: noticing you had removed a similar loop in https://cgit.freedesktop.org/libreoffice/core/commit/?id=39805f65189cd0085fe8f1071ae75cdec450c65e, thought you might be interested in the patch proposed by Salim.
Created attachment 141448 [details] New file with patch (password: 1811)
See also bug 105844 comment 12 & 13
*** Bug 122060 has been marked as a duplicate of this bug. ***
*** Bug 122377 has been marked as a duplicate of this bug. ***
Dear Salim Habchi, To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year. There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present. If you have time, please do the following: Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/ If the bug is present, please leave a comment that includes the information from Help - About LibreOffice. If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice. Please DO NOT Update the version field Reply via email (please reply directly on the bug tracker) Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case) If you want to do more to help you can test to see if your issue is a REGRESSION. To do so: 1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/ 2. Test your bug 3. Leave a comment with your results. 4a. If the bug was present with 3.3 - set version to 'inherited from OOo'; 4b. If the bug was not present in 3.3 - add 'regression' to keyword Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa Thank you for helping us make LibreOffice even better for everyone! Warm Regards, QA Team MassPing-UntouchedBug
I have performed a re-test in the way as I had reported in bug 122060. Used version: Version: 7.2.5.1 / LibreOffice Community Build ID: 20(Build:1) CPU threads: 8; OS: Linux 5.3; UI render: default; VCL: kf5 (cairo+xcb) Locale: de-DE (de_DE.UTF-8); UI: de-DE Calc: threaded Test Result: Used file size (type ods): 76.1 KiB Save time: 6 - 7 seconds For comparison: A file with same content and password, but of type xlsx (size is 244 KiB), saves in about 2 seconds. A file with same content and without password, of type ods, saves in about 1 second. Conclusion: It behaves better now, but saving is still slow in comparison with an xlsx file. And I'd say it's still unacceptably slow for a file of such small size.