Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/z-40/microaes
https://github.com/z-40/microaes
aes cryptography python-3
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/z-40/microaes
- Owner: Z-40
- License: gpl-3.0
- Created: 2021-04-04T13:18:46.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-07-01T04:47:30.000Z (over 3 years ago)
- Last Synced: 2024-10-13T04:02:50.233Z (about 1 month ago)
- Topics: aes, cryptography, python-3
- Language: Python
- Homepage:
- Size: 61.5 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# MicroAES
A pure python implementation of AES (Advanced Encryption Standard) with support for
128, 192 and 256 bit keys and CBC, CTR, CFB and OFB modes of encryption.### Usage
import micro_aesaes = micro_aes.AES(b"MyPassword", b"sAlTDaTa", 32, "sha256")
encrypted_data = aes.encrypt(b"Send Z-40 $100", "cbc", "sha256")
decrypted_data = aes.decrypt(encrypted_data, "cbc", "sha256")print(bytes.hex(encrypted_data))
# Output: 1bbd4a183d5c633e167d50047144ab812ebfa252da1282446a33fc681513a4d63234c18c83b82796dfafebed2714ef3c047c773b050c58048a3a1ea00bbcbd0aprint(decrypted_data)
# Output: b'Send Z-40 $100'### Security Overview
- Same message maps to different cipher texts
- HMAC insures the integrity of the message and prevents attacks such as padding oracle
- SCRYPT helps transform weak passwords into AES keys, HMAC keys and IV### Limitations
This implementation of AES is ***NOT*** Side-Channel attack resistant, however, attacks
can be prevented by clearing memory and deleting objects after usage