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

Transport layer encryption and login #117

Draft
wants to merge 13 commits into
base: dev
Choose a base branch
from

Conversation

RadiatedMonkey
Copy link
Member

@RadiatedMonkey RadiatedMonkey commented Jan 4, 2025

Implements working AES-256 encryption for singular packets together with a login packet implementation.

There's still more testing I need to do before this PR will be ready to merge. For example, I believe currently batched packets are not encrypted correctly, but this should be an issue somewhere else in bedrock-rs rather than the Encryptor module itself. Furthermore, encryption of fragmented packets is broken in Mirai so I also expect it to be broken in this implementation.

Secondly, the login packet decoder has properly been implemented in this PR with the exception of decoding of skin data. This will likely come in a later PR due to the connection with the AddPlayer and PlayerSkin packets.

Lastly, I still need to design a user-friendly API to use login data.

Once these issues are resolved I'll mark this PR as complete.

Changes in this PR:

  • Login packet decoding (currently missing skin decoding)
  • Encryption of the transport layer
  • Fixed some random spelling mistakes and small things

Work in progress:

  • User-friendly API for login data
  • Custom error type for encryption errors
  • Encryption testing for more complicated packet structures

@RadiatedMonkey RadiatedMonkey added C-Proto Category: Protocol P-Medium Priority: Medium labels Jan 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-Proto Category: Protocol P-Medium Priority: Medium
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant