# File encryption in Python: An in-depth exploration of symmetric and asymmetric techniques

DevFeed: [File encryption in Python: An in-depth exploration of symmetric and asymmetric techniques](<https://devfeed.tech/articles/file-encryption-in-python-an-in-depth-exploration-of-symmetric-and-asymmetric-techniques-8200.md>)

Original publisher: [Read original article](<https://snyk.io/blog/symmetric-asymmetric-file-encryption-in-python/>)

Author: Keshav Malik

Published: 2023-11-22T05:00:00Z

Content type: tutorial

Language: en

Sources: [Blog RSS Feed | Snyk](<https://devfeed.tech/sources/blog-rss-feed-snyk.md>)

Topics: [Encryption](<https://devfeed.tech/topics/encryption.md>), [Python](<https://devfeed.tech/topics/python.md>), [Cryptography](<https://devfeed.tech/topics/cryptography.md>), [Amazon Web Services](<https://devfeed.tech/topics/aws.md>), [SDKs](<https://devfeed.tech/topics/sdks.md>), [Command-line interface](<https://devfeed.tech/topics/cli.md>)

Tags: [amazon-web-services](<https://devfeed.tech/tags/amazon-web-services.md>), [application-security](<https://devfeed.tech/tags/application-security.md>), [awareness](<https://devfeed.tech/tags/awareness.md>), [blog](<https://devfeed.tech/tags/blog.md>), [contentlab](<https://devfeed.tech/tags/contentlab.md>), [cryptography](<https://devfeed.tech/tags/cryptography.md>), [developer](<https://devfeed.tech/tags/developer.md>), [encryption](<https://devfeed.tech/tags/encryption.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [kms](<https://devfeed.tech/tags/kms.md>), [python](<https://devfeed.tech/tags/python.md>), [security](<https://devfeed.tech/tags/security.md>), [techniques](<https://devfeed.tech/tags/techniques.md>), [tutorial](<https://devfeed.tech/tags/tutorial.md>)

## AI overview

This tutorial explains symmetric and asymmetric file encryption in Python. It covers symmetric encryption with Amazon KMS and PyNaCl SecretBox, then introduces asymmetric encryption with PyNaCl's public/private box, including the prerequisites and packages needed to follow along.

## Source excerpt

This article dives into the world of encryption in Python. For symmetric encryption, we'll focus on Amazon's Key Management Service (KMS) and PyNaCl SecretBox. Then, we'll look at asymmetric encryption and PyNaCl's public/private box.