paint-brush
How to Use AES-256 Cipher: Python Cryptography Examplesby@wagslane
16,182 reads
16,182 reads

How to Use AES-256 Cipher: Python Cryptography Examples

by Lane Wagner5mFebruary 23rd, 2020
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

A simple encrypt(plain_text, password) function uses the password to encrypt the plain text. The same person who is encrypting the data is typically decrypting it as well (think password manager) The library supplies us with a secure nonce. Scrypt is used to generate a secure private key from the password. A new random salt is used for each run of our encryption. This makes it impossible for an attacker to use precomputed hashes in an attempt to crack the cipher. A random nonce must be a random and unique value for each time our encryption function is used.

People Mentioned

Mention Thumbnail

Companies Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - How to Use AES-256 Cipher: Python Cryptography Examples
Lane Wagner HackerNoon profile picture
Lane Wagner

Lane Wagner

@wagslane

Founder of Boot.dev. Whining about coding sins since 2011. Committing coding sins for the same.

About @wagslane
LEARN MORE ABOUT @WAGSLANE'S
EXPERTISE AND PLACE ON THE INTERNET.
L O A D I N G
. . . comments & more!

About Author

Lane Wagner HackerNoon profile picture
Lane Wagner@wagslane
Founder of Boot.dev. Whining about coding sins since 2011. Committing coding sins for the same.

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite
Also published here