1. Aug 20, 2021
  2. Feb 26, 2021
  3. Dec 11, 2020
  4. Dec 07, 2020
    • igrkir's avatar
      backport commit 2dd3a2f2 from master (#301) · 2bbbb457
      igrkir authored
      * backport commit 2dd3a2f2
      
       from master
      
      update magma cipher ctr_acpkm mode encrypting
      
      Fixed bug when acpkm key meshing didn't apply at appropriate time
      during TLS secure exchange.
      Unify usage of 'num' variable of EVP_CIPHER_CTX for kuznetchik and
      magma.
      
      * correct define variable dependency
      
      add optional compiling setting for EVP_CTRL_TLS1_2_TLSTREE variable
      
      Co-authored-by: default avatarIgor Kirillov <i.kirillov@kryptonite.ru>
      2bbbb457
  5. Dec 06, 2020
    • Alexei A. Smekalkine's avatar
      gost_crypt: process full available block in CFB and CNT mode · fbd7748f
      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)
      fbd7748f
  6. Nov 29, 2020
  7. Oct 31, 2020
  8. Oct 29, 2020
    • Vitaly Chikunov's avatar
      CMakeLists.txt: Fix warning on gcc-9 · ca0646fc
      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
      (cherry picked from commit 6c7addf7)
      ca0646fc
  9. Sep 18, 2020
  10. Aug 07, 2020
  11. May 03, 2020
  12. May 02, 2020
  13. May 01, 2020
  14. Mar 01, 2020
  15. Feb 27, 2020
  16. Feb 26, 2020
  17. Feb 22, 2020
  18. Feb 18, 2020
  19. Feb 14, 2020
  20. Feb 10, 2020
  21. Feb 06, 2020
    • Vitaly Chikunov's avatar
      gosthash2012_const: Remove unused arrays with constants · 4d72cb81
      Vitaly Chikunov authored
      This probably would reduce size of the library. And remove
      some 'not used' warnings (-Wunused-const-variable).
      
      Previously `Ax' is generated dynamically from `A` and `Pi` in
      `GOST3411Init', but in 2013 it is moved into `gosthash2012_precalc.h`.
      `Tau' is unrolled and eliminated in 2013 too.
      4d72cb81
    • Vitaly Chikunov's avatar
      gosthash2012: Issue EMMS on 32-bit SIMD implementation · 3b827f9f
      Vitaly Chikunov authored
      `_mm_empty' is not needed on x86_64, because we only using SSE2.
      
      But, I didn't notice that EXTRACT32 (32-bit version of EXTRACT) is
      using MMX registers and intrinsics, so complete removing of
      `_mm_empty' (EMMS) was mistake.
      
      Make it presence conditional only for IA-32.
      
      Fixes: 211489fa ("gosthash2012: Improve SIMD implementation")
      3b827f9f