Bitcoin Forum
May 05, 2024, 01:12:27 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: « 1 ... 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 [262] 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 »
5221  Local / Discussions générales et utilisation du Bitcoin / Re: Signer une transaction on: August 11, 2011, 08:38:36 PM
Ah mon péché mignon, oublier de repasser d'une chaîne de caractères hexa à la valeur hexa...
Du coup j'ai le bon hash

Mais la vérification ne marche pas, bizarre
De toute façon si chez toi ça marche c'est que c'est bon, c'est juste ma fonction de vérification qui déconne

Dernière question, pourquoi tu as enlevé l'octet final de la signature? Le 01?
5222  Local / Discussions générales et utilisation du Bitcoin / Re: Signer une transaction on: August 11, 2011, 08:22:29 PM
C'est bizarre
La fonction Hash c'est bien sha256^2 non? Je viens d'essayer sha256 quand même mais ça ne marche pas non plus
5223  Local / Discussions générales et utilisation du Bitcoin / Re: Signer une transaction on: August 11, 2011, 08:05:48 PM
Je m'étais trompé dans le montant, après correction j'ai le même message que toi

Mais la vérification fonctionne chez toi? Et tu as le même hash que moi?
Mon vérifieur me dit que
Code:
3044022044d64dd439555d659ec6d3a530a2eb2a5747e8f29522aa87636acc33bc1a54d40220720f8f8d776b4aba6916892bd5994d0a71436d738cd106907ecec57182ee8eb101
n'est pas une signature de
Code:
Hash("0100000001177a1f8fdfe69a2ad022f056bf45ef8162c7c8a1672919b885308b3b16162307000000001976a9145f10ada9157add69864482ef8c99ef8787943f0488acffffffff0130c11d00000000001976a9145c3f294acb5059a968c4a35700b5432a7397002b88ac0000000001000000")
=
14e230ca4b3d2963630bb186dee8146fcf401d0de03eccc9926cf33944ce216c
par l'adresse 19ff...
5224  Local / Discussions générales et utilisation du Bitcoin / Re: Signer une transaction on: August 11, 2011, 07:30:31 PM
Je viens de comparer les deux scripts, je ne vois pas la différence en dehors du fait que le wiki utilise comme scriptPubkey "Pubkey OP_CHECKSIG" et la transaction que j'utilise "OP_DUP OP_HASH160 <hash> OP_VERIFY OP_CHECKSIG"
5225  Local / Discussions générales et utilisation du Bitcoin / Re: Signer une transaction on: August 11, 2011, 07:21:59 PM
Ah je croyais que c'était une transaction ce code-là...
Je vais pouvoir creuser de ce côté-là
Merci pour tes infos et ta propostion, effectivement je veux bien ton code ça m'aiderait je pense
5226  Other / Off-topic / Re: Anonymous If you are reading this... on: August 11, 2011, 06:59:22 PM
I'm happy to see some of you guys agree with destroying Facebook!  I mean after all who controls the internet ? how are we sure its not the governments ?  And after watching the social network why would anyone trust zuckerburg ( bloodsucker) with ur personal info?  Oh the tragedy come November 5!
So, is it just going to be some bad-ass DDoS attack?

I remember when The Social Network (2010) came out; there was a small DDoS for a few days.
I'm thinking some anons will take advantage of the scurry of admins trying to get the DDoS to stop and while they are doing that they will probubly find a hole durning this panic Smiley
That would be nice
5227  Bitcoin / Mining / Re: Dry Ice Cooling? on: August 11, 2011, 06:43:35 PM
Lol, I hope you know that Bonker is putting these ridiculous threads out as jokes.  You shoulda seen his idea to forever leave a fridge with the door open next to your GPU in another thread.
Epic!
5228  Local / Discussions générales et utilisation du Bitcoin / Signer une transaction on: August 11, 2011, 05:06:50 PM
Bonjour
Je pense être à deux doigts de résoudre mon problème mais j'y suis pas encore et comme il est assez pointu (en tout cas pour moi) je comprendrais peut-être mieux une explication venant d'un francophone

Ce que je veux c'est signer une transaction
Je sais signer un message, je connais la syntaxe d'une transaction, ce qu'il me manque c'est le message à signer

Je sais que c'est un Hash, donc un sha256^2
Je sais que l'argument de ce Hash est la transaction modifiée, en fonction de SIGHASH

Voici la partie non sûre :
Si j'utilise SIGHASH_ALL, le message est la transaction où :
  tous les scriptSig(non encore connu encore puisque justement je les veux) sont supprimés
  à l'emplacement du scriptSig à la position n, je mets le scriptPubKey de l'input correspondant (une fois signé, j'obtiendrais alors le scriptSig pour l'input n)
  j'ajoute à la fin 01000000 car j'utilise SIGHASH_ALL

De plus, suite à une réponse de Mike sur le forum dev, j'ai lu la fonction SignatureHash qui initialise le message comme ceci : "CDataStream ss(SER_GETHASH);"
Sachant que SER_GETHASH = 4, il faudrait donc que je rajoute au début de ma transaction modifiée 0400000000000000, soit 4 en int64


Donc finalement, j'arrive à ça (j'ai pris une vraie tx pour pouvoir comparer : http://blockexplorer.com/rawtx/a467d767729385c191d3e463ceb8a436a1c0dda9d362955909c64196db86e573 ) :
Code:
04000000 or 0400000000000000 or nothing
01000000                            #version
01                                                        #1 input
177a1f8fdfe69a2ad022f056bf45ef8162c7c8a1672919b885308b3b16162307   #inverted hash of the tx
00000000                                                        #index

#old scriptpubkey instead of scriptsig
__________________________________________________________
19                                                        #length of scriptPubKey
76                                                        #OP_DUP
a9                                                        #OP_HASH160
14                                                        #length of hash
5f10ada9157add69864482ef8c99ef8787943f04    #    NOT inverted hash160 of my pubkey
88                                                        #OP_VERIFY
ac                                                        #OP_CHECKSIG
__________________________________________________________
ffffffff                                                        #sequence
01                                                        #1 output
80841e0000000000                            #value
19                                                        #length of scriptPubKey
76                                                        #OP_DUP
a9                                                        #OP_HASH160
14                                                        #length of hash
5c3f294acb5059a968c4a35700b5432a7397002b    #    NOT inverted hash160 of pubkey to which I send money
88                                                        #OP_VERIFY
ac                                                        #OP_CHECKSIG
00000000                                                        #locktime
01000000                                                        #hashtype = SIGHASH_ALL


Je sais qu'il y a des développeurs dans le coin, si vous êtes occupés postez même un mini message si ça prendrait trop de temps, j'approfondirai de mon côté
5229  Local / Wiki, documentation et traduction / Re: Français : traduction du papier de Satoshi on: August 11, 2011, 04:05:27 PM
Ah merci Wink
J'avais vu 2-3 modifications à faire, je les ferai dès que j'ai un peu de temps
J'aurai bien aidé plus mais je pense pas que mon niveau en anglais me le permette...
5230  Bitcoin / Project Development / Re: Bitcoin Wiki: Looking for administrators (step 1/2) on: August 11, 2011, 03:33:44 PM
I don't think I can be much help for writing in the wiki because my english is too bad for that, but I can help fighting spam if there are not enough volunteers
5231  Bitcoin / Bitcoin Discussion / Deterministic Bitcoin wallet generator, using a FILE on: August 11, 2011, 03:14:12 PM
Hi,
If you want to have a deterministic wallet but are afraid of forgetting your passphrase, you can now use one of your file to create your wallet
Moreover, a thief will have to check every file on your computer to find your generated keys

Download Fillet and run "./fillet.py --file ~/me.png --keynumber 1 --size 10 --pwpath ~/bitcoin/pywallet/"
All flags are optional except --file

Pywallet is used to convert your key to a Bitcoin address

When you will want to import a key, pywallet will do that easily
5232  Bitcoin / Development & Technical Discussion / Re: 2 extra bytes before ScriptSig on: August 11, 2011, 02:17:19 PM
Thanks, it still doesn't work, but that helped me

I chose SIGHASH_ALL and nvin=0, so SignatureHash becomes:
Quote
   CTransaction txTmp(txTo);

    scriptCode.FindAndDelete(CScript(OP_CODESEPARATOR));      //no codeseparator, scriptPubkey was just OPDUP UPHASH HASH VERIFY CHECKSIG

    // Blank out other inputs' signatures
    for (int i = 0; i < txTmp.vin.size(); i++)
        txTmp.vin.scriptSig = CScript();
    txTmp.vin[0].scriptSig = scriptCode;


    // Serialize and hash
   CDataStream ss(SER_GETHASH);
    ss.reserve(10000);
    ss << txTmp << nHashType;
    return Hash(ss.begin(), ss.end());
The only thing I'm not sure is the blue line
I think it initializes ss with "04 00 00 00 00 00 00 00" ( 1 << 2 as an int64)
I tested "04 00 00 00" and "" also
But none works

Also, is that ss? (I took a transaction with only 1 input and 1 output this time: http://blockexplorer.com/rawtx/a467d767729385c191d3e463ceb8a436a1c0dda9d362955909c64196db86e573 )
Code:
04000000 or 0400000000000000 or nothing
01000000                            #version
01                                                        #1 input
177a1f8fdfe69a2ad022f056bf45ef8162c7c8a1672919b885308b3b16162307   #inverted hash of the tx
00000000                                                        #index

#old scriptpubkey instead of scriptsig
__________________________________________________________
19                                                        #length of scriptPubKey
76                                                        #OP_DUP
a9                                                        #OP_HASH160
14                                                        #length of hash
5f10ada9157add69864482ef8c99ef8787943f04    #    NOT inverted hash160 of my pubkey
88                                                        #OP_VERIFY
ac                                                        #OP_CHECKSIG
__________________________________________________________
ffffffff                                                        #sequence
01                                                        #1 output
80841e0000000000                            #value
19                                                        #length of scriptPubKey
76                                                        #OP_DUP
a9                                                        #OP_HASH160
14                                                        #length of hash
5c3f294acb5059a968c4a35700b5432a7397002b    #    NOT inverted hash160 of pubkey to which I send money
88                                                        #OP_VERIFY
ac                                                        #OP_CHECKSIG
00000000                                                        #locktime
01000000                                                        #hashtype = SIGHASH_ALL
5233  Local / Wiki, documentation et traduction / Re: Français : traduction du papier de Satoshi on: August 11, 2011, 10:36:39 AM
Elle n'est pas publiquement modifiable?
5234  Bitcoin / Development & Technical Discussion / Re: 2 extra bytes before ScriptSig on: August 11, 2011, 04:00:27 AM
Last question: I know how to sign something with a privkey, but what is the message signed in <sig>?


I found that on the wiki:
Quote
The other component is an ECDSA signature over a hash of a simplified version of the transaction. It, combined with the public key, proves the transaction was created by the real owner of the address in question. Various flags define how the transaction is simplified and can be used to create different types of payment.
which doesn't really help me, I still don't know what "simplified version" it is

I found the table here too: https://en.bitcoin.it/wiki/Script#Scripts
I understand it but OP_CHECKSIG verifies <sig> is from <pubKey>, I don't see the message signed

I couldn't find help in the OP_CHECKSIG page neither: https://en.bitcoin.it/wiki/OP_CHECKSIG

I also tried with this etotheipi's image: http://dl.dropbox.com/u/1139081/BitcoinImg/OpCheckSigDiagram.png
Still doesn't work, I tried with Hash256 as sha256 and sha256^2 but none worked
5235  Bitcoin / Development & Technical Discussion / Re: 2 extra bytes before ScriptSig on: August 11, 2011, 12:53:32 AM
Thanks for the graph, etotheipi
I love the bitcoin address graph too Wink
5236  Bitcoin / Development & Technical Discussion / Re: Pywallet: manage your wallet on: August 10, 2011, 07:51:37 PM
iv got the new version running 1.1-23

what does each field mean?

key=bitcoin private key?
message=duh
signature=?
public=bitcoin public key?
version=do i need to change that, or is that there for future reasons
Yes sorry I should have said that before

Three cases:
1. You just want some info, then just fill Key as usual
2. You want to sign, then fill Key and Msg to sign Msg with Key
3. You want to verify, then fill Msg, Sig and Pubkey to verify that Sig is a signature of Msg by Pubkey
5237  Bitcoin / Development & Technical Discussion / Re: Pywallet: manage your wallet on: August 10, 2011, 07:26:05 PM
What a dumb!
I was signing my test string instead of the msg form
Try your signatures as if the message were "coucou", it will work...

New release pushed, it will surely work better
5238  Bitcoin / Development & Technical Discussion / Re: Pywallet: manage your wallet on: August 10, 2011, 07:09:49 PM
Still nothing.

I tried it with a different key.  By the way, if you use --web, it ignores --wallet= on the command line.  It'd be nice if that carried over.

I went used Dump Your Wallet and copied out one of the "sec" values, scroll down to the info/sign/verify section, paste in the key, Get Info.  Results:

Code:
Address (Bitcoin): 17LeVE2fjEK7ncqxCToU4McytDHLUhKpyx
Privkey (Bitcoin): [secret]
Hexprivkey: [secret]
Pubkey: 04321a3c84e2e380215518fc952fbd782f20ca8940366f7575953c136dfb585b33a93e9969f546d13fd2afbf407dfd44a745b1421d027ee4f16de31a0d7a3b7edb

Type "maybe different words?" into the message box, Get Info.  Result:

Code:
Signature of 'maybe different words?' by 17LeVE2fjEK7ncqxCToU4McytDHLUhKpyx: 304402206e1704baf1c1238077b420b74c07dcdf6964155614005fe20089ce83445e2895022009ebcd27124a52ecdc90a4398438c5c400cc9dcd259560ec90d752a876946178
Pubkey: 04321a3c84e2e380215518fc952fbd782f20ca8940366f7575953c136dfb585b33a93e9969f546d13fd2afbf407dfd44a745b1421d027ee4f16de31a0d7a3b7edb

Go back up, clear out the Key: field.  Paste the sig and public key into the correct boxes, Get Info.  Result:

Code:
Signature of 'maybe different words?' by 17LeVE2fjEK7ncqxCToU4McytDHLUhKpyx is NOT 304402206e1704baf1c1238077b420b74c07dcdf6964155614005fe20089ce83445e2895022009ebcd27124a52ecdc90a4398438c5c400cc9dcd259560ec90d752a876946178

I changed the message to "test" just to make sure the question mark wasn messing up the URL encoding, and it still failed verification.
Have you tested this one?
     msg: "Hi github users :p"
    "pubkey" : "04ef6e366cd6b0b8fbf02c0c25ad39fe892b90c597875899fdc9db16941cf43fb8c429e0534cb8b 972f5cc9f1a50f36dc3352ffad427f073e1c64a145828a3be6e",
    "sign" : "3046022100a80b6e0c7c54c54ba943f4e3cde12f5a7dc5313e3f0a15ce868f01683ced64fa02210 08b4ad7d3800a11c241dcef7aaf44c8224a7d9f1e54d3e669bf4887036b6d10af"


I hope it's ok because here it works

Good idea for the wallet flag, will do it as soon as I resolve that

5239  Bitcoin / Development & Technical Discussion / Re: Pywallet: manage your wallet on: August 10, 2011, 07:03:31 PM
so if i want to use the new version of pywallet, do i need to run it without ecdsa, or is it just to test to make sure it works without crashing?
I just pushed the fix
Now if you run it, it should write that ecdsa is not present, and run normally except that you won't be able to sign/verify
5240  Bitcoin / Development & Technical Discussion / Re: 2 extra bytes before ScriptSig on: August 10, 2011, 06:40:23 PM
Thanks!
Pages: « 1 ... 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 [262] 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 »
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!