PGP and S/MIME are two methods for securing electronic mail. PGP uses public/private key encryption and digital signatures to provide confidentiality, authentication, integrity and non-repudiation of messages. It operates by encrypting messages and attachments with session keys, then encrypting the session keys with the recipient's public key. S/MIME uses X.509 certificates managed by a hybrid of certificate authorities and a web of trust to encrypt, sign and authenticate email messages using algorithms like DES, RSA and SHA-1. Both aim to protect the confidentiality of email contents and verify the identity of senders.