nextcloud / desktop

💻 Desktop sync client for Nextcloud
https://nextcloud.com/install/#install-clients
GNU General Public License v2.0
2.97k stars 784 forks source link

Nextcloud Android client not able to decrypt E2EE folder shared with another user #2490

Closed Freeedim closed 3 years ago

Freeedim commented 3 years ago

Steps to reproduce

First possibility (dialog between two Desktop clients from two different users, ona also having an Android client)

  1. User A creates a folder and shares it with user B, both on Desktop clients, any one of A and B also having an Android client.
  2. Make the folder encrypted. The only way to it to date: a. B marks the folder as encrypted in their desktop client b. B drops a dummy file in the encrypted shared folder in the desktop's synced folder c. A drops a file in the in the encrypted shared folder in the desktop's synced folder
  3. The user having an Android client syncs it and opens the folder. The password is asked and the only accepted one is the one provided by that user's desktop client.
  4. Inside the folder in the Android client, files have encrypted names and cannot be decrypted (when the encrypted folder was never shared, the Android client decrypts files and their names)

Second possibility (direct dialog between a desktop and an Android clients)

Same except B specifically has the Android client steps 2a and 2b are carried out in the Android client. When 2c is achieved and the sync is done, the dummy file in the encrypted shared folder in the Android client is suddenly encrypted.

Expected behaviour

Actual behaviour

Can you reproduce this problem on https://try.nextcloud.com?

That test instance does not have E2EE enabled.

Environment data

Android version: 10

Device model: Motorola Moto G8 Power

Stock or customized system: Stock and fresh

Nextcloud app version: 3.13.1

Nextcloud server version: 19.0.3

Reverse proxy: No

Logs

Are the logs accessible in Android?

Web server error log

I don't have access to the web server. It is provided by a company.

Nextcloud log (data/nextcloud.log)

I don't have access to the web server. It is provided by a company.

Insert your Nextcloud log here I don't know what this refers to.

tobiasKaminsky commented 3 years ago
2\. Make the folder encrypted. The only way to it to date:
    a. B marks the folder as encrypted in their desktop client

@er-vin this then is a bug. Desktop should not allow empty, but shared folders to be set as encrypted.

@Freeedim sharing is not yet supported.

Freeedim commented 3 years ago

@tobiasKaminsky Are you saying that the only way to make a major feature that is advertised on Nextcloud's website is through a bug? I am really confused.

I have spent many full days in trying to figure out how it works because my company is purchasing a Nextcloud instance on the basis that the website states E2EE and sharing of E2EE folders are now production-ready.

Edit: See https://help.nextcloud.com/t/is-it-possible-to-share-an-e2ee-encrypted-folder/90897

There is no doc but I found a (wonky) way to make it work, and now it will be removed because it should not actually work??

For the record, here is what is stated in https://nextcloud.com/encryption/ :

Seamless End-to-end Encryption on the clients

Nextcloud features an enterprise-grade, seamlessly integrated solution for end-to-end encryption. It enables users to pick one or more folders on their desktop or mobile client for end-to-end encryption. Folders can be shared with other users and synced between devices but are never readable by the server.

This solution is easy to use yet extremely secure thanks to its Zero-Knowledge server design and Cryptographic Identity Protection. It does not compromise security by using a browser to encrypt or decrypt files with code coming from the server and is not an all-or-nothing affair: any number of folders can be end-to-end encrypted. Sharing is secure without a need to exchange passwords and files don't need to be re-encrypted and re-uploaded when access rights for other users are changed.

Our solution is enterprise ready with support for a Hardware Security Module for issuing certificates, giving access to a full audit log and optionally allowing administrators to create an offline master recovery key.

er-vin commented 3 years ago

@er-vin this then is a bug. Desktop should not allow empty, but shared folders to be set as encrypted.

And I guess sharing of encrypted folders should be prevented as well. I don't think it's the case right now.

Freeedim commented 3 years ago

And I guess sharing of encrypted folders should be prevented as well. I don't think it's the case right now.

I agree sharing an already encrypted folder will not be possible (adding a public key may be impossible or too difficult). But sharing a folder, then encrypting it for everyone to have a safe shared vault should be possible. OwnCloud even has specific (wonky) add-on for this.

Freeedim commented 3 years ago

@er-vin Hi, I may have found the contrary of your statement on Nextcoud's web site, unless I did not understand well:

nextcoud com-endtoend

jospoortvliet commented 3 years ago

Let me update the website. I've made this clear in the blog, but our site is indeed not correct in this...

Freeedim commented 3 years ago

Let me update the website. I've made this clear in the blog, but our site is indeed not correct in this...

I found the blog was quite confusing as well. There is an extensive description of all the functionalities, blending actually implemented ones and not yet implemented ones at the same level, using present tense and words like "users can share encrypted folders with other users". Then several paragraphs later, in a paragraph dealing with additional details like where to learn more or which versions do you need etc., which many won't carefully read, there is this:

Sharing between users is not yet implemented and on the roadmap for 2021.

I think implemented features and planned features should not be described equally, together, in the same paragraph, without any warning to differentiate them. As far as i am concerned, it would have been much clearer if there was a section describing what is actually implemented and another about what is planned.

github-actions[bot] commented 3 years ago

This bug report did not receive an update in the last 4 weeks. Please take a look again and update the issue with new details, otherwise the issue will be automatically closed in 2 weeks. Thank you!

J0WI commented 3 years ago

This is still reproducible @nextcloud/encryption

github-actions[bot] commented 3 years ago

This bug report did not receive an update in the last 4 weeks. Please take a look again and update the issue with new details, otherwise the issue will be automatically closed in 2 weeks. Thank you!

J0WI commented 3 years ago

bump

github-actions[bot] commented 3 years ago

This bug report did not receive an update in the last 4 weeks. Please take a look again and update the issue with new details, otherwise the issue will be automatically closed in 2 weeks. Thank you!

github-actions[bot] commented 3 years ago

This bug report did not receive an update in the last 4 weeks. Please take a look again and update the issue with new details, otherwise the issue will be automatically closed in 2 weeks. Thank you!

J0WI commented 3 years ago

bump

Freeedim commented 3 years ago

Let me update the website. I've made this clear in the blog, but our site is indeed not correct in this...

It seems the web site is still misleading 9 months later...

jospoortvliet commented 3 years ago

Let me update the website. I've made this clear in the blog, but our site is indeed not correct in this...

It seems the web site is still misleading 9 months later...

The top of the page has this:

Note: our end-to-end encryption solution is under constant development. Some features part of the design have not yet been implemented in the client or server code. In particular, as of January 2021, offline recovery, sharing and HSM features are on the roadmap.

The page was optimistically written to cover the design of E2EE, while we were still implementing it (and under the belief it would take a few months). The team has grown a lot but sadly we are now bottlenecked on being able to actually meet in person to hash out the sharing details - covid has caused more delay. I still hope the introduction of this feature is 3-6 months away so I don't have to rewrite the entire page twice, which is a lot of work, to account for changes in the status.

Edit: discussed shortly with colleague. A quick fix: add a mention of roadmap behind the features. Done that, should address the issue.

mgallien commented 3 years ago

Currently none of the bugs reported against desktop client can be reproduced. All issues have been fixed. I am closing the ticket now. Thanks

zylstra commented 3 years ago

@jospoortvliet is your note (here, https://nextcloud.com/endtoend/) a joke? Every part of Nextcloud's E2EE, with the possible flaky exception of encryption for sharing with oneself, is worthless: https://help.nextcloud.com/t/implement-end-to-end-encryption-on-nextcloud/118281 .

https://nextcloud.com/endtoend/ https://nextcloud.com/encryption/

Freeedim commented 3 years ago

@jospoortvliet As @zylstra points, there are still web pages where the language is fully misleading. That degree of lag between advertisement and facts cannot be called "optimistically written" any more. A couple of weeks (maybe months) could have. If we count the time where e2ee was already advertised whereas the plugin page was (rightfully) mentioning it was actually in alpha, there has been years of "optimistic claim". I think Nextcloud ecosystem is very capable, one of the best in the world in technical terms. But I think the way Nextcloud communicates with the public should be completely reworked. No one would blame Nextcloud for not having a production-ready e2ee with shareable folders in 2021. Many would blame it for claiming they have it when they don't. All would blame it for calling that year-lasting false claim an "optimimistic writing". I believe it is true! I believe it was truly written in an optimistic spirit and then left there all that time in good faith. But leaving it there for such a long time, even in good faith, appears to me as a professional fault and continuing to deny or minimise that fault instead of recognising it (which would be the first step to then fix it) appears to me as another fault and a lack of transparency.

zylstra commented 3 years ago

For me, Nextcloud has lost almost all integrity. I started using it a couple months ago, but I will stop using it and stop contributing to the community.

github-actions[bot] commented 3 years ago

This bug report did not receive an update in the last 4 weeks. Please take a look again and update the issue with new details, otherwise the issue will be automatically closed in 2 weeks. Thank you!

mgallien commented 3 years ago

For me, Nextcloud has lost almost all integrity. I started using it a couple months ago, but I will stop using it and stop contributing to the community.

Hi, I would like to point out that we are a community project and want to keep this a place that is nice and positive for everyone.

I am not sure your comment will help in any way to improve the desktop client. But as a newcomer I would feel afraid of interacting with a community where such comments are the norm.

These kind of comments are not welcome. Please try to be more respectful going forward, see our Code of Conduct for the why and what: https://nextcloud.com/code-of-conduct/

mgallien commented 3 years ago

closing again because I feel like nothing technical is left

zylstra commented 3 years ago

How is there nothing technical left?! E2EE is non-functional. What's left is to make it functional. I don't know any plainer way to say it.

J0WI commented 3 years ago

The steps to reproduce in the initial report are still valid.

ChojinDSL commented 2 months ago

At the very least make it clear in the documentation about the status of what works and what doesn't in regards to E2EE.