In this chapter we've taken a tour of cryptography, covering both the basic theory of how cryptography works and some of the classes available in the .NET class libraries to implement cryptographic algorithms. We've taken a look under the hood of both symmetric and public key algorithms, and we have seen how public-key encryption provides greater security, but at a performance cost. Then we covered some of the common techniques for getting the best of both worlds by using public-key encryption only for the most sensitive data. In particular, we focused on how public-key encryption is used to sign files with certificates that are in turn signed by certification authorities, and which therefore confirm the origin of those files. We've also gone through the procedures for signing an assembly with a strong name and with a certificate.