verify we have the private key for an identity before signing#1790
Open
HayimShaul wants to merge 2 commits into
Open
verify we have the private key for an identity before signing#1790HayimShaul wants to merge 2 commits into
HayimShaul wants to merge 2 commits into
Conversation
AkramBitar
requested changes
Jun 24, 2026
Contributor
|
@adecaro could you please have a look at that PR? I need your help here. Thanks a lot. |
08b4b54 to
cb97f37
Compare
adecaro
reviewed
Jul 1, 2026
| // Step 2: Verify we possess the private key by attempting to retrieve the signer | ||
| // This proves ownership, not just visibility | ||
| if !w.Remote() { | ||
| _, err = w.GetSigner(context.Context(), suppliedIdentity) |
Contributor
There was a problem hiding this comment.
please, can you explain why w.Contains does not guarantee that we are also able to sign with this identity? Under which condition does this happen?
adecaro
reviewed
Jul 1, 2026
| } | ||
|
|
||
| // Step 4: Reconstruct RecipientData with verified fields from trusted sources | ||
| recipientData = &RecipientData{ |
Contributor
There was a problem hiding this comment.
we should not return anything to caller in this case. Indeed, the caller can be an attacker that wants to extract the rest of the information knowing only an identity.
added 2 commits
July 1, 2026 14:51
Signed-off-by: Hayim.Shaul@ibm.com <hayimsha@fhe03.vpc.cloud9.ibm.com>
Signed-off-by: Hayim.Shaul@ibm.com <hayimsha@fhe03.vpc.cloud9.ibm.com>
c97c2f7 to
bddcf40
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Verify we have the secret key for an id given in Echo Path matches a key in our wallet.
Addresses issue #1638