-
Notifications
You must be signed in to change notification settings - Fork 13
Description
I found the Probabilistic relational verification types work in the F* project very interesting:
Recall that non-interference means that public results do not
depend on secrets. If an expressionewith base typeathat computes
over some secret information can be given the typetype eq a = x:a{|L x = R x|}then its result can be safely published, since the execution of
e
reveals no information about the secrets.
...
In cryptography, confidentiality is usually stated
as resistance against chosen-plaintext attacks (CPA) ... Instead of reasoning about
two messages selected byb, we just need to show that the function
let cpa’ p = encrypt (sample n) phas the typeblock → eq block.
I'm not quite sure how well F* effects translate to idris effects, but it seems to me that it's essential to represent these security properties in the types, and not just the number of bits and bytes in the input and output parameters.
All this type tells me is that the function goes from some number of bits to bits; it doesn't express any actual security properties:
encryptBlock : k -> Bits bitsPerBlock -> Bits bitsPerBlock
The identity function satisfies that type, as do constant functions, etc.