Skip to content

Commit

Permalink
Use libsecp256k1 instead of OpenSSL for key derivation:
Browse files Browse the repository at this point in the history
While most of the code associated with secp256k1 operations had
been migrated to libsecp256k1, the deterministic key derivation
code was still using calls to OpenSSL.

If merged, this commit replaces the OpenSSL-based routines with
new libsecp256k1-based implementations. No functional change is
expected and the change should be transparent.

This commit also removes several support classes and utility
functions that wrapped or adapted various OpenSSL types that
are no longer needed.

A tip of the hat to the original author of this truly superb
library, Dr. Pieter Wuille, and to all other contributors.
  • Loading branch information
nbougalis committed Mar 11, 2021
1 parent b4699c3 commit a065256
Show file tree
Hide file tree
Showing 12 changed files with 1,388 additions and 1,011 deletions.
14 changes: 0 additions & 14 deletions Builds/CMake/RippledCore.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,8 @@ target_sources (xrpl_core PRIVATE
main sources:
subdir: crypto
#]===============================]
src/ripple/crypto/impl/GenerateDeterministicKey.cpp
src/ripple/crypto/impl/RFC1751.cpp
src/ripple/crypto/impl/csprng.cpp
src/ripple/crypto/impl/ec_key.cpp
src/ripple/crypto/impl/openssl.cpp
src/ripple/crypto/impl/secure_erase.cpp)

add_library (Ripple::xrpl_core ALIAS xrpl_core)
Expand Down Expand Up @@ -174,16 +171,10 @@ install (
DESTINATION include/ripple/basics)
install (
FILES
src/ripple/crypto/GenerateDeterministicKey.h
src/ripple/crypto/RFC1751.h
src/ripple/crypto/csprng.h
src/ripple/crypto/secure_erase.h
DESTINATION include/ripple/crypto)
install (
FILES
src/ripple/crypto/impl/ec_key.h
src/ripple/crypto/impl/openssl.h
DESTINATION include/ripple/crypto/impl)
install (
FILES
src/ripple/json/JsonPropertyStream.h
Expand Down Expand Up @@ -770,11 +761,6 @@ target_sources (rippled PRIVATE
src/test/core/SociDB_test.cpp
src/test/core/Stoppable_test.cpp
src/test/core/Workers_test.cpp
#[===============================[
test sources:
subdir: crypto
#]===============================]
src/test/crypto/Openssl_test.cpp
#[===============================[
test sources:
subdir: csf
Expand Down
3 changes: 0 additions & 3 deletions Builds/levelization/results/loops.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ Loop: ripple.basics ripple.rpc
Loop: ripple.core ripple.net
ripple.net > ripple.core

Loop: ripple.crypto ripple.protocol
ripple.protocol > ripple.crypto

Loop: ripple.net ripple.rpc
ripple.rpc > ripple.net

Expand Down
3 changes: 1 addition & 2 deletions Builds/levelization/results/ordering.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ ripple.peerfinder > ripple.beast
ripple.peerfinder > ripple.core
ripple.peerfinder > ripple.protocol
ripple.protocol > ripple.beast
ripple.protocol > ripple.crypto
ripple.protocol > ripple.json
ripple.resource > ripple.basics
ripple.resource > ripple.beast
Expand Down Expand Up @@ -117,8 +118,6 @@ test.core > ripple.server
test.core > test.jtx
test.core > test.toplevel
test.core > test.unit_test
test.crypto > ripple.beast
test.crypto > ripple.crypto
test.csf > ripple.basics
test.csf > ripple.beast
test.csf > ripple.consensus
Expand Down
47 changes: 0 additions & 47 deletions src/ripple/crypto/GenerateDeterministicKey.h

This file was deleted.

217 changes: 0 additions & 217 deletions src/ripple/crypto/impl/GenerateDeterministicKey.cpp

This file was deleted.

65 changes: 0 additions & 65 deletions src/ripple/crypto/impl/ec_key.cpp

This file was deleted.

Loading

0 comments on commit a065256

Please sign in to comment.