-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test and deprecate Themis 0.9.6 compatibility path #614
Commits on Mar 26, 2020
-
Test for Themis 0.9.6 compatibility
One historical version of Themis has been using incorrect KDF which produced data that cannot be decrypted with the correct function. In order to work around this issue, the code contains a fallback path which tries the incorrect compatibility KDF if decryption fails with the derived key produced by the correct KDF. Unfortunately, this code path is not tested whatsoever and this is not good. Add tests that verify that Themis is able decrypt data produced by buggy Themis 0.9.6. P.S. clang-format surely has some weirdly twisted idea about how byte arrays should be formatted *sigh* whatever...
Configuration menu - View commit details
-
Copy full SHA for 7b500aa - Browse repository at this point
Copy the full SHA 7b500aaView commit details -
Cleanup Context Imprint compatibility code path
Extract key derivation into functions like this is done for Seal and Token Protect mode. This makes the code more readable and highlights the compatibility issue that we are dealing with. Update the usage sites too, remove magic macros, make sure that the derived keys are wiped after processing.
Configuration menu - View commit details
-
Copy full SHA for 459b9e7 - Browse repository at this point
Copy the full SHA 459b9e7View commit details -
Cleanup Context Imprint IV computation
It's really not obvious why Context Imprint's IV computatation is performed with a key derivation function. At least extract this bit into a separate function that can be commented. Cleanup the usage sites, replace macros with plain C code, make sure that IV is wiped after processing since it is derived from the key.
Configuration menu - View commit details
-
Copy full SHA for 5adcf33 - Browse repository at this point
Copy the full SHA 5adcf33View commit details -
Drop unused typedef themis_sym_message_hdr_t
It has never been used since Context Imprint mode does not produce any authentication token that needs a header.
Configuration menu - View commit details
-
Copy full SHA for b31cf33 - Browse repository at this point
Copy the full SHA b31cf33View commit details -
Remove SCELL_COMPAT define and ignore NO_SCELL_COMPAT variable
It does not really make much sense for the users to not enable the compatibility code path that allows to decrypt historical data. In fact, not a single build that we distribute disables this code path. Remove all SCELL_COMPAT ifdefs and ignore NO_SCELL_COMPAT setting, making the compatibility always enabled. This has a side effect of slightly slowing down decryption of really corrupted messages since we will be always trying the fallback path. However, this is not that significant loss as originally envisioned, and normal usage of Themis should not be affected.
Configuration menu - View commit details
-
Copy full SHA for 8a1781f - Browse repository at this point
Copy the full SHA 8a1781fView commit details -
Use compatibility path on 32-bit machines too
First of all, 64-bit machines are more common so this code path will be used in almost all cases. Second, 32-bit machines may need to deal with data encrypted by Themis 0.9.6 on 64-bit machines, so disabling it for 32-bit machines does not make much sense.
Configuration menu - View commit details
-
Copy full SHA for dfa33a5 - Browse repository at this point
Copy the full SHA dfa33a5View commit details
Commits on Mar 27, 2020
-
Revert "Remove SCELL_COMPAT define and ignore NO_SCELL_COMPAT variable"
This reverts commit 8a1781f.
Configuration menu - View commit details
-
Copy full SHA for 545e782 - Browse repository at this point
Copy the full SHA 545e782View commit details -
Disable SCELL_COMPAT by default
Leave the compatibility code disable by default from now on. The NO_SCELL_COMPAT configuration variable is now ignored. Instead, WITH_SCELL_COMPAT=1 will enable the compatibility. This compatibility code is going to be removed when Themis 0.9.6 finally reaches end-of-life on 2020-12-13, so we are getting ready for it.
Configuration menu - View commit details
-
Copy full SHA for a6de319 - Browse repository at this point
Copy the full SHA a6de319View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9676fda - Browse repository at this point
Copy the full SHA 9676fdaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 39a4a1a - Browse repository at this point
Copy the full SHA 39a4a1aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0846314 - Browse repository at this point
Copy the full SHA 0846314View commit details
Commits on Mar 28, 2020
-
Move "error" label inside SCELL_COMPAT ifdef
It happens to be used only by the compatibility code, so if it is disabled then compiler starts spewing warnings about unused labels and this makes our warning-free CI build unhappy. We will not need this label with compatibility code removed so move it there.
Configuration menu - View commit details
-
Copy full SHA for ab34fa2 - Browse repository at this point
Copy the full SHA ab34fa2View commit details -
Merge branch 'master' into always-compat
Sync with master branch since some of git hackery in CocoaPods builds seems to be not working well with branches. It should be okay when this code is synchronized with master.
Configuration menu - View commit details
-
Copy full SHA for 5631124 - Browse repository at this point
Copy the full SHA 5631124View commit details
Commits on Mar 30, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 78ffd13 - Browse repository at this point
Copy the full SHA 78ffd13View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7932990 - Browse repository at this point
Copy the full SHA 7932990View commit details