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

DRKey: Check that current time is within Epoch (+ Grace period) #4700

Open
JordiSubira opened this issue Feb 11, 2025 · 0 comments
Open

DRKey: Check that current time is within Epoch (+ Grace period) #4700

JordiSubira opened this issue Feb 11, 2025 · 0 comments
Labels
bug Something isn't working DRKey SCMP

Comments

@JordiSubira
Copy link
Contributor

JordiSubira commented Feb 11, 2025

This is not urgent because this is part of the FakeProvider implementation. However, it is likely that the FakeProvider will evolve to an actual provider.

The explanation below makes sense on the context of SCMP where the terminology is used, however, if we want this provider to be of general purpose (which is debatable) the reasoning (even if some parameters change, e.g., timestamp_size < 48 bits) still applies for the general case.

Currently, the GetKeyWithinAcceptanceWindow(·) method does not check whether that we are within the Epoch ( + grace period) of the selected. Since the AcceptanceWindow may be bigger than the grace period, we should check that the current time is also within the Epoch + grace period. Just refuting the current implementation by counter-example. Let's say EpochDuration := 1 day and AcceptanceWindow:= 1 minute and current time t="E_{i}+1minute". Timestamp can encode up to 3 days duration and the Grace_period is set to 5 seconds. If the sender sends a packet s.t. timestamp encodes "1 day and 30 second", the method will assume it was sent at t_s ="E_{i}+30 seconds" (i.e., 30 seconds ago) using K_{i-1} (the key for the current epoch). However, this key is not valid anymore at t_s and we should return an error.

@JordiSubira JordiSubira added bug Something isn't working c/router SCION Router SCMP and removed c/router SCION Router labels Feb 11, 2025
@JordiSubira JordiSubira changed the title SCMP: Check that current time is within Epoch (+ Grace period) DRKey: Check that current time is within Epoch (+ Grace period) Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working DRKey SCMP
Projects
None yet
Development

No branches or pull requests

1 participant