diff --git a/docs/INSTALL.rst b/docs/INSTALL.rst
index d97236d..3fb4e59 100644
--- a/docs/INSTALL.rst
+++ b/docs/INSTALL.rst
@@ -36,7 +36,7 @@
 -  Python >= 3.6
 -  pkg-config
 -  Boost >= 1.65.1
--  OpenSSL >= 1.0.2
+-  OpenSSL >= 1.1.1
 -  SQLite 3.x
 
 To build ndn-cxx from source, one must first install a C++ compiler and all necessary
diff --git a/ndn-cxx/security/impl/openssl-helper.cpp b/ndn-cxx/security/impl/openssl-helper.cpp
index cff01b1..c9c0cbf 100644
--- a/ndn-cxx/security/impl/openssl-helper.cpp
+++ b/ndn-cxx/security/impl/openssl-helper.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2013-2021 Regents of the University of California.
+ * Copyright (c) 2013-2022 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -37,13 +37,12 @@
     return EVP_sha384();
   case DigestAlgorithm::SHA512:
     return EVP_sha512();
-#if OPENSSL_VERSION_NUMBER >= 0x1010000fL && !defined(OPENSSL_NO_BLAKE2)
+#ifndef OPENSSL_NO_BLAKE2
   case DigestAlgorithm::BLAKE2B_512:
     return EVP_blake2b512();
   case DigestAlgorithm::BLAKE2S_256:
     return EVP_blake2s256();
 #endif
-#if OPENSSL_VERSION_NUMBER >= 0x10101001L
   case DigestAlgorithm::SHA3_224:
     return EVP_sha3_224();
   case DigestAlgorithm::SHA3_256:
@@ -52,29 +51,19 @@
     return EVP_sha3_384();
   case DigestAlgorithm::SHA3_512:
     return EVP_sha3_512();
-#endif
   default:
     return nullptr;
   }
 }
 
 int
-getEvpPkeyType(EVP_PKEY* key)
+getEvpPkeyType(const EVP_PKEY* key)
 {
-  return
-#if OPENSSL_VERSION_NUMBER < 0x1010000fL
-    EVP_PKEY_type(key->type);
-#else
-    EVP_PKEY_base_id(key);
-#endif
+  return EVP_PKEY_base_id(key);
 }
 
 EvpMdCtx::EvpMdCtx()
-#if OPENSSL_VERSION_NUMBER < 0x1010000fL
-  : m_ctx(EVP_MD_CTX_create())
-#else
   : m_ctx(EVP_MD_CTX_new())
-#endif
 {
   if (m_ctx == nullptr)
     NDN_THROW(std::runtime_error("EVP_MD_CTX creation failed"));
@@ -82,11 +71,7 @@
 
 EvpMdCtx::~EvpMdCtx()
 {
-#if OPENSSL_VERSION_NUMBER < 0x1010000fL
-  EVP_MD_CTX_destroy(m_ctx);
-#else
   EVP_MD_CTX_free(m_ctx);
-#endif
 }
 
 EvpPkeyCtx::EvpPkeyCtx(EVP_PKEY* key)
@@ -108,7 +93,7 @@
   EVP_PKEY_CTX_free(m_ctx);
 }
 
-Bio::Bio(Bio::MethodPtr method)
+Bio::Bio(const BIO_METHOD* method)
   : m_bio(BIO_new(method))
 {
   if (m_bio == nullptr)
diff --git a/ndn-cxx/security/impl/openssl-helper.hpp b/ndn-cxx/security/impl/openssl-helper.hpp
index 647bba4..c1da8b8 100644
--- a/ndn-cxx/security/impl/openssl-helper.hpp
+++ b/ndn-cxx/security/impl/openssl-helper.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2013-2021 Regents of the University of California.
+ * Copyright (c) 2013-2022 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -33,7 +33,7 @@
 digestAlgorithmToEvpMd(DigestAlgorithm algo);
 
 NDN_CXX_NODISCARD int
-getEvpPkeyType(EVP_PKEY* key);
+getEvpPkeyType(const EVP_PKEY* key);
 
 class EvpMdCtx : noncopyable
 {
@@ -74,14 +74,8 @@
 class Bio : noncopyable
 {
 public:
-#if OPENSSL_VERSION_NUMBER < 0x1010000fL
-  using MethodPtr = BIO_METHOD*;
-#else
-  using MethodPtr = const BIO_METHOD*;
-#endif // OPENSSL_VERSION_NUMBER < 0x1010000fL
-
   explicit
-  Bio(MethodPtr method);
+  Bio(const BIO_METHOD* method);
 
   ~Bio();
 
diff --git a/ndn-cxx/security/transform/private-key.cpp b/ndn-cxx/security/transform/private-key.cpp
index 63e3854..b2e2aad 100644
--- a/ndn-cxx/security/transform/private-key.cpp
+++ b/ndn-cxx/security/transform/private-key.cpp
@@ -51,18 +51,6 @@
 namespace security {
 namespace transform {
 
-static void
-opensslInitAlgorithms()
-{
-#if OPENSSL_VERSION_NUMBER < 0x1010000fL
-  static bool isInitialized = false;
-  if (!isInitialized) {
-    OpenSSL_add_all_algorithms();
-    isInitialized = true;
-  }
-#endif // OPENSSL_VERSION_NUMBER < 0x1010000fL
-}
-
 class PrivateKey::Impl : noncopyable
 {
 public:
@@ -73,10 +61,6 @@
 
 public:
   EVP_PKEY* key = nullptr;
-
-#if OPENSSL_VERSION_NUMBER < 0x1010100fL
-  size_t keySize = 0; // in bits, used only for HMAC
-#endif
 };
 
 PrivateKey::PrivateKey()
@@ -112,13 +96,9 @@
     case KeyType::EC:
       return static_cast<size_t>(EVP_PKEY_bits(m_impl->key));
     case KeyType::HMAC: {
-#if OPENSSL_VERSION_NUMBER >= 0x1010100fL
       size_t nBytes = 0;
       EVP_PKEY_get_raw_private_key(m_impl->key, nullptr, &nBytes);
       return nBytes * 8;
-#else
-      return m_impl->keySize;
-#endif
     }
     default:
       return 0;
@@ -132,15 +112,8 @@
     NDN_THROW(Error("Digest is not supported for key type " +
                     boost::lexical_cast<std::string>(getKeyType())));
 
-  const uint8_t* buf = nullptr;
   size_t len = 0;
-#if OPENSSL_VERSION_NUMBER >= 0x1010000fL
-  buf = EVP_PKEY_get0_hmac(m_impl->key, &len);
-#else
-  const auto* octstr = reinterpret_cast<ASN1_OCTET_STRING*>(EVP_PKEY_get0(m_impl->key));
-  buf = octstr->data;
-  len = octstr->length;
-#endif
+  const uint8_t* buf = EVP_PKEY_get0_hmac(m_impl->key, &len);
   if (buf == nullptr)
     NDN_THROW(Error("Failed to obtain raw key pointer"));
   if (len * 8 != getKeySize())
@@ -165,25 +138,15 @@
     NDN_THROW(std::invalid_argument("Unsupported key type " + boost::lexical_cast<std::string>(type)));
   }
 
-  m_impl->key =
-#if OPENSSL_VERSION_NUMBER >= 0x1010100fL
-      EVP_PKEY_new_raw_private_key(pkeyType, nullptr, buf.data(), buf.size());
-#else
-      EVP_PKEY_new_mac_key(pkeyType, nullptr, buf.data(), static_cast<int>(buf.size()));
-#endif
+  m_impl->key = EVP_PKEY_new_raw_private_key(pkeyType, nullptr, buf.data(), buf.size());
   if (m_impl->key == nullptr)
     NDN_THROW(Error("Failed to load private key"));
-
-#if OPENSSL_VERSION_NUMBER < 0x1010100fL
-  m_impl->keySize = buf.size() * 8;
-#endif
 }
 
 void
 PrivateKey::loadPkcs1(span<const uint8_t> buf)
 {
   ENSURE_PRIVATE_KEY_NOT_LOADED(m_impl->key);
-  opensslInitAlgorithms();
 
   auto ptr = buf.data();
   if (d2i_AutoPrivateKey(&m_impl->key, &ptr, static_cast<long>(buf.size())) == nullptr)
@@ -219,7 +182,6 @@
 {
   BOOST_ASSERT(std::strlen(pw) == pwLen);
   ENSURE_PRIVATE_KEY_NOT_LOADED(m_impl->key);
-  opensslInitAlgorithms();
 
   detail::Bio membio(BIO_s_mem());
   if (!membio.write(buf))
@@ -241,7 +203,6 @@
 PrivateKey::loadPkcs8(span<const uint8_t> buf, PasswordCallback pwCallback)
 {
   ENSURE_PRIVATE_KEY_NOT_LOADED(m_impl->key);
-  opensslInitAlgorithms();
 
   detail::Bio membio(BIO_s_mem());
   if (!membio.write(buf))
@@ -382,7 +343,6 @@
 PrivateKey::toPkcs1() const
 {
   ENSURE_PRIVATE_KEY_LOADED(m_impl->key);
-  opensslInitAlgorithms();
 
   detail::Bio membio(BIO_s_mem());
   if (!i2d_PrivateKey_bio(membio, m_impl->key))
@@ -400,7 +360,6 @@
 {
   BOOST_ASSERT(std::strlen(pw) == pwLen);
   ENSURE_PRIVATE_KEY_LOADED(m_impl->key);
-  opensslInitAlgorithms();
 
   detail::Bio membio(BIO_s_mem());
   if (!i2d_PKCS8PrivateKey_bio(membio, m_impl->key, EVP_aes_256_cbc(), nullptr, 0,
@@ -418,7 +377,6 @@
 PrivateKey::toPkcs8(PasswordCallback pwCallback) const
 {
   ENSURE_PRIVATE_KEY_LOADED(m_impl->key);
-  opensslInitAlgorithms();
 
   detail::Bio membio(BIO_s_mem());
   if (!i2d_PKCS8PrivateKey_bio(membio, m_impl->key, EVP_aes_256_cbc(), nullptr, 0,
@@ -499,11 +457,6 @@
   }
 
   auto guard = make_scope_exit([eckey] { EC_KEY_free(eckey); });
-
-#if OPENSSL_VERSION_NUMBER < 0x1010000fL
-  EC_KEY_set_asn1_flag(eckey, OPENSSL_EC_NAMED_CURVE);
-#endif // OPENSSL_VERSION_NUMBER < 0x1010000fL
-
   if (EC_KEY_generate_key(eckey) != 1) {
     NDN_THROW(Error("Failed to generate EC key"));
   }
diff --git a/tests/unit/security/transform/digest-filter.t.cpp b/tests/unit/security/transform/digest-filter.t.cpp
index fa109bb..fced1b8 100644
--- a/tests/unit/security/transform/digest-filter.t.cpp
+++ b/tests/unit/security/transform/digest-filter.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2013-2021 Regents of the University of California.
+ * Copyright (c) 2013-2022 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -137,7 +137,7 @@
   BOOST_CHECK_EQUAL_COLLECTIONS(out, out + sizeof(out), os.buf()->begin(), os.buf()->end());
 }
 
-#if OPENSSL_VERSION_NUMBER >= 0x1010000fL && !defined(OPENSSL_NO_BLAKE2)
+#ifndef OPENSSL_NO_BLAKE2
 BOOST_AUTO_TEST_CASE(AlgorithmBlake2b_512)
 {
   const uint8_t out[] = {
@@ -161,9 +161,8 @@
   bufferSource("") >> digestFilter(DigestAlgorithm::BLAKE2S_256) >> streamSink(os);
   BOOST_CHECK_EQUAL_COLLECTIONS(out, out + sizeof(out), os.buf()->begin(), os.buf()->end());
 }
-#endif // OPENSSL_VERSION_NUMBER >= 0x1010000fL && !defined(OPENSSL_NO_BLAKE2)
+#endif // !OPENSSL_NO_BLAKE2
 
-#if OPENSSL_VERSION_NUMBER >= 0x10101001L
 BOOST_AUTO_TEST_CASE(AlgorithmSha3_224)
 {
   const uint8_t out[] = {
@@ -210,7 +209,6 @@
   bufferSource("") >> digestFilter(DigestAlgorithm::SHA3_512) >> streamSink(os);
   BOOST_CHECK_EQUAL_COLLECTIONS(out, out + sizeof(out), os.buf()->begin(), os.buf()->end());
 }
-#endif // OPENSSL_VERSION_NUMBER >= 0x10101001L
 
 BOOST_AUTO_TEST_SUITE_END() // TestDigestFilter
 BOOST_AUTO_TEST_SUITE_END() // Transform
diff --git a/tests/unit/security/transform/private-key.t.cpp b/tests/unit/security/transform/private-key.t.cpp
index 4be078b..9ab5734 100644
--- a/tests/unit/security/transform/private-key.t.cpp
+++ b/tests/unit/security/transform/private-key.t.cpp
@@ -685,9 +685,7 @@
                          boolSink(result));
   }
   else {
-#if OPENSSL_VERSION_NUMBER >= 0x1010100fL
     BOOST_CHECK_THROW(sKey->derivePublicKey(), PrivateKey::Error);
-#endif
     BOOST_CHECK_NO_THROW(bufferSource(data) >>
                          verifierFilter(DigestAlgorithm::SHA256, *sKey, *sig) >>
                          boolSink(result));
@@ -705,10 +703,8 @@
     BOOST_CHECK(*os1.buf() != *os2.buf());
   }
   else {
-#if OPENSSL_VERSION_NUMBER >= 0x1010100fL
     OBufferStream os1;
     BOOST_CHECK_THROW(sKey->savePkcs1(os1), PrivateKey::Error);
-#endif
   }
 }
 
diff --git a/tests/unit/util/random.t.cpp b/tests/unit/util/random.t.cpp
index bfa486a..73c3825 100644
--- a/tests/unit/util/random.t.cpp
+++ b/tests/unit/util/random.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2013-2021 Regents of the University of California.
+ * Copyright (c) 2013-2022 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -68,18 +68,11 @@
   }
 
 private: // RAND_METHOD callbacks
-#if OPENSSL_VERSION_NUMBER < 0x1010000fL
-  static void
-  seed(const void* buf, int num)
-  {
-  }
-#else
   static int
   seed(const void* buf, int num)
   {
     return 0;
   }
-#endif // OPENSSL_VERSION_NUMBER < 0x1010000fL
 
   static int
   bytes(unsigned char* buf, int num)
@@ -92,18 +85,11 @@
   {
   }
 
-#if OPENSSL_VERSION_NUMBER < 0x1010000fL
-  static void
-  add(const void* buf, int num, double entropy)
-  {
-  }
-#else
   static int
   add(const void* buf, int num, double entropy)
   {
     return 0;
   }
-#endif // OPENSSL_VERSION_NUMBER < 0x1010000fL
 
   static int
   pseudorand(unsigned char* buf, int num)
diff --git a/wscript b/wscript
index ebdf2b3..f9213f2 100644
--- a/wscript
+++ b/wscript
@@ -103,7 +103,7 @@
 
     conf.check_osx_frameworks()
     conf.check_sqlite3()
-    conf.check_openssl(lib='crypto', atleast_version='1.0.2')
+    conf.check_openssl(lib='crypto', atleast_version='1.1.1')
 
     boost_libs = ['system', 'program_options', 'chrono', 'date_time', 'filesystem', 'thread', 'log']
 
