This paper presents a shallow and efficient embedding of the security protocol
specification language MSR into an extension of rewriting logic with dependent types. The
latter is an instance of the open calculus of constructions which integrates key concepts
from equational logic, rewriting logic, and type theory.MSR is based on a form of first-order
multiset rewriting extended with existential name generation and a flexible type infrastructure
centered on dependent types with subsorting. The encoding presented in this paper has served
as the basis for the implementation of an MSR specification and analysis environment using
the first-order rewriting engine Maude.