A Type System to Ensure Non-Interference in ReScript

Benjamin Bennetzen,Daniel Vang Kleist,Emilie Sonne Steinmann,Loke Walsted,Nikolaj Rossander Kristensen,Peter Buus Steffensen
2024-10-23
Abstract:Protecting confidential data from leaking is a critical challenge in computer systems, particularly given the growing number of observers on the internet. Therefore, limiting information flow using robust security policies becomes increasingly vital. We focus on the non-interference policy, where the goal is to ensure that confidential data can not impact public data. This paper presents a type system, for a subset of the ReScript syntax, designed to enforce non-interference. We conclude with a proof of soundness for the type system, demonstrating that if an expression is type-able, it is inherently non-interferent. In addition, we provide a brief overview of a type checker that implements the previously mentioned type system.
Cryptography and Security,Programming Languages
What problem does this paper attempt to address?
The key problem that this paper attempts to solve is **ensuring the non - interference property in the ReScript programming language**. Specifically, the authors hope to design a type system to prevent confidential data from being leaked to public data through explicit or implicit information flows. This is a crucial challenge in computer systems, especially in the context of an increasing number of observers on the Internet. ### Problem Background With the continuous development of computer systems, it has become increasingly important to protect confidential data from being leaked. Non - interference is a security policy aimed at ensuring that confidential data does not affect public data, thereby preventing unauthorized observers from accessing confidential information. This concept was first proposed by Goguen and Meseguer in 1982 and can be evaluated through information flow analysis. ### Characteristics of the ReScript Language ReScript is a functional programming language that compiles to JavaScript and has attracted attention for its efficient build system. However, as a relatively new language, the information flow analysis of ReScript has not been fully studied. In addition, ReScript contains some imperative features (such as `ref`), which make non - interference analysis more complex. ### Main Contributions of the Paper To meet these challenges, the authors introduced a type system for a subset of ReScript to ensure the non - interference property. The purposes of this type system are: - **Prevent explicit information flow**: For example, directly assigning confidential data to a public variable. - **Prevent implicit information flow**: For example, indirectly revealing confidential data through conditional statements. ### Implementation of the Type System The authors described in detail the rules of this type system and proved its soundness. Specifically, they proved that if an expression is typeable, then it must be non - interferent. This ensures that any code conforming to the type system will not cause confidential data leakage. ### Paper Structure The rest of the paper is organized as follows: 1. **Section 2**: Introduces the abstract syntax and semantics of ReScript. 2. **Section 3**: Introduces the type system for ensuring non - interference. 3. **Section 4**: Proves the soundness of the type system. 4. **Section 5**: Outlines the type checker implementing this type system and evaluates its effectiveness. 5. **Section 6**: Conclusions and future work. Through these contents, the authors demonstrated how to effectively prevent information leakage through a type system, thereby ensuring the security and privacy of ReScript programs.