hematite_server icon indicating copy to clipboard operation
hematite_server copied to clipboard

Impl Protocol Encryption

Open toqueteos opened this issue 10 years ago • 6 comments

External crates required for this:

Reference:

  • http://wiki.vg/Protocol_Encryption#Authentication
  • https://github.com/luqmana/mcchat/blob/master/util.rs (custom SHA-1)
  • https://github.com/luqmana/mcchat/blob/master/crypto.rs (AES_128_CFB8)

toqueteos avatar Mar 03 '15 20:03 toqueteos

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 avatar Mar 07 '15 11:03 toqueteos

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?

toqueteos avatar Mar 07 '15 12:03 toqueteos

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

fenhl avatar Mar 07 '15 20:03 fenhl

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

toqueteos avatar Mar 07 '15 23:03 toqueteos

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.

s1gtrap avatar Jan 05 '16 16:01 s1gtrap

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

toqueteos avatar Jan 06 '16 00:01 toqueteos