-
Notifications
You must be signed in to change notification settings - Fork 124
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
Verification of forged signature #11
Comments
Assuming your code passes the sign/verify tests, there is either something wrong with the section where you construct the forged signature (correlating the message bits and the revealed parts of the secret key) or where you derived the partially-revealed secret key in the first place. You can print both of these outputs to see where they differ from the original signatures provided in the problem set. That should give you a better idea of which section the bug is located in. If you can describe a little more about how the outputs are different (with some examples of expected vs actual output), I may be able to be more helpful. |
In the forge function I iterate through the 256 bits (from the hash of the message I am verifying) to verify if they are equal to one of the 256 bits that selected the blocks in the signatures (I know that practically you would have to verify which they were with the public key but I just skipped that since you guys gave us the messages corresponding to the 4 signatures and it can be precomputed anyways). As I iterate through these bits, I expect the hash of the block of the signature that I chose to match the block of the public key. In the forge function, I print out the index of the bit that I am looking at ( In the verify function, I do the same thing minus printing the similar bits, because that doesnt happen in the function. This is the problem: at the index 9 bit this happens, showing that the public key is different, even when I am passing this same public key as in the forge function (i.e. I am calling verify from the forge function). In the forge function:
In the verify function:
extra stuff for reference: Good example: works fine here.
Example of how the forge function finds a message that works:
|
Hi @ryanprinster. If you haven't worked this out already, could you send your forge() function to the staff mailing list, including an example where things fail? It might be easier to debug that way. Also just to confirm -- you are iterating until you have a message where you can actually find the bit in one of the 4 signed messages, right? For some of the bits, the signed messages have all 1s or all 0s in that spot, constraining your possible messages. |
I have forged the signature and am verifying as I go (for sanity) that the hash of the block I am working with is equal to the public key. I have also confirmed that all of the bits in the hashed forged message that I discovered are contained in the given messages (of which we have signatures). This all works.
However, when I verify the forged message, it returns false. It seems that the public key around the 10th block is different, even when I pass the public key in directly and call the verify function myself. Any ideas why this may be?
The text was updated successfully, but these errors were encountered: