Author

Topic: !!!OP_EQUALVERIFY!!!! (Read 1386 times)

newbie
Activity: 21
Merit: 0
March 29, 2013, 08:49:14 AM
#4
Then the OP_EQUALVERIFY compares the whole public key of this scriptsig of this transaction
Code:
0484c7d0c1e0134144cc965c6cf98976927307944e0f5f664ca1e1815bf65434420de0fe1eee3e1ac9cf47ff5e5bedc1e6569be63d900244222e0ba226f66da594
with the ScriptPubKey of the previous transaction because the receiver of the previous transaction and the sender of this transaction is the same address no?
I think that finally catch that. In this way is normal that two hashes will be the same.

https://en.bitcoin.it/wiki/Script#Standard_Transaction_to_Bitcoin_address

Here I see the sentence that I needed to understand.

Note: scriptSig is in the input of the spending transaction and scriptPubKey is in the output of the previously unspent i.e. "available" transaction.


Thank you for your help, theymos.
administrator
Activity: 5222
Merit: 13032
March 29, 2013, 08:10:18 AM
#3
Quote
is imposible that they are equal

No. The hashes are equal if the public keys are equal.

The processing table here may help you understand how the script is processed:
https://en.bitcoin.it/wiki/Script#Standard_Transaction_to_Bitcoin_address
newbie
Activity: 21
Merit: 0
March 29, 2013, 07:49:53 AM
#2
Code:
{
  "hash":"8d752783af0112c91a8a0d0c8c2416c4955cc121ca0a7b9861d0eb2756c3ec7e",
  "ver":1,
  "vin_sz":1,
  "vout_sz":2,
  "lock_time":0,
  "size":259,
  "in":[
    {
      "prev_out":{
        "hash":"b1b7c0c5dcc03446b0be9ea4e03d93aa033c20ddc43ff463b608ce9646fbfa2e",
        "n":0
      },
      "scriptSig":"3046022100cf2e18c2797efdadeeebdd87024f751fda107e6f24fdca8a8a94b10c97d68654022100d61c23594319c2b37b613764994509ed884a1e48c18cdf6cfee7b40687dcee1c01 0484c7d0c1e0134144cc965c6cf98976927307944e0f5f664ca1e1815bf65434420de0fe1eee3e1ac9cf47ff5e5bedc1e6569be63d900244222e0ba226f66da594"
    }
  ],
  "out":[
    {
      "value":"82.90000000",
      "scriptPubKey":"OP_DUP OP_HASH160 4f235d60866662c0b1713572d6931bce82acd313 OP_EQUALVERIFY OP_CHECKSIG"
    },
    {
      "value":"50.00000000",
      "scriptPubKey":"OP_DUP OP_HASH160 5c434d48a40bc2a91c4f0319e65117df361cb914 OP_EQUALVERIFY OP_CHECKSIG"
    }
  ]
}

If we have this transaction what is the function of OP_EQUALVERIFY? I'm not quite sure if this function compares the public key of the receiver with the hash inside the ScriptSig or compare the receiver's public key with the signature of the next transaction that this receiver's will do in the future. I'm a little confused.

I need help please.

Thanks
newbie
Activity: 21
Merit: 0
March 27, 2013, 10:31:22 AM
#1
Hello!!

My name is Ander

I'm working searching information about Bitcoins, and after staying lot of time reading articles and all the information on the Wiki, now I'm trying to understand how Bitcoins works internally. I'm learning more about the encryptation of Bitcoins but there's one thing that I can't understand.

OP_DUP OP_HASH160 OP_EQUALVERIFY OP_CHECKSIG

In standard transaction, we need the scriptSig and the scriptPubKey. First of all the signature and the sender's public key is combined. Then the public key of the sender is duplicated and then this key is hashed. After thar we put the receiver's public key hash, and taking this two hashes then we checked both.
But my problem is if the function of OP_EQUALVERIFY check if this two hashes are equal or not, because is imposible that they are equal, or I'm wrong about this process and this function is not that I think it is.

I read this topic on this forum but I'm not sure if I understand what two hashes compares the OP_EQUALVERIFY.

https://bitcointalksearch.org/topic/transactions-contents-40100

I hope and answer for my question.

Thank you in advance for the help, and sorry for my english. I'm not used to write in English.

Ander
Jump to: