Once you start moving more and more of your computing tasks into Emacs, you’re going to need a way of handling passwords. Mail is the canonical example but there are also things like blogging sites, ftp servers and other functions that you want to access from Emacs but that require a password.
With mail, for example, you need a login and password to retrieve your mail from, say, your mail provider’s IMAP server and you may need another set for their SMTP server so you can send mail. One solution is to simply add these to your configuration files but that’s horribly insecure. Of course, as usual, Emacs has us covered. The proper way of doing this is to put all the login/password information into an authinfo file and encrypt it. Emacs will read, decrypt, and parse this file to get the required login/password, requesting the key to decrypt the file if necessary.
Setting this up can be a bit tricky but David Wilson has a nice video that explains how to set up and use the authinfo system. He takes you step-by-step through the process but be sure to read Chris Wellon’s (skeeto) comment on how and why to use an elliptic curve instead of the RSA-based key that Wilson uses.
The video is 38 minutes, 13 seconds so plan accordingly.