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

E2EE: Introduce EncryptionManager with uploadIdentityKeys and uploadOneTimeKeys API. #329

Merged
merged 13 commits into from
Jul 7, 2019

Conversation

a-andreyev
Copy link
Contributor

Fxrh and others added 2 commits June 25, 2019 14:48
This allows to detect if a room has been encrypted (no room state, just
an event as of yet). Closes quotient-im#84.
Copy link
Member

@KitsuneRal KitsuneRal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for a great start! This is part 1 of the review, only dealing with code organisation but not with the source code itself. You've got some work to do before this can be merged :)

.gitmodules Outdated Show resolved Hide resolved
.gitmodules Outdated Show resolved Hide resolved
.travis.yml Outdated Show resolved Hide resolved
.travis.yml Outdated Show resolved Hide resolved
CMakeLists.txt Outdated Show resolved Hide resolved
CMakeLists.txt Outdated Show resolved Hide resolved
@a-andreyev a-andreyev force-pushed the aa13q-e2ee-enc-mng branch 3 times, most recently from 45d417b to 2939a05 Compare June 26, 2019 15:49
Copy link
Member

@KitsuneRal KitsuneRal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few comments on the source code. Might bring more, but first let's deal with the base class of EncryptionEvent.

lib/events/encryptionevent.h Outdated Show resolved Hide resolved
lib/events/simplestateevents.h Outdated Show resolved Hide resolved
lib/room.cpp Outdated Show resolved Hide resolved
lib/settings.cpp Outdated Show resolved Hide resolved
lib/settings.cpp Outdated Show resolved Hide resolved
lib/settings.cpp Outdated Show resolved Hide resolved
@a-andreyev a-andreyev force-pushed the aa13q-e2ee-enc-mng branch 6 times, most recently from a5e444c to ee6281e Compare June 28, 2019 00:07
Copy link
Member

@KitsuneRal KitsuneRal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I finally really got to seriously reviewing your code - and you've got more work as a result :)

.gitmodules Show resolved Hide resolved
lib/connection.cpp Outdated Show resolved Hide resolved
lib/encryptionmanager.cpp Outdated Show resolved Hide resolved
lib/encryptionmanager.cpp Outdated Show resolved Hide resolved
lib/encryptionmanager.cpp Outdated Show resolved Hide resolved
lib/encryptionmanager.cpp Outdated Show resolved Hide resolved
lib/encryptionmanager.cpp Outdated Show resolved Hide resolved
lib/encryptionmanager.cpp Outdated Show resolved Hide resolved
lib/encryptionmanager.cpp Outdated Show resolved Hide resolved
Copy link
Member

@KitsuneRal KitsuneRal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, a few last brushes and it seems we're good to go.

lib/connection.cpp Outdated Show resolved Hide resolved
lib/encryptionmanager.cpp Show resolved Hide resolved
lib/encryptionmanager.cpp Show resolved Hide resolved
lib/events/encryptionevent.h Outdated Show resolved Hide resolved
lib/events/encryptionevent.h Outdated Show resolved Hide resolved
@a-andreyev a-andreyev force-pushed the aa13q-e2ee-enc-mng branch 2 times, most recently from d02c250 to 14c0437 Compare July 3, 2019 20:44
Copy link
Member

@KitsuneRal KitsuneRal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...and a few more brushes below, to satisfy CI.

By the way, Travis fails because https://stackoverflow.com/questions/50061678/cmake-the-following-imported-targets-are-referenced-but-are-missing. cmake/QMatrixClientConfig.cmake is already there, you just have to add the dependency there, as described in the answer.

CMakeLists.txt Show resolved Hide resolved
lib/encryptionmanager.cpp Show resolved Hide resolved
.travis.yml Show resolved Hide resolved
@a-andreyev a-andreyev force-pushed the aa13q-e2ee-enc-mng branch 3 times, most recently from f13cc71 to a5a8d88 Compare July 4, 2019 08:34
@a-andreyev
Copy link
Contributor Author

https://stackoverflow.com/questions/50061678/cmake-the-following-imported-targets-are-referenced-but-are-missing

tried to follow the logic (also tried with QtOlmConfig.cmake), no luck yet. I got stuck a bit with the CI, but the local build is working. So I'm focusing at next main tasks (but would be happy to check some more hints and fix the CI too :)

@KitsuneRal
Copy link
Member

tried to follow the logic (also tried with QtOlmConfig.cmake), no luck yet. I got stuck a bit with the CI, but the local build is working. So I'm focusing at next main tasks (but would be happy to check some more hints and fix the CI too :)

Yep, don't spend more time on this. Looking forward to messages receiving code.

static const auto ed25519Name = QStringLiteral("ed25519");
static const auto Curve25519Name = QStringLiteral("curve25519");
static const auto SignedCurve25519Name = QStringLiteral("signed_curve25519");
static const auto OlmCurve25519AesSha256AlgoName = QStringLiteral("m.olm.curve25519-aes-sha256");
Copy link
Contributor Author

@a-andreyev a-andreyev Jul 6, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note to myself

found an issue with the naming: https://github.com/matrix-org/matrix-doc/issues/1733#issuecomment-446179169 (point 2)

@KitsuneRal KitsuneRal force-pushed the aa13q-e2ee-enc-mng branch 2 times, most recently from 1a48753 to 93044c7 Compare July 7, 2019 04:31
@KitsuneRal
Copy link
Member

Congratulations, the first E2EE PR comes in :)

@KitsuneRal KitsuneRal merged commit 6c9d895 into quotient-im:master Jul 7, 2019
@a-andreyev a-andreyev added E2EE End-to-end encryption is affected GSoC2019 labels Aug 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E2EE End-to-end encryption is affected
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants