bedrock-crustaceans / bedrockrs

Universal library for MCBE in Rust
Apache License 2.0
53 stars 10 forks source link

Handshake (Add encryption) #50

Open theaddonn opened 1 month ago

ismaileke commented 4 days ago

https://github.com/ismaileke/raknet-client/blob/master/src/utils/encryption.rs Encryption file (client side) that i used in my project and inspired by PocketMine-MP. At least it can give us an idea

https://github.com/pmmp/PocketMine-MP/blob/0a7cbdd56df893c1778b72ca0bd452555ccf7c4d/src/network/mcpe/NetworkSession.php#L900

https://github.com/pmmp/PocketMine-MP/blob/stable/src/network/mcpe/encryption/PrepareEncryptionTask.php

theaddonn commented 4 days ago

Since we are rewriting some major parts of the protocol right now in the https://github.com/bedrock-crustaceans/bedrockrs/tree/proto_rework branch... we might want to implement encryption. I have noticed that ruben has taken interest in implementing this...

RadiatedMonkey commented 3 days ago

If ismaileke wants to work on it, I'm fine with that too. In case they need it I can give some help.

@ismaileke my own server software also has a working encryption implementation in Rust at https://github.com/teampathfinders/mirai/tree/master/crates/proto/src/crypto

ismaileke commented 3 days ago

you're better at this, you should definitely do it @RadiatedMonkey

i've been working on rust for about 1 month and im still not good enough. the code in your projects still doesn't make enough sense to me(my problem). so you should do it.