Noninterference is a popular semantic security condition because it offers strong end-to-end guarantees, it is inherently compositional, and it can be enforced using a simple security type system. Unfortunately, it is too restrictive for real systems. Mechanisms for downgrading information are needed to capture real-world security requirements, but downgrading eliminates the strong compositional security guarantees of noninterference.We introduce nonmalleable information flow, a new formal security condition that generalizes noninterference to permit controlled downgrading of both confidentiality and integrity. While previous work on robust declassification prevents adversaries from exploiting the downgrading of confidentiality, our key insight is transparent endorsement, a mechanism for downgrading integrity while defending against adversarial exploitation. Robust declassification appeared to break the duality of confidentiality and integrity by making confidentiality depend on integrity, but transparent endorsement makes integrity depend on confidentiality, restoring this duality. We show how to extend a security-typed programming language with transparent endorsement and prove that this static type system enforces nonmalleable information flow, a new security property that subsumes robust declassification and transparent endorsement. Finally, we describe an implementation of this type system in the context of Flame, a flow-limited authorization plugin for the Glasgow Haskell Compiler. * Work done while at Harvard University arXiv:1708.08596v2 [cs.CR] 31 Aug 2017Proof. This follows by induction on the typing derivation for values.Lemma 2 (Substitution). If Γ, x : τ 1 ; pc $ e : τ and Γ; pc $ v : τ 1 , then Γ; pc $ erx Þ Ñ vs : τ .Proof. By induction on the derivation of Γ, x : τ 1 ; pc $ e : τ using Lemma 1.Lemma 3 (pc reduction). If Γ; pc $ e : τ and pc 1 Ď pc, then Γ; pc 1 $ e : τ .Proof. By induction on the derivation of Γ; pc $ e : τ .Theorem 8 (Subject reduction). If Γ; pc $ e : τ and xe, ty ÝÑ Ñ xe 1 , t 1 y then Γ; pc $ e 1 : τ .Proof. This proof follows by an inductive case analysis on the operational semantics in Figures 18 and 22. There are a few interesting cases.Case B-EXPAND: This case handles a context (B), we will do a sub-case analysis on each such expression type.