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

Include the period as part of the KES signing key #330

Open
iquerejeta opened this issue Oct 27, 2022 · 3 comments
Open

Include the period as part of the KES signing key #330

iquerejeta opened this issue Oct 27, 2022 · 3 comments

Comments

@iquerejeta
Copy link
Collaborator

Currently, KES signing keys do not contain the period to which they are evolved. This means there is no way to know in which evolution a key is at. This is particularly problematic while designing the KES agent as we will have more than one process/machine handling key evolutions which might not be in sync. It is therefore important to allow the key handlers to understand at which evolution a particular key is at. To that end we should change from the current KES sk design:

data SignKeyKES (SumKES h d) =
           SignKeySumKES !(SignKeyKES d)
                         !Seed
                         !(VerKeyKES d)
                         !(VerKeyKES d)
        deriving Generic

to a different data structure that contains the period. However, we might not want to include the period in such a way that it is redundant for each layer of the key (this is because a Sum6KES sign key is formed by a Sum5KES, and so on).

@dcoutts
Copy link
Contributor

dcoutts commented Oct 28, 2022

This would have an impact in a number of areas.

I think we should clarify our KES agent design first, and then see if it would need this. I'm sure it will need to track the evolution number, but it may not need to do so within the KES key, but perhaps paired up with the KES key.

@tdammers
Copy link
Contributor

I think pairing up is the way to go here, something like:

data SignKeyWithPeriodKES k =
    SignKeyWithPeriodKES { sk :: !(SignKeyKES k), period :: !KESPeriod }

This has next to no disadvantages compared to integrating the period with the key, but a lot of advantages, most notably, with this approach we can gradually migrate parts of the codebase to the new data type by adding or removing the period at API boundaries, while maintaining API compatibility on the other side.

@tdammers
Copy link
Contributor

tdammers commented Nov 12, 2022

Implementation on the tdammers/kes-agent-requirements branch (3bd4a04)

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

3 participants