diff options
author | Riccardo Spagni <ric@spagni.net> | 2019-04-16 22:38:32 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2019-04-16 22:38:32 +0200 |
commit | a1ea611e24c8e1a4bb2965cc0b3f96e2f556b089 (patch) | |
tree | 93934ba1c6b69d7e19918ac5115f718f7c2bb168 /src | |
parent | Merge pull request #5422 (diff) | |
parent | ringct: prevent use of full ringct signatures for more than one input (diff) | |
download | monero-a1ea611e24c8e1a4bb2965cc0b3f96e2f556b089.tar.xz |
Merge pull request #5424
93bb2f48 ringct: prevent use of full ringct signatures for more than one input (moneromooo-monero)
Diffstat (limited to 'src')
-rw-r--r-- | src/ringct/rctSigs.cpp | 1 | ||||
-rw-r--r-- | src/ringct/rctTypes.h | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/src/ringct/rctSigs.cpp b/src/ringct/rctSigs.cpp index e877c13ce..ff2a81d43 100644 --- a/src/ringct/rctSigs.cpp +++ b/src/ringct/rctSigs.cpp @@ -695,6 +695,7 @@ namespace rct { CHECK_AND_ASSERT_THROW_MES(mixRing[n].size() == inSk.size(), "Bad mixRing size"); } CHECK_AND_ASSERT_THROW_MES((kLRki && msout) || (!kLRki && !msout), "Only one of kLRki/msout is present"); + CHECK_AND_ASSERT_THROW_MES(inSk.size() < 2, "genRct is not suitable for 2+ rings"); rctSig rv; rv.type = RCTTypeFull; diff --git a/src/ringct/rctTypes.h b/src/ringct/rctTypes.h index 50d0f4d91..e5413f1dc 100644 --- a/src/ringct/rctTypes.h +++ b/src/ringct/rctTypes.h @@ -191,6 +191,8 @@ namespace rct { Bulletproof(const rct::keyV &V, const rct::key &A, const rct::key &S, const rct::key &T1, const rct::key &T2, const rct::key &taux, const rct::key &mu, const rct::keyV &L, const rct::keyV &R, const rct::key &a, const rct::key &b, const rct::key &t): V(V), A(A), S(S), T1(T1), T2(T2), taux(taux), mu(mu), L(L), R(R), a(a), b(b), t(t) {} + bool operator==(const Bulletproof &other) const { return V == other.V && A == other.A && S == other.S && T1 == other.T1 && T2 == other.T2 && taux == other.taux && mu == other.mu && L == other.L && R == other.R && a == other.a && b == other.b && t == other.t; } + BEGIN_SERIALIZE_OBJECT() // Commitments aren't saved, they're restored via outPk // FIELD(V) |