Text this: Foundations of Security, Protocols, and Equational Reasoning