Commit Graph

13 Commits

Author SHA1 Message Date
Terry Geng
e90eb8c4cd
src: Made CryptState an abstract class, in order to support multiple crypto types in the future. Moved all crypto-related files into src/crypto. 2020-06-06 20:37:59 +08:00
Jonas Herzig
be97594046 Safeguard from potential attacks against OCB2
OCB2 is known to be broken under certain conditions:
https://eprint.iacr.org/2019/311

To execute the universal attacks described in the paper, an attacker needs
access to an encryption oracle that allows it to perform encryption queries with
attacker-chosen nonce. Luckily in Mumble the encryption nonce is a fixed counter
which is far too restrictive for the universal attacks to be feasible against
Mumble.

The basic attacks do not require an attacker-chosen nonce and as such are more
applicable to Mumble. They are however of limited use and do require an en- and
a decryption oracle which Mumble seemingly does not provide at the same time.

To be on the safe side, this commit implements the counter-cryptanalysis
measure described in the paper in section 9 for the sender and receiver side.
This way if either server of client are patched, their communication is almost
certainly (merely lacking formal proof) not susceptible to the attacks described
in the paper.
2020-06-05 12:56:18 +02:00
Davide Beatrici
4e67a2fafb Auto-update LICENSE.header in source files 2020-01-07 03:09:22 +01:00
Davide Beatrici
15831dbca8 Add missing includes for "no-pch" build
This commit adds all the missing includes when the PCH header is not used.

Also, some includes are reordered and/or made consistent (e.g. "#include <QtEndian>" -> "#include <QtCore/QtEndian>").
2019-09-12 22:08:39 +02:00
Davide Beatrici
5a07244a44 Don't include PCH headers directly
According to Qt's documentation the PCH header doesn't need to be included.

From https://doc.qt.io/qt-5/qmake-precompiledheaders.html:

"To make your project use precompiled headers, you only need to define the PRECOMPILED_HEADER variable in your project file."

"qmake will handle the rest, to ensure the creation and use of the precompiled header file. You do not need to include the precompiled header file in HEADERS, as qmake will do this if the configuration supports precompiled headers."
2019-09-12 00:13:35 +02:00
Davide Beatrici
b427333257 Auto-update LICENSE.header in source files 2019-01-25 04:56:19 +01:00
Mikkel Krautz
5192831bc6 src/tests: update .pro files to append to SOURCES and HEADERS instead of overwriting them.
Now that test.pri adds source files and headers by default, the .pro files
of our tests need to append to SOURCES and HEADERS to ensure everything
test.pri adds to SOURCES and HEADERS are kept around.
2018-01-04 11:21:44 +01:00
Mikkel Krautz
f6ba3a52bf Auto-update LICENSE.header in source files. 2018-01-01 23:05:37 +01:00
Mikkel Krautz
6892c8b29a src/tests: update tests to initialize and destroy the MumbleSSL module to ensure OpenSSL is properly initialized. 2017-07-17 10:19:21 +02:00
Mikkel Krautz
57b3aa60fd tests: depend on OpenSSL in test.pri instead of each individual test.
The murmur_pch.h file which most tests use -- either directly,
or indrectly -- depends on being able to include OpenSSL headers.

Some of our tests did not include(qmake/openssl.pri), which meant that
those tests would fail to build in CONFIG(no-pch), such as on macOS.

This commit works around that issue by depending on OpenSSL for all tests.
2017-03-28 01:04:46 +02:00
Mikkel Krautz
15609703e4 src/tests: make all test .pro files 'inherit' from common test.pri file.
This refactors a lot of the common code from each test file into
a test.pri file, which is then included by all of our tests.
2017-03-02 02:28:19 +01:00
Mikkel Krautz
cba18e97b2 src/tests: fix various MSVC build issues.
This makes 'jom check' pass on our win32-static buildenv with MSVC 2015.
2017-02-28 01:03:56 +01:00
Mikkel Krautz
7b25a058c2 tests: move TestCrypt to the new testing infrastructure. 2017-02-26 23:50:21 +01:00