aboutsummaryrefslogtreecommitdiff
path: root/tests/crypto
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2018-03-14 16:04:10 +0200
committerRiccardo Spagni <ric@spagni.net>2018-03-14 16:04:10 +0200
commit102a51bcd48a3cd2cb794aab7dbe243393f155b3 (patch)
tree513aa5706a9ee849adab2f7cbe719de6741a8b43 /tests/crypto
parentMerge pull request #3378 (diff)
parentwallet2: check_tx_key() shouldn't require hardware encryption (diff)
downloadmonero-102a51bcd48a3cd2cb794aab7dbe243393f155b3.tar.xz
Merge pull request #3350
4405e4fc wallet2: check_tx_key() shouldn't require hardware encryption (stoffu) 7dfa5e9e chacha: call prehashed version explicitly as generate_chacha_key_prehashed hash: add prehashed version cn_slow_hash_prehashed slow-hash: let cn_slow_hash take 4th parameter for deciding prehashed or not slow-hash: add support for prehashed version for the other 3 platforms (stoffu) b2d23b18 crypto: revert odd namespace changes made in #3303 (stoffu) 8705beaf keypair::generate: always require hw::device to avoid possible mistake (stoffu) 27a196b1 device: untangle cyclic depenency (stoffu) c9b38b47 device: made function prototypes consistent with pre-#3303 codebase (stoffu)
Diffstat (limited to 'tests/crypto')
-rw-r--r--tests/crypto/CMakeLists.txt3
-rw-r--r--tests/crypto/crypto.cpp12
2 files changed, 6 insertions, 9 deletions
diff --git a/tests/crypto/CMakeLists.txt b/tests/crypto/CMakeLists.txt
index c89049d50..df96c57cc 100644
--- a/tests/crypto/CMakeLists.txt
+++ b/tests/crypto/CMakeLists.txt
@@ -42,10 +42,7 @@ add_executable(cncrypto-tests
${crypto_headers})
target_link_libraries(cncrypto-tests
PRIVATE
- wallet
- cryptonote_core
common
- device
${Boost_SYSTEM_LIBRARY}
${EXTRA_LIBRARIES})
set_property(TARGET cncrypto-tests
diff --git a/tests/crypto/crypto.cpp b/tests/crypto/crypto.cpp
index 90212bd0b..6a1dd1b29 100644
--- a/tests/crypto/crypto.cpp
+++ b/tests/crypto/crypto.cpp
@@ -33,7 +33,7 @@
#include "crypto-tests.h"
bool check_scalar(const crypto::ec_scalar &scalar) {
- return sc_check(crypto::operator &(scalar)) == 0;
+ return crypto::sc_check(crypto::operator &(scalar)) == 0;
}
void random_scalar(crypto::ec_scalar &res) {
@@ -45,13 +45,13 @@ void hash_to_scalar(const void *data, std::size_t length, crypto::ec_scalar &res
}
void hash_to_point(const crypto::hash &h, crypto::ec_point &res) {
- ge_p2 point;
- ge_fromfe_frombytes_vartime(&point, reinterpret_cast<const unsigned char *>(&h));
- ge_tobytes(crypto::operator &(res), &point);
+ crypto::ge_p2 point;
+ crypto::ge_fromfe_frombytes_vartime(&point, reinterpret_cast<const unsigned char *>(&h));
+ crypto::ge_tobytes(crypto::operator &(res), &point);
}
void hash_to_ec(const crypto::public_key &key, crypto::ec_point &res) {
- ge_p3 tmp;
+ crypto::ge_p3 tmp;
crypto::hash_to_ec(key, tmp);
- ge_p3_tobytes(crypto::operator &(res), &tmp);
+ crypto::ge_p3_tobytes(crypto::operator &(res), &tmp);
}