-
Notifications
You must be signed in to change notification settings - Fork 38
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
Port: Shamir-based shared recovery device #7324
Conversation
bee2c50
to
ea581bf
Compare
b34bdcb
to
e5ed694
Compare
I have to split the checklist into issues and I'll implement the postrgre version once every route has been tested with the memory impl |
libparsec/crates/protocol/schema/authenticated_cmds/shamir_create_shared_recovery_device.json5
Outdated
Show resolved
Hide resolved
server/tests/api_v4/authenticated/test_shamir_recovery_setup.py
Outdated
Show resolved
Hide resolved
e7b72a9
to
3047103
Compare
server/tests/api_v4/authenticated/test_shamir_recovery_setup.py
Outdated
Show resolved
Hide resolved
server/tests/api_v4/authenticated/test_shamir_recovery_setup.py
Outdated
Show resolved
Hide resolved
a92c18a
to
4687a91
Compare
server/tests/api_v4/authenticated/test_shamir_recovery_setup.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A bit of naming to change, LGTM otherwise 👍
libparsec/crates/protocol/schema/authenticated_cmds/shamir_create_shared_recovery_device.json5
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ooops I missed a couple of things about error handling in my first reviews :)
87058bd
to
f2f59e9
Compare
libparsec/crates/protocol/tests/authenticated_cmds/v4/shamir_recovery_setup.rs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job for this first PR! 💯 👏
I left some comments, but nothing major.
libparsec/crates/protocol/tests/authenticated_cmds/v4/shamir_recovery_setup.rs
Outdated
Show resolved
Hide resolved
server/tests/api_v4/authenticated/test_shamir_recovery_setup.py
Outdated
Show resolved
Hide resolved
libparsec/crates/protocol/tests/authenticated_cmds/v4/shamir_recovery_setup.rs
Outdated
Show resolved
Hide resolved
libparsec/crates/protocol/tests/authenticated_cmds/v4/shamir_recovery_setup.rs
Outdated
Show resolved
Hide resolved
libparsec/crates/protocol/tests/authenticated_cmds/v4/shamir_recovery_setup.rs
Outdated
Show resolved
Hide resolved
libparsec/crates/protocol/tests/authenticated_cmds/v4/shamir_recovery_setup.rs
Outdated
Show resolved
Hide resolved
libparsec/crates/protocol/tests/authenticated_cmds/v4/shamir_recovery_setup.rs
Outdated
Show resolved
Hide resolved
libparsec/crates/protocol/tests/authenticated_cmds/v4/shamir_recovery_setup.rs
Outdated
Show resolved
Hide resolved
libparsec/crates/protocol/tests/authenticated_cmds/v4/shamir_recovery_setup.rs
Outdated
Show resolved
Hide resolved
libparsec/crates/protocol/tests/authenticated_cmds/v4/shamir_recovery_setup.rs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of minor comments, LGTM otherwise 👍
libparsec/crates/protocol/tests/authenticated_cmds/v4/shamir_recovery_setup.rs
Show resolved
Hide resolved
libparsec/crates/protocol/tests/authenticated_cmds/v4/shamir_recovery_setup.rs
Outdated
Show resolved
Hide resolved
libparsec/crates/protocol/tests/authenticated_cmds/v4/shamir_recovery_setup.rs
Outdated
Show resolved
Hide resolved
libparsec/crates/protocol/tests/authenticated_cmds/v4/shamir_recovery_setup.rs
Outdated
Show resolved
Hide resolved
d6f1e61
to
d54ecfb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
d54ecfb
to
09e1023
Compare
// "ballpark_client_early_offset": 32.0 | ||
// "ballpark_client_late_offset": 32.0 | ||
// "client_timestamp": "2009-02-13T23:31:30Z" | ||
// "server_timestamp": "2009-02-13T23:31:30Z" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// "ballpark_client_early_offset": 32.0 | |
// "ballpark_client_late_offset": 32.0 | |
// "client_timestamp": "2009-02-13T23:31:30Z" | |
// "server_timestamp": "2009-02-13T23:31:30Z" | |
// ballpark_client_early_offset: 32.0 | |
// ballpark_client_late_offset: 32.0 | |
// client_timestamp: ext(1, timestamp(2009-02-13T23:31:30.000000Z)) | |
// server_timestamp: ext(1, timestamp(2009-02-13T23:31:30.000000Z)) |
2 very minor remarks:
- Indentation seems off compared with the
status
field - the key part of the fields are displayed without double quotes (there is not much reason for it apart for consistency with the rest of the codebase)
And 1 (a bit) more important:
- datetime are displayed as
ext(1, 946774800.0)
(or sometimeExtType(code=1, data=b'\x00\x03]\x01;7\xe0\x00')
). The point here is"2009-02-13T23:31:30Z"
stands for a string, where in msgpack it is serialized as an extension type (msgpack extension type itself is divided between a code that must be an integer, and an arbitrary long array of bytes).
Anyway the point here is to keep the info this is serialized as an extension with code=1. Also note the data part is currently messy in our codebase, with often a float (we used to represent the datetime as a float) or as bytes (as ExtType(code=1, data=b'\x00\x03]\x01;7\xe0\x00')
is output we get when deserializing msgpack with Python, which is pretty convenient to quickly created the representation of payload)
I'm going to link this comment to the issue about re-creating the test payload for data&protocol, I think it's there that we should settle on how we want to represent the extension type (so in the meantime you can do whatever you think is the best on this ^^)
09e1023
to
b6dca97
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
libparsec/crates/protocol/schema/authenticated_cmds/shamir_recovery_setup.json5
Outdated
Show resolved
Hide resolved
b6dca97
to
67e0024
Compare
- update the RFC - split invalid_data error into all possible variants - in rust serialiaztion tests, the macro test_roundtrip_serialization could be used for other tests too.
67e0024
to
55b5045
Compare
Related #6090
Fix #7357