pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/Joshua-Riek/AES

anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/primer-71a44d5be3f782c5.css" /> GitHub - Joshua-Riek/AES: My implementation of AES 256-bit encryption!
Skip to content

Joshua-Riek/AES

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Advanced Encryption Standard (AES)

My implementation of AES 256-bit encryption written in pure Python! This features the ability to use ECB mode and CBC mode along with various types of input data.

ECB Mode

The simplest of the encryption modes is the Electronic Codebook (ECB) mode.

The message is divided into blocks, and each block is encrypted separately.

# A simple example of encrypting a string with ECB mode!

key = 0x000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f

aes = AES(key)
cyphertext = aes.encrypt('Hello World!')
plaintext = aes.decrypt(cyphertext) 

CBC Mode

In Cipher Block Chaining (CBC) mode, each block of plaintext is XORed with the previous ciphertext block before being encrypted. This can be denoted as:

Encryption: Ci = Ek(Pi xor C(i-1)) and C0 = IV

Decryption: Pi = Dk(Ci) xor C(i-1) and C0 = IV

# A simple example of encrypting bytes with CBC mode!

key = 0x000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f
iv = 0x000102030405060708090a0b0c0d0e0f

aes = AES(key, iv)
cyphertext = aes.encrypt(b'Hello World!')
plaintext = aes.decrypt(cyphertext)

Releases

No releases published

Packages

No packages published

Languages

pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy