aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/openssl/crypto/ut/rsa_ut.cpp
diff options
context:
space:
mode:
authorkomels <komels@yandex-team.ru>2022-04-15 16:53:39 +0300
committerkomels <komels@yandex-team.ru>2022-04-15 16:53:39 +0300
commit703a2fb6e100d202d1c7fcd052d73bd5affef408 (patch)
tree22b7320c06bb04d86dbf7b9af9ae44281331cd15 /library/cpp/openssl/crypto/ut/rsa_ut.cpp
parent3375bbfda1e2afb03aa2072bf5f2f2c3a26026e8 (diff)
downloadydb-703a2fb6e100d202d1c7fcd052d73bd5affef408.tar.gz
Move 'kikimr/yndx'-depending tests out of ydb/core
ref:0a380e13308d579e0545a76924330d1ca5129c43
Diffstat (limited to 'library/cpp/openssl/crypto/ut/rsa_ut.cpp')
-rw-r--r--library/cpp/openssl/crypto/ut/rsa_ut.cpp28
1 files changed, 0 insertions, 28 deletions
diff --git a/library/cpp/openssl/crypto/ut/rsa_ut.cpp b/library/cpp/openssl/crypto/ut/rsa_ut.cpp
deleted file mode 100644
index 99f0377432..0000000000
--- a/library/cpp/openssl/crypto/ut/rsa_ut.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-#include "rsa.h"
-
-#include <library/cpp/testing/unittest/registar.h>
-#include <library/cpp/openssl/big_integer/big_integer.h>
-
-#include <util/system/byteorder.h>
-
-using namespace NOpenSsl;
-using namespace NOpenSsl::NRsa;
-
-Y_UNIT_TEST_SUITE(Rsa) {
- Y_UNIT_TEST(Encrypt) {
- // example from Ru.Wikipedia
- const auto originData = TBigInteger::FromULong(111111);
-
- const auto n = TBigInteger::FromULong(3);
- const auto e = TBigInteger::FromULong(9173503);
-
- // check key reuse
- for (size_t i = 0; i < 10; ++i) {
- UNIT_ASSERT_VALUES_EQUAL(TBigInteger::FromULong(4051753), TPublicKey(n, e).EncryptNoPad(originData));
- }
-
- UNIT_ASSERT_VALUES_EQUAL(originData, TBigInteger::FromULong(111111));
- UNIT_ASSERT_VALUES_EQUAL(n, TBigInteger::FromULong(3));
- UNIT_ASSERT_VALUES_EQUAL(e, TBigInteger::FromULong(9173503));
- }
-};