Closed xp4xbox closed 4 years ago
You should probably add a branch for this
This can be done using pycryptodome.
cryptography is another solid option
I tried it before it didn't work it would crash when sending the data over as bytes.
Cryptography should work fine, probably a typo or something
lol it wasnt a typo, it was something not working with converting the data types iirc. Il try it again and see what the error was.
I tried this again by modifying the recv and send functions but there seems to be a problem when decrypting the data using the key that was sent to the client by the server,
If you want to give it a go @Y4hL .
If you upload the code you have to far somewhere I can help you out. I probably won't write it myself, since it would probably end up like my own project.
oh shit your working on your own, that's nice. Il push the code under a new branch.
I just pushed the changes to the new branch.
im getting invalid token and padding errors.
You are getting an error because you have not setup a proper protocol for sending over large amounts of data.
Example: Currently when you are sending a file you are sending the file size to the server and then sending the file over encrypted. This does not work, because when encrypted, the file becomes bigger and the server is no longer receiving for the right amount of bytes.
ok il fix that.
Encrypt everything being transferred and then decrypt on receiving using a shared key.