Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client side encryption v3 #87

Closed
wants to merge 265 commits into from
Closed

Client side encryption v3 #87

wants to merge 265 commits into from

Conversation

tcanabrava
Copy link
Contributor

@tcanabrava tcanabrava commented Dec 12, 2017

⚠️ Remove c04d1f1 before merge! ⚠️

Done:

  • Query the server for the Encrypted Support
  • Generate Keypair that will sign the encryption
  • Sign CSR Using Public Key
  • Upload Public Key to the server
  • Download Public Key from the server
  • Upload Private Key to the server
  • Download Public Key from the server
  • Use a Keychain to deal with the Keypair Locally
  • Request Encrypted status for a folder
  • Lock folder
  • Unlock Folder
  • Set Encrypted Status on the Folder
  • Set Unencrypted Status on the Folder
  • Create Empty Metadata
  • Upload Metadata to the server
  • Request Metadata
  • Encrypt Asymmetric
  • Decrypt Asymmetric
  • Encrypt Symetric
  • Decrypt Symetric

In Progress:

  • Upload the encrypted file.
  • Encrypt the file for upload
    • Simple function to do this committed

Not Started:

  • Download

  • Handle the metadata

  • setup the encrypted file for upload (luckly there will be no changes in the uploader itself)

  • finish upload, unlock folder.

Currently Completely Missing:

  • Download.
  • Should be somewhere around PropagateDownloadCommon
  • Lock / Unlock code can be stolen from PropagateUploadCommon
  • Metadata code should be mostly there.
  • Find out how to deal with the sync for encrypted folders as the file will be downloaded without requesting the encryption status, so only after the download is finished we can do something about that.

TODO:

  • Delete keys + mmonic on account deletion (@rullzer)

For some reason, this was working untill I added a call
to X509_REQ_get_subject_name, then the linking suddenly
stopped working (even tougth I'm using a ton of other
OpenSSL calls)

Force to link against 1.0
I still need to send it to the server. It's been a long
learning with the OpenSSL library.
Store it on memory, and discard it as soon as no longer
needed.
There's something wrong on the CSR job that I need to discover.
finally.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Enter a string list, return a string.
If we manage to encrypt and upload the private key
to the server, the client is in it's connected state.
This new job sets the Encryption Flag in a folder.
- change the name of one Qt Message Handler
- changed parameter from int to QString
This is already being called from somwhere else.
Since those networkjobs are all about client side
encryption, mvoe them to clientsideencryption.h
This will help with fewer conflicts with the origin.
Because nobody deservers to deal with Qt's JSON API
tcanabrava and others added 4 commits January 28, 2018 23:59
- TODO: Fix the incorrect "filename has been removed" popup.
The file is not removed, just the popup shows.
Android only creates the metadata file when the first encrypted file is
added. We assumed it would be there.

This hacky code makes us store the metadata if there wasn't any yet.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
rullzer and others added 14 commits January 30, 2018 11:10
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
See nextcloud/end_to_end_encryption_rfc#13

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
If the code was not complex enough syncing two tables
already started to give UNIQUE constrains errors on
simple sync operations, this also adds initial support
remote delete of an encrypted file
This has no use outside of the clientsidenecryption.cpp
@rullzer rullzer closed this Apr 26, 2018
@rullzer rullzer deleted the clientSideEncryptionV3 branch April 26, 2018 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants