  The growing interconnectivity in control systems due to robust wireless
communication and cloud usage paves the way for exciting new opportunities such
as data-driven control and service-based decision-making. At the same time,
connected systems are susceptible to cyberattacks and data leakages. Against
this background, encrypted control aims to increase the security and safety of
cyber-physical systems. A central goal is to ensure confidentiality of process
data during networked controller evaluations, which is enabled by, e.g.,
homomorphic encryption. However, the integration of advanced cryptographic
systems renders the design of encrypted controllers an interdisciplinary
challenge.
  This code-driven tutorial paper aims to facilitate the access to encrypted
control by providing exemplary realizations based on popular homomorphic
cryptosystems. In particular, we discuss the encrypted implementation of state
feedback and PI controllers using the Paillier, GSW, and CKKS cryptosystem.
