Closed herman97 closed 2 years ago
You could have a look at https://github.com/mumble-voip/mumble/pull/4824
The en- and decryption goes through https://github.com/mumble-voip/mumble/blob/master/src/crypto/CryptState.h
Is that already helpful?
Yes that is somewhat helpful, thank you!
Do you mean that I should implement my own version that inherits from cryptstate?
Also, how and where is the audio mixing performed? Since i assume that the voice is decrypted at the server for that to be done?
Do you mean that I should implement my own version that inherits from cryptstate?
If you want your implementation to fit nicely within the existing code, then I think that would be the easiest way, yes. Alternatively you could also completely bypass this class and then change the actual code where the en- and decryption happens.
client-side decryption: https://github.com/mumble-voip/mumble/blob/00fdfbcf276a284f05cf6e1218e02cb8de7568f5/src/mumble/ServerHandler.cpp#L229-L230 client-side encryption: https://github.com/mumble-voip/mumble/blob/00fdfbcf276a284f05cf6e1218e02cb8de7568f5/src/mumble/ServerHandler.cpp#L304 server-side decryption: https://github.com/mumble-voip/mumble/blob/00fdfbcf276a284f05cf6e1218e02cb8de7568f5/src/murmur/Server.cpp#L969-L970 server-side encryption: https://github.com/mumble-voip/mumble/blob/00fdfbcf276a284f05cf6e1218e02cb8de7568f5/src/murmur/Server.cpp#L1004-L1005
Also, how and where is the audio mixing performed? Since i assume that the voice is decrypted at the server for that to be done?
https://github.com/mumble-voip/mumble/blob/00fdfbcf276a284f05cf6e1218e02cb8de7568f5/src/mumble/AudioOutput.cpp#L354 However, at this point the audio has been decrypted long ago (see above)
One additional note to make sure you are aware of this: If you change the used encryption scheme, your adapted client and server will be completely incompatible with the mainline clients and servers.
Alright, thank you I think this will help very much!
One more question, does this mean that the voice mixing is performed on the client-side and not the server-side? For example when multiple people speak at the same time I assume that their voices get mixed together and before someone else hear it?
Yes all audio processing is performed entirely client-side. The server only receives and distributes audio packets but never actually touches the contained audio.
Alright, would it be possible to move the mixing to the server? Since I am trying to implement homomorphic encryption I don't want to decrypt anything on the server, but I would also like to use the homomorphic encryption features of being able to use addition and multiplication on the data that is encrypted.
And how come the data being transferred is decrypted on the server although no mixing is performed there?
would it be possible to move the mixing to the server?
Not without completely rewriting how audio is handled.
And how come the data being transferred is decrypted on the server although no mixing is performed there?
The encryption is not end-to-end, so the server has to re-encrypt the message depending on the respective recipient.
Alright, I will have to try that then! Furthermore, I can't seem to understand how text is sent either, are text messages encrypted?
(Thank you for the help, even though I might have stupid questions)
Text messages are transferred via TCP by means of the Protobuf message format - see https://github.com/mumble-voip/mumble/blob/c317d57008714edff2f77f7ae6a313fdf1685539/src/Mumble.proto#L259-L272
It is encrypted via TLS (as all TCP messages are)
EDIT: Maybe also relevant for you: https://github.com/mumble-voip/mumble/blob/master/docs/dev/TheMumbleSourceCode.md
Alright, thank you for your help!
You're welcome.
I'll close this as resolved then.
The issue
Hello!
I am trying to change the encryption algorithm so that mumble uses homomorphic encryption instead of the current implementation.
I was wondering in which files the encryption/decryption happens? After trying to print in different functions to see where and on what encryption and decryption run, I can´t seem to find any time when decryption run?
I am trying to encrypt and decrypt both voice and text.
Help is much appreciated!
Mumble version
1.5.0
Mumble component
Both
OS
Linux
Additional information
No response