Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

don't use PyCrypto library because it's unmaintained + fix MacOS decryption code not removing 16 bytes padding + handle garbage data at end (windows and android) + edit text #103

Closed
wants to merge 2 commits into from

Conversation

xBZZZZ
Copy link

@xBZZZZ xBZZZZ commented Jan 9, 2023

read title

@xBZZZZ xBZZZZ changed the title don't use PyCrypto library because it's unmaintained + fix MacOS decryption code not removing 16 bytes padding + edit text don't use PyCrypto library because it's unmaintained + fix MacOS decryption code not removing 16 bytes padding + handle garbage data at end (windows and android) + edit text Jan 9, 2023
@naoei
Copy link
Contributor

naoei commented Jan 9, 2023

Thank you for the contribution, however it would be much better if you were to split this PR into four, each with the changes you've made in the title. I haven't gone and look into the changes yet but I'll wait until you split it into multiple PRs before reviewing.

@nekitdev
Copy link
Member

nekitdev commented Jan 9, 2023

I need some confirmation as to if the last 4 bytes are garbage here. We are using pycryptodome, which is actively maintained. I'm pretty sure the last 16 bytes are removed, though?

@xBZZZZ
Copy link
Author

xBZZZZ commented Jan 9, 2023

How do I split don't use PyCrypto library because it's unmaintained + fix MacOS decryption code not removing 16 bytes padding?

@naoei
Copy link
Contributor

naoei commented Jan 9, 2023

First off, please learn how to use Git - more specifically Git Branches. There are plenty of great tutorials online to help you with that.

Once you have learned that, create a branch for each of the changes and PR them as normally (making sure you're selecting the correct branch you want to merge in).

@xBZZZZ
Copy link
Author

xBZZZZ commented Jan 9, 2023

I'm pretty sure the last 16 bytes are removed, though?

I think that remove_pad function doesn't work when pad is 16 because 16 is not less than 16.

@xBZZZZ
Copy link
Author

xBZZZZ commented Jan 9, 2023

I don't know how to split don't use PyCrypto library because it's unmaintained + fix MacOS decryption code not removing 16 bytes padding because new MacOS decryption code is completely different than original (link goes to line in files changed tab).

This is not git's fault.

@naoei
Copy link
Contributor

naoei commented Jan 9, 2023

I don't know how to split don't use PyCrypto library because it's unmaintained + fix MacOS decryption code not removing 16 bytes padding because new MacOS decryption code is completely different than original

That's fine to keep as one PR then.

@xBZZZZ
Copy link
Author

xBZZZZ commented Jan 9, 2023

I splitted this pull request into #104, #105, #106, #107.

@nekitdev
Copy link
Member

nekitdev commented Jan 10, 2023

I'm pretty sure the last 16 bytes are removed, though?

I think that remove_pad function doesn't work when pad is 16 because 16 is not less than 16.

pad can't be 16 because padding is not added if the size is divisible by 16.

@nekitdev nekitdev closed this Jan 10, 2023
@xBZZZZ
Copy link
Author

xBZZZZ commented Jan 11, 2023

pad can't be 16 because padding is not added if the size is divisible by 16.

Padding is added if size is divisible by 16.

here is CCLocalLevels.dat from geometry dash for MacOS where padding = 16: https://gdccdated.glitch.me/s/CCLocalLevels_mac16pad.dat

@nekitdev
Copy link
Member

Yeah, you are correct here. Still, we're not using cryptography as it contains much more than we actually need.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants