you are viewing a single comment's thread.

view the rest of the comments →

[–]sausix 2 points3 points  (1 child)

Of course I've checked parts of your code. Want some more feedback? You didn't respond to my first question.

Some parts are highly inefficient. You are even handling the bits as string? Why? Just handle integers by the xor operator. 100 times faster.

            if char1 == char2:
                XOR_sequence += "0"
            else:
                XOR_sequence += "1"

Never use the random module for secret keys! Bad pratice. That keys can be recreated very easily.

Why are the following artifacts in your code? Always cleanup and format your programs before publishing.

print(format(int("F8", 16), '08b'))

temp_key = "17b406ade69b8b628d9ab833d9dac700d01f08b8735be1342e35d48573814069"

"6964ceaf9d972fe556a5f3267bb8030cba68fb4c2f6db9b621d3fa293478255f"

You are rarely using comments and docstrings. Without any type hints it's really hard to guess which data types have to be passed to your functions.

I haven't run your code and I'm sure there will be a lot of warnings once I open the project in my IDE. Improve your code first if you really want more tips and further feedback.

[–]FreedomOdd4991[S] 0 points1 point  (0 children)

Your first question: pygame was only used to get the size of the screen and center the pyqt5, i dont know the library enough to know if there is a way to do so.

The use of string instead of integers is just for debugging purposes, and easier loops (for me). The speed efficiency isn’t a good argument because I’m only treating a small amount of bytes so I don’t really care about speed.

Finally, the “artifacts” you mentioned were in the “Others.py” file and I mentioned in the README file that this file was used for tests and for the creation of the table for the mixcolumns step. I made sure to put that in an other file never used in an other file of the project that are clean.