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

Support for e2e key backups #736

Merged
merged 85 commits into from
Nov 21, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
fb1b554
initial pseudocode WIP for e2e online backups
ara4n Jan 15, 2018
e0c9b99
blindly move crypto.suggestKeyRestore over to /sync
ara4n Jan 18, 2018
69204d4
Merge branch 'develop' into matthew/e2e_backups
ara4n May 27, 2018
d556189
initial implementation of e2e key backup and restore
uhoreg Aug 8, 2018
1faf477
fix formatting and fix authedRequest usage
uhoreg Aug 23, 2018
fb8efe3
initial draft of API for working with backup versions
uhoreg Aug 23, 2018
75107f9
pass in key rather than decryption object to restoreKeyBackups
uhoreg Aug 23, 2018
e5ec479
check that crypto is enabled
uhoreg Aug 23, 2018
73e294b
add copyright header to backup.spec
uhoreg Aug 23, 2018
ec5fff2
Merge branch 'e2e_backups' of git://github.com/uhoreg/matrix-js-sdk i…
dbkr Aug 24, 2018
017f81e
fix some bugs
uhoreg Aug 24, 2018
bf873bd
split the backup version creation into two different methods
uhoreg Aug 25, 2018
29db856
Merge branch 'e2e_backups' of git://github.com/uhoreg/matrix-js-sdk i…
dbkr Sep 11, 2018
72bd51f
Merge remote-tracking branch 'origin/develop' into uhoreg-e2e_backups
dbkr Sep 11, 2018
3838fab
WIP e2e key backup support
dbkr Sep 13, 2018
e789747
Check sigs on e2e backup & enable it if we can
dbkr Sep 14, 2018
073fb73
Make multi-room key restore work
dbkr Sep 17, 2018
009430e
Add isValidRecoveryKey
dbkr Sep 17, 2018
f75d188
Soe progress on linting
dbkr Sep 17, 2018
3af9af9
More linting
dbkr Sep 17, 2018
54c443a
Make tests pass
dbkr Sep 18, 2018
e4bb37b
Fix lint mostly
dbkr Sep 18, 2018
0bad7b2
Fix lint
dbkr Sep 18, 2018
a78825e
Bump to Olm 2.3.0 for PkEncryption
dbkr Sep 18, 2018
1b62a21
Free PkEncryption/Decryption objects
dbkr Sep 18, 2018
2f4c1df
Test all 3 code paths on backup restore
dbkr Sep 18, 2018
e9b0aca
Merge remote-tracking branch 'origin/develop' into dbkr/e2e_backups
dbkr Oct 2, 2018
ce2058a
Merge branch 'dbkr/wasm' into dbkr/e2e_backups
dbkr Oct 2, 2018
7cd101d
Fix recovery key format
dbkr Oct 2, 2018
262ace1
commit the recovery key util file
dbkr Oct 3, 2018
258adda
retry key backups when they fail
uhoreg Oct 4, 2018
89c3f6f
Merge remote-tracking branch 'origin/develop' into dbkr/e2e_backups
dbkr Oct 5, 2018
b3fe05e
Merge remote-tracking branch 'origin/develop' into dbkr/e2e_backups
dbkr Oct 9, 2018
59e6066
Replace base58check with a simple parity check
dbkr Oct 9, 2018
ada4b6e
Lint
dbkr Oct 9, 2018
da65f43
wrap backup sending in a try, and add delays
uhoreg Oct 10, 2018
fc59bc2
add localstorage support for key backups
uhoreg Oct 10, 2018
3957006
Merge remote-tracking branch 'upstream/dbkr/e2e_backups' into e2e_bac…
uhoreg Oct 11, 2018
9b12c22
de-lint plus some minor fixes
uhoreg Oct 12, 2018
91fb7b0
fix unit tests for backup recovery
uhoreg Oct 12, 2018
d49c0a1
more de-linting and fixing
uhoreg Oct 12, 2018
40d0a82
remove accidental change to eslintrc
uhoreg Oct 12, 2018
434ac86
properly fill out the is_verified and first_message_index fields
uhoreg Oct 19, 2018
322ef1f
update backup algorithm name to agree with the proposal
uhoreg Oct 22, 2018
f165b55
Merge branch 'e2e_backups' of git://github.com/uhoreg/matrix-js-sdk i…
dbkr Oct 24, 2018
40cb37e
Update to Olm 3
dbkr Oct 24, 2018
5e8061f
Merge remote-tracking branch 'origin/develop' into dbkr/e2e_backups
dbkr Oct 25, 2018
243bab7
Merge branch 'dbkr/stop_devicelist' into dbkr/e2e_backups
dbkr Oct 25, 2018
b3bb99d
Stop client after backup tests
dbkr Oct 25, 2018
a6bf40d
We can always import these now
dbkr Oct 25, 2018
0e26247
Speed up time rather than increasing timeouts
dbkr Oct 26, 2018
6518bff
Merge remote-tracking branch 'origin/develop' into dbkr/e2e_backups
dbkr Oct 26, 2018
563e6b3
Fix jsdoc
dbkr Oct 26, 2018
3b2f2f9
Bump db version
dbkr Oct 26, 2018
e51d2dd
Fix a few e2e backup bits
dbkr Oct 30, 2018
a2430db
Fix DeviceList index of users by identity key
dbkr Oct 30, 2018
2814932
lint
dbkr Oct 30, 2018
8ab84de
PR feedback 1/n
dbkr Oct 31, 2018
c6ad066
factor out duplicated test code
dbkr Oct 31, 2018
2b46c56
Add crypto. prefix to keyBackupStatus event
dbkr Oct 31, 2018
c5e7bed
Conclusion: no, it shouldn't
dbkr Oct 31, 2018
f5846b8
More modern loop syntax
dbkr Oct 31, 2018
6de2134
Change getDeviceByIdentityKey() to just the 2 arg version
dbkr Oct 31, 2018
5c5ce0d
Typo
dbkr Oct 31, 2018
db2897c
Remove spurious interlopers
dbkr Oct 31, 2018
c77ecad
clarify comment
dbkr Oct 31, 2018
7c0b910
remove unnecessary isFinite check
dbkr Oct 31, 2018
63e9f79
Remove unnecessary if
dbkr Oct 31, 2018
2f219f8
Catch exceptions from backupGroupSession()
dbkr Oct 31, 2018
5e98859
random double linebreak
dbkr Oct 31, 2018
2af5643
Clarify comment
dbkr Oct 31, 2018
c7a0c14
refer to getAllEndToEndInboundGroupSessions for magic numbers
dbkr Oct 31, 2018
0477f35
Fix key forwarded count
dbkr Oct 31, 2018
29d92d3
Lint
dbkr Oct 31, 2018
379f290
Add package-lock.json
dbkr Nov 13, 2018
907cf19
Merge remote-tracking branch 'origin/develop' into dbkr/e2e_backups
dbkr Nov 15, 2018
c53c6a9
Update package-lock
dbkr Nov 15, 2018
d99a22d
Update to new API
dbkr Nov 16, 2018
44d9927
Support passphrase-based e2e key backups
dbkr Nov 20, 2018
cb51799
Make backup restore work
dbkr Nov 20, 2018
6047838
lint
dbkr Nov 20, 2018
eeea706
Add randomString factored out from client secret
dbkr Nov 20, 2018
abd2ac7
Rename backup API call in test
dbkr Nov 20, 2018
092f421
docs
dbkr Nov 21, 2018
bd2cf18
Merge pull request #786 from matrix-org/dbkr/e2e_backups_passphrase
dbkr Nov 21, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7,124 changes: 7,124 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
"babel-runtime": "^6.26.0",
"bluebird": "^3.5.0",
"browser-request": "^0.3.3",
"bs58": "^4.0.1",
"content-type": "^1.0.2",
"loglevel": "1.6.1",
"qs": "^6.5.2",
Expand Down
3 changes: 1 addition & 2 deletions spec/unit/crypto.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ describe("Crypto", function() {

mockBaseApis = {
sendToDevice: expect.createSpy(),
getKeyBackupVersion: expect.createSpy(),
};
mockRoomList = {};

Expand Down Expand Up @@ -111,9 +112,7 @@ describe("Crypto", function() {
getSender: expect.createSpy().andReturn('@bob:home.server'),
});

console.log("waiting");
await prom;
console.log("done");
});
});
});
Loading