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

about keypair_update #6

Closed
Cjyoleon opened this issue Nov 30, 2022 · 1 comment
Closed

about keypair_update #6

Cjyoleon opened this issue Nov 30, 2022 · 1 comment

Comments

@Cjyoleon
Copy link

Cjyoleon commented Nov 30, 2022

No description provided.

@inorick
Copy link

inorick commented Nov 30, 2022

I think the keypair_update function rotates the keys (prev <- curr <- next) if the next key pair has been acknowledged, i.e. if key_is_next in line 454 is true:

bool key_is_next = (received_keypair == &peer->next_keypair);

So the rotation looks good to me:

  1. Overwrite prev with curr.
  2. Overwrite curr with next.
  3. Destroy next as it has been rotated to curr.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants