Post
Topic
Board Development & Technical Discussion
Re: Transaction metadata (do we need an OP_DROP transaction type?)
by
Stefan Thomas
on 11/09/2012, 20:32:03 UTC
Stefan - excellent suggestion. That's a neat way to do things. To sign for the control output then, the current bond owner would have to calculate owner privkey*bond record hash too to make it match the pubkey, is that right?

Yep.

--

One more point that is going to be obvious to those comfortable with elliptic curve math, but bears writing down: It's important that the base pubkey is captured in the hash, otherwise the scheme becomes ambiguous. I'll use the bond message case as an example.

Let's say you have a message pubkey M. It was calculated from issuer public key P1 and Bond message hash b1 as M = P1 * b1.

Now I'm an evil attacker and I want to create another pair P2, b2 that also results in M. What I can do I choose an arbitrary Bond message, calculate its hash b2 and then calculate P2 = M * b2-1. Obviously I don't have the corresponding private key but having a valid pair P2, b2 might be enough to cause problems depending on the use case. What prevents this attack is the fact that the Bond message contains the pubkey. If I try to enter P2 into the bond message, its hash changes and P2 is no longer correct. To make the message valid I would have to find a SHA256 collision, i.e. a Bond message where I've inserted P2, but that results in the same hash b2.