Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Schnorr #746

Merged
merged 4 commits into from
Jan 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The recommended installation process is comprised of two separate steps:

Please make sure you install opam v2.0 or greater (this can be checked by running `opam --version`).

Scilla requires OpenSSL 1.0.2 and if your platform does not have packages for this, you may need to build OpenSSL
Scilla requires OpenSSL 1.1.1 and if your platform does not have packages for this, you may need to build OpenSSL
yourself and set `PKG_CONFIG_PATH` environment variable accordingly
(if you install OpenSSL in a non-default path):
```shell
Expand Down
2 changes: 1 addition & 1 deletion scripts/build_openssl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ fi

git clone https://github.com/openssl/openssl.git ~/openssl/src
cd ~/openssl/src
git checkout tags/OpenSSL_1_0_2n
git checkout tags/OpenSSL_1_1_1
./config --prefix=${HOME}/openssl/install --openssldir=${HOME}/openssl/ssl
make -j4
make install
4 changes: 2 additions & 2 deletions src/base/cpp/Schnorr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ bool Schnorr::Sign(const bytes& message, unsigned int offset, unsigned int size,
}

err = (BN_nnmod(result.m_r.get(), result.m_r.get(), m_curve.m_order.get(),
NULL) == 0);
ctx.get()) == 0);
if (err) {
LOG_GENERAL(WARNING, "BIGNUM NNmod failed");
return false;
Expand Down Expand Up @@ -370,7 +370,7 @@ bool Schnorr::Verify(const bytes& message, unsigned int offset,
}

err2 = (BN_nnmod(challenge_built.get(), challenge_built.get(),
m_curve.m_order.get(), NULL) == 0);
m_curve.m_order.get(), ctx.get()) == 0);
err = err || err2;
if (err2) {
LOG_GENERAL(WARNING, "Challenge rebuild mod failed");
Expand Down