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

Simplify To/FromCBOR instances for DSIGN types #3302

Merged
merged 1 commit into from
Feb 15, 2023

Conversation

lehins
Copy link
Collaborator

@lehins lehins commented Feb 15, 2023

Description

I assume To/FromCBOR instance for DSIGN were not defined in the same "catch all" way as it is done for all other crypto types (i.e. the way it is defined in this PR) in order to prevent memory locked DSIGN implementation to have To/FromCBOR instances, because that would violate the safety guarantees of locked memory by leaking secrets onto the Haskell heap. However, now that we have a pretty solid memory locked DSIGN implementation we can safely provide those instances for all SigKeyDSIGN v, VerKeyDSIGN v and SigDSIGN v, because memory locked version will be a totally separate interface with type families named SigKeyDSIGNM v, VerKeyDSIGNM v and SigDSIGNM v. See IntersectMBO/cardano-base#255

Checklist

  • Commit sequence broadly makes sense
  • Commits have useful messages
  • New tests are added if needed and existing tests are updated
  • Any changes are noted in the changelog
  • Code is formatted with fourmolu (which can be run with scripts/fourmolize.sh)
  • Cabal files are formatted (which can be done with scripts/cabal-format.sh)
  • Self-reviewed the diff

@lehins lehins force-pushed the lehins/simplify-dsign-cbor-instances branch from 105bb35 to cf7fbe3 Compare February 15, 2023 14:43
Copy link
Contributor

@JaredCorduan JaredCorduan left a comment

Choose a reason for hiding this comment

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

That all sounds reasonable to me, @lehins . I would feel better, though, for a stamp of approval from @iquerejeta or @dcoutts

@lehins
Copy link
Collaborator Author

lehins commented Feb 15, 2023

Actually @tdammers will be a good person to double check this, since he is the one working on KES forgetting.

One way or another this PR is totally safe, because versioned CBOR is used only by the ledger and we do not deal with secret keys at all.

@lehins lehins merged commit e7dd0cc into master Feb 15, 2023
@iohk-bors iohk-bors bot deleted the lehins/simplify-dsign-cbor-instances branch February 15, 2023 16:20
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