Computer encryption uses cryptography to secure online transactions. There are two main types of encryption: symmetric-key encryption where both computers share the same key, and public-key encryption which uses different keys for encryption and decryption. Encryption encodes data during transmission while authentication verifies the identity of the sender and that the data hasn't been altered. Together, encryption and authentication create a secure online environment for sharing information.