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

Merge DSIGN and KES classes #411

Merged
merged 1 commit into from
Oct 30, 2023
Merged

Merge DSIGN and KES classes #411

merged 1 commit into from
Oct 30, 2023

Conversation

tdammers
Copy link
Contributor

This changes things as follows:

DSIGN:

  • The DSIGNMAlgorithmBase class disappears; its functionality is provided by the existing DSIGNAlgorithm class
  • The DSIGNMAlgorithm class remains, but becomes a subclass of DSIGNAlgorithm
  • Any methods and types from DSIGNMAlgorithmBase that do not involve sign keys or seeds will be shared between the pure (DSIGNAlgorithm) and mlocked (DSIGNMAlgorithm) APIs, since we only need to mlock seeds and sign keys. The M flavors of those methods and types have been deleted.
  • The same phantom types are used for the pure and mlocked (if supported) flavors of DSIGN algorithms
  • The distinction between pure and mlocked APIs is made by using the pure or mlocked sign key and seed types, and the pure or mlocked flavors of the corresponding methods (genKeyDSIGN(M), deriveVerKeyDSIGN(M), etc.). All DSIGN algorithms must support a pure API (DSIGNAlgorithm); those that also support mlocked DSIGN (currently only ED25519) additionally support DSIGNMAlgorithm.
  • As a consequence, the signatures and verification keys produced and used by the pure and mlocked flavors of the same DSIGN algorithm are exactly the same.

KES:

  • KESSignAlgorithm has been merged into KESAlgorithm, which now offers the full range of KES operations. Since the mlocking monad (m) is no longer a typeclass parameter, the split is no longer necessary, and conceptually, it does not make sense to have a KES algorithm that can only verify, but not sign.

@tdammers tdammers marked this pull request as ready for review May 11, 2023 08:16
@tdammers
Copy link
Contributor Author

Depends on #404.

@tdammers tdammers force-pushed the tdammers/dsign-merge branch from 4ab301c to 572f2ac Compare May 23, 2023 06:42
@tdammers tdammers requested a review from lehins May 23, 2023 06:42
@tdammers tdammers force-pushed the tdammers/dsign-merge branch 2 times, most recently from 3826b5e to eb921ab Compare August 24, 2023 07:47
@tdammers tdammers mentioned this pull request Aug 24, 2023
Copy link
Collaborator

@lehins lehins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love it!

@lehins lehins force-pushed the tdammers/dsign-merge branch from eb921ab to 5f7cffd Compare October 30, 2023 13:14
@tdammers tdammers merged commit 5a71ec6 into master Oct 30, 2023
@tdammers tdammers deleted the tdammers/dsign-merge branch October 30, 2023 15:25
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

Successfully merging this pull request may close these issues.

2 participants