Johni0702 / rust-mumble-protocol

Rust implementation of the Mumble protocol
Other
34 stars 12 forks source link

Use openssl-rust's OCB mode once implemented #1

Open hargoniX opened 4 years ago

hargoniX commented 4 years ago

I recently stumbled upon this lib while writing a little bot for mumble in rust (it turned out to be a little client framework actually take a look if you want. And I saw you're currently implementing AES OCB yourself so I went ahead and started working in integrating it into rust-openssl (tracking issue https://github.com/sfackler/rust-openssl/issues/1268) would be nice if we could integrate this instead of the custom implementation once it's done.

lemon-sh commented 3 months ago

Now that AES-OCB is implemented in rust-openssl, I tried having a go at resolving this issue, but got confused with the IV/nonce. It seems to be 128-bit long (that is also the case upstream), but openssl won't let me use an IV of that size - it returns an empty ErrorStack (it accepts smaller sizes though).

Also I noticed that the upstream file is called CryptStateOCB2.cpp, which hints at OCB2, but I can't find any information about the revision of OCB that OpenSSL is using.