Urgent assistance with AES-128 Encryption/Decryption Without Libraries in Python for a School Project
Posted by Prestigious_Depth341@reddit | talesfromtechsupport | View on Reddit | 3 comments
Hi everyone, I’m working on a school project due the day after tomorrow, and I really need help with implementing AES-128 encryption and decryption for files in Python without using the aes library so I’m implementing all AES functions from scratch—such as SubBytes
, MixColumns
, ShiftRows
, and AddRoundKey
.
So far, I’ve managed to get the encryption part working (or at least I think it’s correct), but I’m completely stuck on decryption. I’m not sure if the issue is because of something in the encryption step or if there’s a problem in how I’m handling the decryption.I’ve tried several approaches for decryption, but the output remains encrypted—I’m not getting the original file back.
Here’s what’s happening:
- I feel completely lost, and I’m running out of time—any guidance on implementing AES-128 decryption without a library would be a huge help.
- I’ve tried various codes for decryption, but I don’t end up with the decrypted file; it’s still unreadable or looks like encrypted data
Any tips, resources, or even an outline of the decryption process would mean a lot. Thanks in advance for your help!
jimicus@reddit
While your solution can't use libraries, is there any reason you can't use them to verify your work? ie. use an existing solution to decrypt your own ciphertext and vice versa?
Because right now, for all you know your decryption is just fine but your encryption is broken.
Crafty-Most-4944@reddit
This is not the correct subreddit for this
Expensive-Example-92@reddit
Wrong subreddit. This is about posting stories about your adventures as tech support/similar. Try other subreddits like r/Programming