1. Feb 07, 2021
  2. Jan 21, 2021
  3. Jan 08, 2021
  4. Dec 06, 2020
    • Alexei A. Smekalkine's avatar
      gost_crypt: process full available block in CFB and CNT mode · 711b83cb
      Alexei A. Smekalkine authored
      If at the input of the encryption function in the CFB mode we have
      an integer number of blocks, then in the main loop all blocks will be
      processed, except for the last one due to an incorrect border check.
      The last block will be fully processed as a "partial" remainder, but
      the initialization vector will not be updated. And, thus, the value
      of IV will always be incorrect in this case.
      
      This breaks stateless protocols due to an invalid initialization vector:
      all messages except the first cannot be decrypted. (Naturally, we are
      talking about a case with disabled key meshing, which does not allow
      context recovery due to an erroneous implementation.)
      
      It is worth noting here that the code for processing partial blocks
      (both at the input of the encryption functions and at the output) is
      a historically unnecessary artifact, since we do not set the
      EVP_CIPH_FLAG_CUSTOM_CIPHER flag and, as a result, OpenSSL processes
      partial blocks for us.
      
      This patch corrects the checking of the main loop boundary.
      
      A similar error is present in the code for the CNT mode, but there it
      does not manifest itself in any way, because the restoration of the
      state in this mode is impossible: even after disabling key meshing, we
      still have the state-dependent transformation of the IV.
      
      As an extra result of this fix, the code for processing partial blocks
      can be completely removed now.
      
      (cherry picked from commit cf402dd4)
      711b83cb
  5. Nov 29, 2020
  6. Nov 20, 2020
  7. Nov 13, 2020
  8. Nov 05, 2020
  9. Oct 29, 2020
    • Vitaly Chikunov's avatar
      CMakeLists.txt: Fix warning on gcc-9 · 6c7addf7
      Vitaly Chikunov authored
      /root/rpmbuild/BUILD/openssl-gost-engine-1.1.1/CMakeFiles/CMakeTmp/src.c:4:14: warning: initialization of 'int *' from incompatible pointer type 'char *' [-Wincompatible-pointer-types]
          4 |     int *p = buf + 1;
            |              ^~~
      /root/rpmbuild/BUILD/openssl-gost-engine-1.1.1/CMakeFiles/CMakeTmp/src.c:5:14: warning: initialization of 'int *' from incompatible pointer type 'char *' [-Wincompatible-pointer-types]
          5 |     int *q = buf + 2;
            |              ^~~
      
      Reported-by: Ilya Shipitsin <https://github.com/chipitsine>
      Fixes: #288
      6c7addf7
  10. Oct 09, 2020
  11. Oct 04, 2020
  12. Sep 27, 2020
  13. Sep 24, 2020
  14. Sep 21, 2020
  15. Sep 18, 2020
  16. Sep 02, 2020
  17. Aug 28, 2020
  18. Aug 22, 2020
  19. Aug 21, 2020
  20. Aug 20, 2020
  21. Aug 13, 2020
  22. Aug 11, 2020
  23. Aug 06, 2020
  24. Jul 24, 2020
  25. Jul 22, 2020
  26. Jul 11, 2020
  27. Jul 10, 2020