Bitcoin Forum
June 29, 2024, 05:22:11 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: « 1 2 3 4 5 6 7 8 9 10 11 [12] 13 14 15 16 »
221  Economy / Lending / Re: .5-3 BTC 2 Week Loan needed to keep up with demand - 20% Interest rate on: September 27, 2014, 06:37:07 PM
I may do it.  Where are you located?
222  Bitcoin / Bitcoin Discussion / Re: Have you guys got 0.00000001 with ads on: September 27, 2014, 06:33:21 PM

Why are these transactions even getting approved via the miners though?  Shouldn't they be considered dust, and ignored?

I don't really care, except it's extra inputs included in any tx I send, hence possibly increasing the tx fee.
223  Bitcoin / Bitcoin Discussion / Re: Ready to admit bitcoin is a failure? on: September 27, 2014, 06:24:52 AM
Wait until shit hits the fan in Syria, "home grown terrorists" conduct some attacks on Western soil, and govts impose even tighter population controls.  Then I bet you'll be singing a different tune about bitcoin.
224  Bitcoin / Bitcoin Discussion / Re: Bitcoin is no hedge against inflation - i unadopted it. on: September 26, 2014, 02:27:23 PM
I hold bitcoins because it allows me to store and transfer value without the help of a middleman or the permission of an authority. In today's world of ever increasing capital controls, this power is priceless to me. I can deal with the volatility of Bitcoin's early years to have this kind of control over my asset. Some people may not care about this feature (they don't mind paying middlemen and trust the authorities), in which case Bitcoin may not be for them.

Couldn't have said it better myself.
225  Bitcoin / Legal / Re: Australian Govt. form asks if I own any Bitcoin of Cryptocurrency on: September 26, 2014, 07:11:04 AM

Just write in the answer, "none of your fucken business".

226  Economy / Services / Re: 0.3 BTC Bounty -- C++ Big Integer Math Problem on: September 24, 2014, 07:25:30 AM
Can u still say whether this works?
and try this instead:

bnl = bnl + bnk
bnl = bnl % bno  or is it bnl = bno % bnl ?


Nope, I can't use operations like that (eg. bnl = bnl + bnk).  It throws errors for some reason, hence why I have "bnl += bnk" type operations instead.  That's the only way I can get it to compile without errors.  Documentation says "bnl = bnl + bnk" should work fine, but it doesn't for me at least.

Then things like "bnl %= bno" work fine for just standard integers, but don't seem to work at all for QCA::BigInteger data types.  Not sure why, but doesn't.

Well, that was a fun 3 days...

227  Economy / Services / Re: 0.3 BTC Bounty -- C++ Big Integer Math Problem on: September 24, 2014, 07:06:20 AM
Oh shit, I got it!  I don't really know how, but I did.  Just used this:

Code:
    // Do the math
    bnl += bnk;
    QCA::BigInteger bnd(bnl);
    bnd /= bno;

    if (bnd > 0) {
        bnd *= bno;
        bnl -= bnd;
    } else { bnl -= bno; }

    // Return
    QByteArray new_key = bnl.toArray().toByteArray();
    return new_key.remove(0, 1).toHex();

Sorry, reward now closed!

228  Economy / Services / Re: 0.3 BTC Bounty -- C++ Big Integer Math Problem on: September 24, 2014, 06:26:07 AM

Had a request for the PHP code as well, so here's a chunk of code that works fine. 

Code:
<?php

$chain_code 
"180c998615636cd875aa70c71cfa6b7bf570187a56d8c6d054e60b644d13e9d3";
$private_key "5c22f8937210130ad1bbc50678a7c0a119a483d47928c323bf0baa3a57fa547d";
$pubkey "023E4740D0BA639E28963F3476157B7CF2FB7C6FDF4254F97099CF8670B505EA5900000023";

// Hash data
$I hash_hmac('sha512'pack("H*"$pubkey), pack("H*"$chain_code));
$I_l substr($I064);
$I_r substr($I6464);

// Initialize curve
$g SECcurve::generator_secp256k1();
$n $g->getOrder();

// Generate key
$key str_pad(gmp_strval(gmp_Utils::gmp_mod2(gmp_add(gmp_init($I_l16), gmp_init($private_key16)), $n), 16), 64'0'STR_PAD_LEFT);
if(!isset(
$key)) return FALSE;

echo 
"NEW KEY:  $key\n";

?>

That gmp_Utils::mod2() function can be found at the very top of this Github page.

For that PHP code to work properly you need the entire library at:  https://github.com/Bit-Wasp/bitcoin-lib-php
229  Economy / Services / Re: 0.3 BTC Bounty -- C++ Big Integer Math Problem on: September 24, 2014, 06:03:30 AM
Could you pastebin the php code?

(i got different HMAC SHA512... :/ )

Elbandi

Sure, full contents of the bip32.h and bip32.cpp files are at:

http://pastebin.com/vCqtspFV

Then here's the code I'm currently running just to test the different functions:

Code:
bip32 *bp32 = new bip32();
bp32->import("xprv9s21ZrQH143K2JF8RafpqtKiTbsbaxEeUaMnNHsm5o6wCW3z8ySyH4UxFVSfZ8n7ESu7fgir8imbZKLYVBxFPND1pniTZ81vKfd45EHKX73");
QByteArray pubkey = bp32->private_to_public();
QString addr = bp32->get_addr();
bp32->get_definition_tuple("35");

QString ckey = bp32->derive_child_key();
txtPrivateKey->setPlainText(ckey);

Pretty much all functions are working fine, albeit some are incomplete.  The one I need help with is the last function there, derive_child_key().  Everything seems to work fine, up until I do that modulus operation.  Then it simply craps out, and doesn't seem to perform any math at all, as it doesn't modify the bnl variable at all.


230  Economy / Services / Re: 0.3 BTC Bounty -- C++ Big Integer Math Problem on: September 23, 2014, 10:02:32 PM
Sorry yayayo, but nope!

Ok, 0.4 BTC it is then!  I'm going to get some sleep, but I'll check this thread right upon waking up, and if anyone can resolve this, you'll have an extra 0.4 BTC to your name.  At current market rate, that's about $200.  Not bad...

Again, first come, first served.  Post your solution here publicly, so I know you were first.
231  Economy / Services / Re: 0.3 BTC Bounty -- C++ Big Integer Math Problem on: September 23, 2014, 08:10:42 PM
I have someone who can do this for like 0.05 btc , but i don't have any if u pay me 0.05 btc now i will send him and get it solved , after solved u can pay me rest 0.025 otherwise i give u -ve rep . BTC  address always in my signature space

Ummm, let's not and say we did.

232  Economy / Services / 0.3 BTC Bounty -- C++ Big Integer Math Problem on: September 23, 2014, 06:33:55 PM
Post a working solution to the problem below, along with your BTC address, and I'll send you 0.3 BTC.  First come, first served.  For proof that I do pay bounties instantly upon a working solution, please see this thread.

Basically, I need to do a bunch of the math calculations in C++ (using Qt), and am stuck with deriving a BIP32 child key.  I do have a fair bit done though.  I can input a BIP32 private key, pick it apart, get the public key using ECDSA (compressed or uncompressed), I can encode the address from the key, and so on.

However, I'm stuck on deriving a child key.  I can do the math just fine with PHP's gmp library, but I can't get the results from the PHP and C++ code to match up.  They should match up perfectly, since it's just math.  I've tried both, QCA (http://delta.affinix.com/docs/qca/) and just using BIGNUM data type to no avail.  So here's the problem:


Compressed Public Key:  023E4740D0BA639E28963F3476157B7CF2FB7C6FDF4254F97099CF8670B505EA59
Private Key:            5c22f8937210130ad1bbc50678a7c0a119a483d47928c323bf0baa3a57fa547d
Chain Code:             180c998615636cd875aa70c71cfa6b7bf570187a56d8c6d054e60b644d13e9d3
Key Index:              35 (00000023)


Here's a small chunk of code I currently have.

Code:
QByteArray pubkey = "023E4740D0BA639E28963F3476157B7CF2FB7C6FDF4254F97099CF8670B505EA5900000023";
QByteArray privkey = "5c22f8937210130ad1bbc50678a7c0a119a483d47928c323bf0baa3a57fa547d";
QByteArray chain_code = "180c998615636cd875aa70c71cfa6b7bf570187a56d8c6d054e60b644d13e9d3";

// HMAC SHA512 Hash
QCA::MessageAuthenticationCode hmac("hmac(sha512)", QCA::SecureArray());
QCA::SecureArray karr(chain_code);
QCA::SymmetricKey sk(karr);
hmac.setup(sk);
hmac.update(QCA::hexToArray(pubkey));

// Parse resulting hash
QByteArray result = hmac.final().toByteArray();
QCA::SecureArray arr_left(result.left(32));
QCA::SecureArray arr_key(privkey);

// Get big integers
QCA::BigInteger bnl(arr_left);
QCA::BigInteger bnk(arr_key);
QCA::BigInteger bno("115792089237316195423570985008687907852837564279074904382605163141518161494337");

// Do the math
bnl += bnk;
bnl %= bno;

// Return
QByteArray new_key = bnl.toArray().toByteArray().toHex();
return new_key;

The HMAC SHA512 hash is fine, and I get the correct result from both, PHP and C++, which is:  fa634546bbddad6f51e8a7ff05976e0d8813aafb656bf0c7cacb53a200e9e3e624e199e9e83fa03 eedd5056ac2de8482be17fcb6d85ebf15faa1976e5df957aa

However, that's where it ends.  Basically, I need the remainder of ((bnl + bnk) / bno).  Problem seems to start just after the addition, as the results I get are just slightly different:

PHP:   56863dda2dedc07a23a46d057e3f2eaea1b82ecfde94b3eb89d6fddc58e43863
C++    156863dda2dedc07a23a46d057e3f2eaea1b82ecfde94b3eb89d6fddc58e43863

For whatever reason, the C++ variant is throwing an extra '1' on the beginning.  If I try to convert any of the integers into strings, they're completely off from what PHP gives me as strings for the numbers.  Anyway, here's the current results I get for the new private key:

PHP:   56863dda2dedc07a23a46d057e3f2eafe70951e92f4c13afca049f4f88adf722
C++:   56863dda2dedc07a23a46d057e3f2eaea1b82ecfde94b3eb89d6fddc58e43863

I need a solution in C++ (using QCA, BIGNUM, whatever -- although I would prefer QCA) that does the proper math, and gives me the same result I'm getting in PHP.  If you know how, please post your solution here along with your BTC address, and I'll send 0.3 BTC right away.  Thanks!

233  Economy / Speculation / Stop with the Doom and Gloom -- Bitcoin will Skyrocket Over Next 12 Months on: September 20, 2014, 03:46:51 PM

Right now, there's two main things keeping the price fairly low:

a) $1.5 million in new coins being generated every day.
b) High merchant adoption, but none of the merchants hold bitcoin, and instantly transfer into fiat instead.

However, what's the newest service in the bitcoin industry that's starting to come out en-masse?  That's right, payroll services!  Even BitPay is getting in on the game, and so are companies in countries around the world.  What we're now beginning to see if employees requesting their bosses to signup for these payroll services, so they can be paid in bitcoin instead of fiat.  Assuming this gains decent adoption, that's a whole lot more BTC being bought every month, and the price should sky rocket.
234  Bitcoin / Bitcoin Discussion / Re: Bitcoins replacing real curency? on: September 16, 2014, 02:51:26 PM
Example:  Assume that you are one of the majority of normal people out there who don't care about the above things I have listed, are you really going to go onto an exchange spend $100USD to buy BTC95  and use this fluctuating Money to buy goods with it? At the time of exchange, right there and then you have just lost $5 without doing a single thing.

True, but flip the scenario around.  If you're given a choice to be paid in BTC or fiat, which do you choose?  What happens when if / when a time comes when 80% of your bills and expenses can be paid via BTC?

This is what is already happening within the tech world, and will continue to happen and expand as BTC gains adoption.  People are paid in BTC, and they use those funds to pay any & all bills they can, make any possible new purchases they need, etc.  So the amount of fiat that hits their bank account ends up being quite a bit lower than previously, which is a good thing for obvious reasons.

235  Alternate cryptocurrencies / Altcoin Discussion / Re: Any good multi-coin wallets already? on: September 11, 2014, 11:58:30 AM
http://envrin.com/wallet/
236  Bitcoin / Bitcoin Discussion / Re: Educating / Donating via Bitcoin on: September 09, 2014, 12:39:24 AM
It really is a shame that more people are not taking up the offer of bitcoin because they seem to think it's some kind of scam or the person sending it will scam them. Fingers crossed one day they will realise.

Yeah, but then every once in a while you get a message like this:

Quote
Crazy awesome! I totally want to try this out. I have a hate on for paypal, so hopefully this catches on as an alternative.

And it makes you feel all warm and fuzzy inside. Smiley  Plus being able to drop names like Dell and Expedia always helps.
237  Bitcoin / Bitcoin Discussion / Educating / Donating via Bitcoin on: September 08, 2014, 03:20:18 PM

I have to admit, I've never had such difficulty giving people my money. Smiley

I'll go onto Facebook, and there's always someone looking for donations for something.  My new rule is I'll donate, but only via bitcoin, and I drop a reply saying if they accept bitcoin, I'll be happy to donate $20 or $50, or whatever, depending on the cause.  This tends to completely catch people off guard.  I've had everything from people getting angry at me and accusing me of trying to scam them, to people thinking bitcoin is a company that flopped a year or ago, to people who are genuinely curious, to people who are scared of anything new, etc.

Uggghhh...  I think we still have a long ways to go boys.
238  Bitcoin / Bitcoin Discussion / Re: We neet bitcoin ATMs on: September 08, 2014, 05:18:17 AM
No, we need more people getting paid in bitcoin, is what we need.  Merchant adoption is there, and that problem has been solved just fine.  Now we need those same companies who adopted bitcoin to pay their employees in bitcoin.

Then it will take off.

EDIT: And I just realized I'm replying to a 3.5 year old thread.  This is fun. Smiley
239  Alternate cryptocurrencies / Altcoin Discussion / Re: Multi Alt Coin Wallet ? on: September 07, 2014, 11:37:01 PM

Start your own web wallet!  See my sig for details, and fully supports alt-coins.

240  Bitcoin / Bitcoin Discussion / Re: Money was stolen out of my localbitcoins account on: September 07, 2014, 05:16:22 AM

And when you contacted LBC customer support, they said.... Huh?

Pages: « 1 2 3 4 5 6 7 8 9 10 11 [12] 13 14 15 16 »
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!