{- | The security library interface for /trustworthy modules/. 
     It is the same interface as the one for untrustworthy code (module "Untrustworthy") with the addition of 
     functions 'reveal' and 'revealIO' to respectively break the abstraction of the security monads 'Sec' and 'SecIO' 
     as well as the declassification 
     combinators 'hatch', 'ntimes', 'flock', and 'dlm'.
-} 
module SecLib.Trustworthy
  ( 
  -- Sec
    Sec ()             
  , up
  , public
  -- SecIO
  , SecIO ()         
  , value
  , plug
  , run
  -- Files
  , File 
  , mkFile
  , readFileSecIO
  , writeFileSecIO
  -- References
  , Ref
  , readRefSecIO
  , writeRefSecIO
  , newIORefSecIO
  -- Screen/Keyword
  , Screen
  , mkScreen
  , getLineSecIO
  , putStrSecIO
  , putStrLnSecIO
  -- Legacy code
  , s_read
  , s_write
  -- Sockets
  , SecSocket
  , SecSockAddr () 
  , inet_addrSecIO
  , portInet
  , socketSecIO
  , bindSocketSecIO
  , sIsBoundSecIO
  , acceptSecIO
  , recvSecIO
  , sendSecIO
  , connectSecIO
  , sIsConnectedSecIO
  -- Declassification
  , Open  ()
  , Close ()
  , Authority () 
  , certify 
  ------------------------------------------------
  -- Operations to hide for untrustworthy modules
  ------------------------------------------------
  , reveal             
  , revealIO           
  -- Representation of side-effects
  , Loc (MkLoc)
  -- Security lattice
  , Less (less)
  , Attacker (observe)
  -- Declassification combinators.
  , hatch          
  , ntimes         
  , flock          
  , dlm            
  )
where

import SecLib.Lattice
import SecLib.Sec
import SecLib.SecIO
import SecLib.Declassification