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

Encrypted MIXes support #13

Merged
merged 6 commits into from
Jun 29, 2023

Conversation

MortonPL
Copy link
Contributor

This PR adds support for encrypted MIXes by implementing RSA and Blowfish decryption. No external dependencies are introduced.

MIXes with checksum are accepted too, since they can be read as usual if you ignore the checksum at the end. Implementing checksum validation is currently impossible, because it requires linear reading of the entire MIX body, while this project uses random access reading.

Copy link
Owner

@Rampastring Rampastring left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, a couple of small comments.

src/TSMapEditor/CCEngine/MixFile.cs Outdated Show resolved Hide resolved
src/TSMapEditor/CCEngine/MixFile.cs Outdated Show resolved Hide resolved
@MortonPL
Copy link
Contributor Author

Moved decrypted data buffering inside BlowfishStream and reworked the code a bit so that Parse() logic is almost the same with and without encryption.

src/TSMapEditor/CCEngine/MixFile.cs Outdated Show resolved Hide resolved
@Rampastring Rampastring merged commit 034ffc4 into Rampastring:master Jun 29, 2023
1 check passed
@MortonPL MortonPL deleted the feature/decrypt-mixes branch June 29, 2023 14:48
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.

None yet

2 participants