seclib-1.1.0.1: A simple library for static information-flow security in Haskell

Safe HaskellUnsafe
LanguageHaskell98

SecLib.Reveal

Description

Provide means for declassification.

Synopsis

Documentation

reveal :: Less l l' => Sec l' a -> Sec l a Source

This function allows to downgrade information and it must be used_with_care.

Once that untrusted code gets access to this function (or any instance of it), it can exercise it freely.

Normally, untrusted code gets access to a restricted versions of reveal. For instance, to reveal the last four digits of a credit card number, untrusted code gets access to the following function.

reveal_4digits :: Less H L => Sec H CreditCard -> Sec L Int