feat(Crypto): Generalize encryption schemes over arbitrary monads#581
feat(Crypto): Generalize encryption schemes over arbitrary monads#581dtumad wants to merge 6 commits into
Conversation
|
Thanks for the PR, though I'm not sure I understand the goal here yet: Are you planning to add a new variant of a perfectly secret encryption scheme? Did you plan to extract these for execution? Or did you plan to use this for computationally secure encryption schemes? I believe, following Katz-Lindell, the latter would be best handled by a new definition altogether. It would be nice if the PR description contained a justification for the change along with a description. |
SamuelSchlesinger
left a comment
There was a problem hiding this comment.
Didn't do a full review, curious to hear your response to my question before I do so.
This was my main goal, I've pushed an actual example of making this runnable, although it involved some further refactoring to seperate
This seems unneeded I think given the uniqueness theorem.
Agreed, I don't think this can really stretch to fit that. |
|
Fantastic, thank you for explaining! I'll make some time to review this in the coming week. |
This PR modifies the definition of
encSchemeto allow the computations to happen in any monadm, and defines correctness in terms of aMonadLiftT m PMFinstance (and further aLawfulMonadLiftTinstance for some proofs). Also adds an example of a runnable version ofotpby takingmto beFreeM (PFunctor.Obj {A := ℕ, B := BitVec})with custom private lifting instances.Also adds a new
HasUniformBitVec m/LawfulUniformBitVec mtypeclass asserting themcan model uniform selection of bitvectors, which is needed for the proof of Shanon's theorem in particular, as well as similar classes for finite sets and finite types.