mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
TVM instructions: SECP256K1_XONLY_PUBKEY_TWEAK_ADD, SETCONTCTRMANY(X) (#1404)
* TVM instructions: SECP256K1_XONLY_PUBKEY_TWEAK_ADD, SETCONTCTRMANY(X) * Add tests for xonly_pubkey_tweak_add * added secp256k1 as submodule, since we need extrakeys feature of secp256k1 * cleanup * add ton_crypto_core secp256k1 dependency * adjust Dockerfile, android and wasm builds * adjust nix build * test windows build with SECP256K1_ENABLE_MODULE_EXTRAKEYS * test windows build with SECP256K1_ENABLE_MODULE_EXTRAKEYS * adjust android build * adjust emscripten build * adjust emscripten build * try macos-13 * emscripten build adjustments * windows build adjustments * final corrections --------- Co-authored-by: neodix <neodix@ton.org>
This commit is contained in:
parent
954a96a077
commit
25b4c6794a
56 changed files with 2112 additions and 502 deletions
|
@ -318,20 +318,20 @@ endif()
|
|||
target_include_directories(ton_crypto SYSTEM PUBLIC $<BUILD_INTERFACE:${OPENSSL_INCLUDE_DIR}>)
|
||||
|
||||
add_dependencies(ton_crypto blst)
|
||||
add_dependencies(ton_crypto_core secp256k1)
|
||||
|
||||
target_include_directories(ton_crypto PRIVATE ${BLST_INCLUDE_DIR})
|
||||
target_link_libraries(ton_crypto PRIVATE ${BLST_LIB})
|
||||
|
||||
if (NOT USE_EMSCRIPTEN)
|
||||
find_package(Secp256k1 REQUIRED)
|
||||
endif()
|
||||
target_include_directories(ton_crypto_core PUBLIC $<BUILD_INTERFACE:${SECP256K1_INCLUDE_DIR}>)
|
||||
|
||||
if (MSVC)
|
||||
find_package(Sodium REQUIRED)
|
||||
target_compile_definitions(ton_crypto PUBLIC SODIUM_STATIC)
|
||||
target_include_directories(ton_crypto_core PUBLIC $<BUILD_INTERFACE:${SECP256K1_INCLUDE_DIR}>)
|
||||
target_link_libraries(ton_crypto_core PUBLIC ${SECP256K1_LIBRARY})
|
||||
target_link_libraries(ton_crypto PUBLIC ${SECP256K1_LIBRARY})
|
||||
elseif (ANDROID OR EMSCRIPTEN)
|
||||
target_include_directories(ton_crypto_core PUBLIC $<BUILD_INTERFACE:${SECP256K1_INCLUDE_DIR}>)
|
||||
elseif (EMSCRIPTEN)
|
||||
target_link_libraries(ton_crypto_core PUBLIC $<BUILD_INTERFACE:${SECP256K1_LIBRARY}>)
|
||||
target_link_libraries(ton_crypto PUBLIC $<BUILD_INTERFACE:${SECP256K1_LIBRARY}>)
|
||||
else()
|
||||
if (NOT SODIUM_FOUND)
|
||||
|
@ -340,11 +340,10 @@ else()
|
|||
message(STATUS "Using Sodium ${SODIUM_LIBRARY_RELEASE}")
|
||||
endif()
|
||||
target_compile_definitions(ton_crypto PUBLIC SODIUM_STATIC)
|
||||
target_include_directories(ton_crypto_core PUBLIC $<BUILD_INTERFACE:${SECP256K1_INCLUDE_DIR}>)
|
||||
target_link_libraries(ton_crypto_core PUBLIC ${SECP256K1_LIBRARY})
|
||||
target_link_libraries(ton_crypto PUBLIC ${SECP256K1_LIBRARY})
|
||||
endif()
|
||||
|
||||
target_link_libraries(ton_crypto_core PUBLIC ${SECP256K1_LIBRARY})
|
||||
target_include_directories(ton_crypto_core PUBLIC $<BUILD_INTERFACE:${SODIUM_INCLUDE_DIR}>)
|
||||
target_link_libraries(ton_crypto PUBLIC ${SODIUM_LIBRARY_RELEASE})
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue