Hocuri
479a5632fb
feat: Make reacting to v2 invites generic over the type of the invite (contact/group/broadcast)
2025-09-03 17:56:13 +02:00
Hocuri
9dc590cb35
feat: Rename vb-request-v2 -> vb-request-with-auth
...
Turns out that Alice reacts to a request-v2 message in exactly the same
way as to a request-with-auth message. So, no need to distinguish here.
2025-09-03 17:56:13 +02:00
Hocuri
956519cd98
fix: Make sure that only the channel owner can write into the chat
2025-09-03 17:56:13 +02:00
Hocuri
90d4856a1c
comments/naming: Make sure that I consistently use shared_secret
2025-09-03 17:56:13 +02:00
Hocuri
792c05fc3e
fix: Don't show a weird 'Secure-Join: vb-request-v2 message' in Alice's 1:1 chat a recipient
2025-09-03 17:56:13 +02:00
Hocuri
3cf7746ceb
Remove unnecessary TODO
2025-09-03 17:56:13 +02:00
Hocuri
0acc34a882
Notify a removed member that they were removed
2025-09-03 17:56:13 +02:00
Hocuri
378896eca3
docs: Fix wrong comment on msg_del_member_local()
2025-09-03 17:56:13 +02:00
Hocuri
265ac4e30b
fix: Show only one member-added message for Bob
2025-09-03 17:56:12 +02:00
Hocuri
8d89dcc65f
Add golden test that only one member-added message is shown for Bob
2025-09-03 17:56:12 +02:00
Hocuri
a858709301
Use translatable message for broadcast-joining
2025-09-03 17:56:12 +02:00
Hocuri
3d5e97eced
No clippy warnings anymore!
2025-09-03 17:56:12 +02:00
Hocuri
5da6ca1ec4
test: Improve test_send_avatar_in_securejoin()
2025-09-03 17:56:12 +02:00
Hocuri
58d0fd39b5
clippy
2025-09-03 17:56:12 +02:00
Hocuri
40e3c34f59
refactor: It's not actually necessary for Alice to remember how the message was encrypted
2025-09-03 17:56:12 +02:00
Hocuri
1377a77ea8
refactor: Use the same decode_name() function for the contact name, remove redundant check for grpid.is_some()
...
If grpid is none, the group/brodacast name isn't used, anyways
2025-09-03 17:56:11 +02:00
Hocuri
db32f1142c
Don't include the broadcast's shared secret in the QR code
2025-09-03 17:56:11 +02:00
Hocuri
738f6c1799
feat: Transfer the broadcast secret in an encrypted message rather than directly in the QR code
2025-09-03 17:56:11 +02:00
Hocuri
e1abaebeb5
WIP, untested: Receiving side of passing broadcast secret in a message
2025-09-03 17:56:11 +02:00
Hocuri
0978a46ab6
WIP, untested: Sending side of transferring the secret in member-added message
2025-09-03 17:56:11 +02:00
Hocuri
410048a9e1
Improve TODOs
2025-09-03 17:56:11 +02:00
Hocuri
72336ebb8a
Add benchmark for message decryption
2025-09-03 17:56:11 +02:00
Hocuri
fca8948e4c
Speed up message decryption by not iterating in the s2k algorithm
...
The passphrase has as much entropy as the session key, so, there is no
point in making the computation slow by iterating.
2025-09-03 17:56:11 +02:00
Hocuri
d431f2ebd3
Add benchmark for message decryption
2025-09-03 17:56:10 +02:00
Hocuri
ad0e3179dd
Remove unused and problematic ensure!
...
`secret_keys.is_empty()` only checked whether any secret keys were
passed. This is not helpful, and made decrypting fail in the benchmark.
2025-09-03 17:56:10 +02:00
Hocuri
494ad63a73
feat: Increase secret size to 256 bits of entropy
...
This is for quantumn computers. When trying to break AES, quantumn
computers give a square-root speedup, i.e. the 144 bits of entropy would
take as many queries as breaking 72 bits of entropy on a normal computer. This neglects
e.g. the costs of quantumn circuits and quantumn error correction [1], so,
144 bits entropy would actually have been fine, but in order to be on
the very safe side and so that noone can complain, let's increase it to
256 bits.
[1]: https://csrc.nist.gov/csrc/media/Events/2024/fifth-pqc-standardization-conference/documents/papers/on-practical-cost-of-grover.pdf
2025-09-03 17:56:10 +02:00
Hocuri
13bbcbeb0e
Add some print statements for debugging
2025-09-03 17:56:10 +02:00
Hocuri
a14b53e3ca
fix: Don't show a weird 'vb-request-with-auth' message when a subscriber joins
2025-09-03 17:56:10 +02:00
Hocuri
9474fbff56
fix: Correct member-added info messages
2025-09-03 17:56:10 +02:00
Hocuri
c4001cc3ff
fix: Let Alice send vb-member-added so that the chat is immediately shown on Bob's device
2025-09-03 17:56:08 +02:00
Hocuri
548f5a454c
Add TODO
2025-09-03 17:55:40 +02:00
Hocuri
91110147c3
fix: Actually send broadcast message to recipients, ALL TESTS PASS NOW - fix test_broadcasts_name_and_avatar().
2025-09-03 17:55:40 +02:00
Hocuri
6012595f1a
test: fix test_encrypt_decrypt_broadcast()
2025-09-03 17:55:40 +02:00
Hocuri
504b2d691d
test: fix test_leave_broadcast
2025-09-03 17:55:40 +02:00
Hocuri
7e191f6cf9
fix: Make joining a channel work with multi-device, fix test_leave_broadcast_multidevice
2025-09-03 17:55:40 +02:00
Hocuri
37f6da1cc9
test: Fix one panic in test_broadcasts_name_and_avatar, but there is another one where I couldn't find the problem
2025-09-03 17:55:39 +02:00
Hocuri
df2693f307
test: Fix test_broadcast_multidev
2025-09-03 17:55:39 +02:00
Hocuri
cdd280a2d3
make test_block_broadcast pass
2025-09-03 17:55:39 +02:00
Hocuri
6bb714a6e5
fix: Make syncing of QR tokens work, make test_sync_broadcast pass
2025-09-03 17:55:39 +02:00
Hocuri
b276eda1a2
Make basic multi-device work on joiner side, fix test_only_minimal_data_are_forwarded
2025-09-03 17:55:39 +02:00
Hocuri
9c747b4cb0
fix: make test_broadcast work, return an error when trying to add manually add a contact to a broadcast list, don't have unpromoted broadcast lists, make basic multi-device, inviter side, work
2025-09-03 17:55:39 +02:00
Hocuri
326deab025
Broadcast-securejoin is working!!
2025-09-03 17:55:39 +02:00
Hocuri
24561cd256
test: Add test_send_avatar_in_securejoin
2025-09-03 17:55:39 +02:00
Hocuri
5da7e45b2b
Adapt the rest of the code to the new QR code type
2025-09-03 17:55:39 +02:00
Hocuri
3389e93820
feat: Add broadcast QR type (todo: documentation)
2025-09-03 17:55:39 +02:00
Hocuri
789b923bb8
feat: Store symmetric key non-redundantly in the database
2025-09-03 17:55:39 +02:00
Hocuri
547f750073
Make it compile
2025-09-03 17:55:39 +02:00
Hocuri
382023de11
sync broadcast secret for multidevice
2025-09-03 17:55:39 +02:00
Hocuri
3781a35989
feat: Add create_broadcast_shared_secret()
2025-09-03 17:55:39 +02:00
Hocuri
8653fdbd8e
feat: Save the secret to encrypt and decrypt messages. Next: Send it in a 'member added' message.
2025-09-03 17:55:38 +02:00