-
Notifications
You must be signed in to change notification settings - Fork 15
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
New Groups support #42
Commits on Aug 22, 2023
-
Group metadata; signed & read-only configs support
Adds a group info config type, which tracks distributed info for v2 groups. This requires introducing/using a few new concepts not currently used for user config messages: - Multiple decryption keys. User config doesn't do this at all (rather it generates a single decryption key from the private key for each namespace). This doesn't yet add support for sharing and distributing those keys, just for having being able to load a config with a list of multiple possible keys. - Config signing and verification. For user configs this isn't done, since only the owner can actually encrypt/decrypt a config message, just being able to decrypt it is authentication enough. This required various modifications to make the config library properly prevent modifications when we can't modify, and to properly follow that through in terms of merging, updates, etc.
Configuration menu - View commit details
-
Copy full SHA for 5d10667 - Browse repository at this point
Copy the full SHA 5d10667View commit details -
Add multi-key encryption tests
Fixes a bug where construction-provided keys were loaded in reversed priority.
Configuration menu - View commit details
-
Copy full SHA for 80f4d14 - Browse repository at this point
Copy the full SHA 80f4d14View commit details -
Configuration menu - View commit details
-
Copy full SHA for 83c9dec - Browse repository at this point
Copy the full SHA 83c9decView commit details -
Configuration menu - View commit details
-
Copy full SHA for 12d601b - Browse repository at this point
Copy the full SHA 12d601bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6f19646 - Browse repository at this point
Copy the full SHA 6f19646View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8f142c0 - Browse repository at this point
Copy the full SHA 8f142c0View commit details -
Configuration menu - View commit details
-
Copy full SHA for bf3df15 - Browse repository at this point
Copy the full SHA bf3df15View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7e3001d - Browse repository at this point
Copy the full SHA 7e3001dView commit details -
Configuration menu - View commit details
-
Copy full SHA for fdc664e - Browse repository at this point
Copy the full SHA fdc664eView commit details -
The first part of this assert shouldn't fail if we are starting from a fresh, blank config (in which case we don't actually serialize our own message anymore).
Configuration menu - View commit details
-
Copy full SHA for 6e3cbf8 - Browse repository at this point
Copy the full SHA 6e3cbf8View commit details -
Remove
signature_optional
parameterIt doesn't really make sense to have this as we either want signatures (for shared messages) or don't (for personally encrypted messages). The only place we were passing it as `true` was in a place that also didn't pass a verifier or signer (during dumping), and so already wasn't adding/checking signatures.
Configuration menu - View commit details
-
Copy full SHA for 0fcc07c - Browse repository at this point
Copy the full SHA 0fcc07cView commit details -
Move all key management into
Keys
; make Keys dumpableThis makes Keys construction, loading, and rekeying take the Info and Members object to update their keys, thus removing the requirement for application code to worry about key management at all (they just feed the keys in, and they propagate to info/members). Also adds a state dump (similar to base config `dump()`) to Keys.
Configuration menu - View commit details
-
Copy full SHA for c6fd471 - Browse repository at this point
Copy the full SHA c6fd471View commit details -
Configuration menu - View commit details
-
Copy full SHA for dddc5b3 - Browse repository at this point
Copy the full SHA dddc5b3View commit details -
Configuration menu - View commit details
-
Copy full SHA for f929e79 - Browse repository at this point
Copy the full SHA f929e79View commit details -
Add dedicated namespace for messages; rearrange config namespace values
Messages to a new group can't go into 0 (since that is publicly depositable), so reserve a namespace (11) for messages.
Configuration menu - View commit details
-
Copy full SHA for cb40a14 - Browse repository at this point
Copy the full SHA cb40a14View commit details -
Add group message encryption + compression
Adds method for encrypting/decrypting a message. This supports both compressed+encrypted and just plain encrypted. Abstracts the zstd compression implementation from base.cpp into internal.cpp, and uses it inside the new group message encryption Compression is only used if beneficial (that is, only if compression actually reduces the message size).
Configuration menu - View commit details
-
Copy full SHA for 60cbeca - Browse repository at this point
Copy the full SHA 60cbecaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 286243c - Browse repository at this point
Copy the full SHA 286243cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 95aeea6 - Browse repository at this point
Copy the full SHA 95aeea6View commit details
Commits on Aug 23, 2023
-
Configuration menu - View commit details
-
Copy full SHA for a2dc2e9 - Browse repository at this point
Copy the full SHA a2dc2e9View commit details -
Configuration menu - View commit details
-
Copy full SHA for c454e35 - Browse repository at this point
Copy the full SHA c454e35View commit details -
Configuration menu - View commit details
-
Copy full SHA for ae2f1ba - Browse repository at this point
Copy the full SHA ae2f1baView commit details
Commits on Aug 24, 2023
-
Configuration menu - View commit details
-
Copy full SHA for a44567e - Browse repository at this point
Copy the full SHA a44567eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9953645 - Browse repository at this point
Copy the full SHA 9953645View commit details -
Configuration menu - View commit details
-
Copy full SHA for d3b902f - Browse repository at this point
Copy the full SHA d3b902fView commit details
Commits on Aug 25, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 4551257 - Browse repository at this point
Copy the full SHA 4551257View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8d9ce6e - Browse repository at this point
Copy the full SHA 8d9ce6eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 744b25e - Browse repository at this point
Copy the full SHA 744b25eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3c5f74b - Browse repository at this point
Copy the full SHA 3c5f74bView commit details -
Configuration menu - View commit details
-
Copy full SHA for e83f479 - Browse repository at this point
Copy the full SHA e83f479View commit details -
Configuration menu - View commit details
-
Copy full SHA for cb89c0f - Browse repository at this point
Copy the full SHA cb89c0fView commit details -
- new group keys unit tests runs through relevant functionalities - add/remove users, change group info, add admin, verify encryption compression
Configuration menu - View commit details
-
Copy full SHA for b4cf7e2 - Browse repository at this point
Copy the full SHA b4cf7e2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9f447b6 - Browse repository at this point
Copy the full SHA 9f447b6View commit details -
Configuration menu - View commit details
-
Copy full SHA for d121864 - Browse repository at this point
Copy the full SHA d121864View commit details -
Configuration menu - View commit details
-
Copy full SHA for c431f12 - Browse repository at this point
Copy the full SHA c431f12View commit details
Commits on Aug 26, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 8837103 - Browse repository at this point
Copy the full SHA 8837103View commit details
Commits on Aug 28, 2023
-
Updates for user groups -> groups
- add test - add missing `erase_group` to erase by id - fix bug where `K` wasn't set for non-admins (it should be set but empty in such a case so that we always have a key). - make `check_session_id` take a string view prefix instead of a char to make it a little easier, and to include it in the error message.
Configuration menu - View commit details
-
Copy full SHA for 517a61a - Browse repository at this point
Copy the full SHA 517a61aView commit details
Commits on Aug 29, 2023
-
Remove temporary testKeys binary
It was temporary for simpler keys testing.
Configuration menu - View commit details
-
Copy full SHA for 390faa8 - Browse repository at this point
Copy the full SHA 390faa8View commit details
Commits on Aug 30, 2023
-
Swarm subaccount authentication
This adds methods to `Keys` that generates subaccount tokens and signatures as needed to do storage server subaccount authentication (which currently requires testnet as the subaccount code is not yet active on mainnet), along with test code to test it. Also adds a tests/swarm-auth-test binary that spits out storage requests for store/retrieve testing.
Configuration menu - View commit details
-
Copy full SHA for 8cb26be - Browse repository at this point
Copy the full SHA 8cb26beView commit details -
Don't build swarm-auth-test by default
It adds a nlohmann::json dependency, and isn't really part of the normal test suite.
Configuration menu - View commit details
-
Copy full SHA for 18d3df2 - Browse repository at this point
Copy the full SHA 18d3df2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 224dda9 - Browse repository at this point
Copy the full SHA 224dda9View commit details
Commits on Aug 31, 2023
-
C API updates, and related tweaks
- Adds C wrappers for all the swarm authentication methods - Adds C wrapper for querying if the keys object has admin permission - Adds C wrapper for key_supplement to generate supplemental key messages - Changes the swarm `subaccount` value to be base64 instead of hex (since it isn't really a pubkey) - Makes the vector passed into key_supplement const&
Configuration menu - View commit details
-
Copy full SHA for 9b0cdcd - Browse repository at this point
Copy the full SHA 9b0cdcdView commit details -
Configuration menu - View commit details
-
Copy full SHA for e30122b - Browse repository at this point
Copy the full SHA e30122bView commit details -
Keys.size(); updates to Keys C API
- Add keys.size() return the number of keys in the object. - Add C API for retrieving keys & key size - Fix copy-and-paste error in groups_members_size C API name
Configuration menu - View commit details
-
Copy full SHA for 2ad96d5 - Browse repository at this point
Copy the full SHA 2ad96d5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8a9d8ac - Browse repository at this point
Copy the full SHA 8a9d8acView commit details -
Configuration menu - View commit details
-
Copy full SHA for 24ed158 - Browse repository at this point
Copy the full SHA 24ed158View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4d0c6e4 - Browse repository at this point
Copy the full SHA 4d0c6e4View commit details -
Fix propagation of secret key values
Also adds tests to verify that auth_data and secretkey data propagate as expected. Many thanks to Harris for identifying and tracking this down.
Configuration menu - View commit details
-
Copy full SHA for 3ed91d5 - Browse repository at this point
Copy the full SHA 3ed91d5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5854c4f - Browse repository at this point
Copy the full SHA 5854c4fView commit details
Commits on Sep 1, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 194f972 - Browse repository at this point
Copy the full SHA 194f972View commit details -
Configuration menu - View commit details
-
Copy full SHA for 364f8d3 - Browse repository at this point
Copy the full SHA 364f8d3View commit details -
C method to return groups keys
- Added config_groups_keys to config/base.h - Looped in test call into config user groups C api unit test
Configuration menu - View commit details
-
Copy full SHA for 8ed090e - Browse repository at this point
Copy the full SHA 8ed090eView commit details
Commits on Sep 2, 2023
-
Adds current hash tracking to groups::Keys; this adds a `current_hashes` method to group::Keys that works similarly to the base config current_hashes (though returns a set instead of vector). (The C version is `groups_keys_current_hashes`) Testing this also triggered a bug in that we weren't probably re-loading the verified-signature state on a dump->load cycle, which caused an assertion failure on merge (because the current state couldn't be successfully serialized-then-deserialized), also fixed here. Also renames the recently added C config_group_keys to config_get_keys to better reflect its purpose.
Configuration menu - View commit details
-
Copy full SHA for bb7a2cf - Browse repository at this point
Copy the full SHA bb7a2cfView commit details
Commits on Sep 5, 2023
-
Configuration menu - View commit details
-
Copy full SHA for c272e06 - Browse repository at this point
Copy the full SHA c272e06View commit details
Commits on Sep 6, 2023
-
Add invited and name to groups; add kicked methods
This adds an `.invited` flag for all group types (legacy, new, and communities) that can be used to track a invited-but-not-yet-joined room by session clients. Also adds `.name` to new groups data so that the name from an invitation can be stored before accepting (after accepting the name will come from the shared group config message). Add `setKicked()` and `kicked()` methods which clear both auth_data and secretkey and report whether both are empty, respectively. (For the C API these are `ugroups_group_set_kicked` and `ugroups_group_is_kicked` and take a pointer to the `ugroups_group_info`).
Configuration menu - View commit details
-
Copy full SHA for 2adb20c - Browse repository at this point
Copy the full SHA 2adb20cView commit details -
Fix info/members key lists when loading from dump
The key lists weren't being set properly when loading a Keys object from a dump; these sets the key lists properly.
Configuration menu - View commit details
-
Copy full SHA for f61bc4a - Browse repository at this point
Copy the full SHA f61bc4aView commit details