A simple information flow policy
SC =
, where ∅ is the empty set.
The information flow policy should define the direction that information is allowed to flow, which is dependent on whether the policy allows ''read'' or ''write'' operations. This example considers ''read'' operations (confidentiality). The following flows are allowed:
* → =
This can also be described as a superset (⊇). In words: information is allowed to flow ''towards stricter'' levels of confidentiality. The combination operator (⊕) can express how security classes can perform read operations with respect to other security classes. For example:
* ⊕ =
— the only security class that can read from both
and
is
.
* ⊕ = ∅
— neither
nor
are allowed to read from both
and
.
This can also be described as an intersection (∩) between security classes.
An information flow policy can be illustrated as a Information flow policy in security type systems
Once the policy is in place, the software developer can apply the security classes to the program components. Use of a security type system is usually combined with a compiler that can perform the verification of the information flow according to the type system rules. For the sake of simplicity, a very simple computer program, together with the information flow policy as described in the previous section, can be used as a demonstration. The simple program is given in the following pseudocode:
if y = 1 then x := 0 else x := 1
Here, an equality check is made on a variable y that is assigned the security class
. A variable x with a lower security class (
) is influenced by this check. This means that information is leaking from class
to class
, which is a violation of the confidentiality policy. This leak should be detected by the security type system.
Example
Designing a security type system requires a function (also known as a security environment) that creates a mapping from variables to security types, or classes. This function can be called Γ, such thatΓ(x) = τ
, where x
is a variable and τ
is the security class, or type. Security classes are assigned (also called "judgement") to program components, using the following notation:
* Types are assigned to read operations by: Γ ⊢ e : τ
.
* Types are assigned to write operations by: Γ ⊢ S : τ cmd
.
* Constants can be assigned any type.
The following bottom-up notation can be used to decompose the program: . Once the program is decomposed into trivial judgements, by which the type can easily be determined, the types for the less trivial parts of the program can be derived. Each "numerator" is considered in isolation, looking at the type of each statement to see if an allowed type can be derived for the "denominator", based on the defined type system "rules".
Rules
The main part of the security type system is the rules. They say how the program should be decomposed and how type verification should be performed. This toy program consists of a conditional test and two possible variable assignments. Rules for these two events are defined as follows: Applying this to the simple program introduced above yields: The type system detects the policy violation in line 2, where a read operation of security class
is performed, followed by two write operations of a less strict security class
. In more formalized terms, ⋢ ,
(from the rule of the conditional test). Thus, the program is classified as "not typeable".
Soundness
The soundness of a security type system can be informally defined as: If programP
is well typed, P
satisfies non-interference. Volpano, Smith and Irvine were the first to prove soundness of a security type system for a deterministic imperative programming language with a standard (non-instrumented) semantics using the notion of non-interference.
References
{{reflistFurther reading
*Fred B. Schneider, Greg Morrisett, and Robert Harper, ''A Language-Based Approach to Security''. *Andrei Sabelfeld, Andrew C. Myers, ''Language-Based Information-Flow Security''. Computer security Type systems