PistonDevelopers / hematite_server

A Minecraft server clone
http://hematite.piston.rs/
MIT License
140 stars 16 forks source link

Impl Protocol Encryption #30

Open toqueteos opened 9 years ago

toqueteos commented 9 years ago

External crates required for this:

Reference:

toqueteos commented 9 years ago

Neither rust-crypto or openssl-sys provide EVP_aes_128_cfb8 which is required for this to work, it seems we have to follow @luqmana s approach and do it manually or send PR to one of those.

EDIT: There's hope https://github.com/DaGenix/rust-crypto/pull/92

There's AesSafe128Encryptor, AesSafe128Decryptor and PkcsPadding which can get us there.

toqueteos commented 9 years ago

I would like to know if everyone is fine with me porting Go's AES impl, it's super concise and well explained.

We just need AES_128 support and I've implemented CFB8 succesfully in the past; it was not formally verified but worked perfectly with MC 1.5 back then, encryption hasn't changed so it should still work.

I was gonna say that way we don't need the openssl but crate but we NEED it anyways because HTTP libraries include it and we need SHA1 support too. The thing is no one implements CFB8 right now and it seems that's not gonna change soon.

Any thoughts?

fenhl commented 9 years ago

Why are there 2 issues with the same title? (This one and #29)

toqueteos commented 9 years ago

My bad, #29 is compression. I just fixed it!

s1gtrap commented 8 years ago

Are you still working on this @toqueteos? I've been toying with openssl for this (despite it not being super thread friendly), and I have it working alright.

toqueteos commented 8 years ago

@bheart Sorry for the delay. No I'm not working on this, feel free to send in a PR for it! :+1: