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
Hash x #1097
Hash x #1097
Conversation
Signed-off-by: Rafał Malinowski <rafal.przemyslaw.malinowski@gmail.com>
Signed-off-by: Rafał Malinowski <rafal.przemyslaw.malinowski@gmail.com>
Signed-off-by: Rafał Malinowski <rafal.przemyslaw.malinowski@gmail.com>
Signed-off-by: Rafał Malinowski <rafal.przemyslaw.malinowski@gmail.com>
Signed-off-by: Rafał Malinowski <rafal.przemyslaw.malinowski@gmail.com>
Signed-off-by: Rafał Malinowski <rafal.przemyslaw.malinowski@gmail.com>
Signed-off-by: Rafał Malinowski <rafal.przemyslaw.malinowski@gmail.com>
Signed-off-by: Rafał Malinowski <rafal.przemyslaw.malinowski@gmail.com>
Signed-off-by: Rafał Malinowski <rafal.przemyslaw.malinowski@gmail.com>
@@ -0,0 +1,92 @@ | |||
// Copyright 2016 Stellar Development Foundation and contributors. Licensed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's talk about this.
auto &hashXKeyWeights = signers[SIGNER_KEY_TYPE_HASH_X]; | ||
for (size_t i = 0; i < mSignatures.size(); i++) | ||
{ | ||
auto x = std::string{mSignatures[i].signature.begin(), mSignatures[i].signature.end()}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the preimage a string?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
using just mSignatures[i].signature now
@@ -327,16 +328,13 @@ PubKeyUtils::verifySig(PublicKey const& key, Signature const& signature, | |||
SignatureHint | |||
PubKeyUtils::getHint(PublicKey const& pk) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just have people call SignatureUtils::getHint directly if you want to move this function there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
SignatureHint res; | ||
memcpy(res.data(), &pk.ed25519().back() - res.size() + 1, res.size()); | ||
return res; | ||
return SignatureUtils::getHint(pk.ed25519()); | ||
} | ||
|
||
bool | ||
PubKeyUtils::hasHint(PublicKey const& pk, SignatureHint const& hint) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems misnamed. Seems like it should be called doesHintMatch
or something
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
renamed
Signed-off-by: Rafał Malinowski <rafal.przemyslaw.malinowski@gmail.com>
Signed-off-by: Rafał Malinowski <rafal.przemyslaw.malinowski@gmail.com>
Signed-off-by: Rafał Malinowski <rafal.przemyslaw.malinowski@gmail.com>
Fixes #846