cipher_tdes.c 982 B

1234567891011121314151617181920212223242526272829
  1. /*
  2. * Copyright 2019-2021 The OpenSSL Project Authors. All Rights Reserved.
  3. *
  4. * Licensed under the Apache License 2.0 (the "License"). You may not use
  5. * this file except in compliance with the License. You can obtain a copy
  6. * in the file LICENSE in the source distribution or at
  7. * https://www.openssl.org/source/license.html
  8. */
  9. /*
  10. * DES low level APIs are deprecated for public use, but still ok for internal
  11. * use.
  12. */
  13. #include "internal/deprecated.h"
  14. #include <openssl/rand.h>
  15. #include <openssl/proverr.h>
  16. #include "prov/ciphercommon.h"
  17. #include "cipher_tdes.h"
  18. #include "prov/implementations.h"
  19. /*
  20. * NOTE: ECB mode does not use an IV - but existing test code is setting
  21. * an IV. Fixing this could potentially make applications break.
  22. */
  23. /* ossl_tdes_ede3_ecb_functions */
  24. IMPLEMENT_tdes_cipher(ede3, EDE3, ecb, ECB, TDES_FLAGS, 64*3, 64, 64, block);
  25. /* ossl_tdes_ede3_cbc_functions */
  26. IMPLEMENT_tdes_cipher(ede3, EDE3, cbc, CBC, TDES_FLAGS, 64*3, 64, 64, block);