dooglus
Legendary
Offline
Activity: 2940
Merit: 1333
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 17, 2015, 10:30:11 AM |
|
Actually I just concluded that based on: PBKDF2 is defined as PBKDF2(PRF, Password, Salt, iterations, dkLen) which I'll use as PBKDF2('sha256', BLOCK_HASH, 'pevpot', 10000000000, 32)
The fastest implementation I could find was openssl, which when compiled with -O3 took about 2h47m to run. With the fastest virtual machine I could get my hands on (c4.8xlarge), I got it running in about 2h1m. Since it's 5B instead of 10B, I figured it's around 1 - 2 hours. Well alright then!
|
Just-Dice | ██ ██████████ ██████████████████ ██████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████ ██████████████ ██████ | Play or Invest | ██ ██████████ ██████████████████ ██████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████ ██████████████ ██████ | 1% House Edge |
|
|
|
NLNico
Legendary
Offline
Activity: 1876
Merit: 1295
DiceSites.com owner
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 17, 2015, 12:24:34 PM |
|
Well.. I guess the site isn't calculating it in an automated way (yet) and I guess Ryan didn't start his "monster C4 instance" yet when the block got mined ![Tongue](https://bitcointalk.org/Smileys/default/tongue.gif) My script is running for 2.5h now and total estimated time on my laptop is around 4h (based on 100x less iterations test.) Either way, hope to see the result soon ![Smiley](https://bitcointalk.org/Smileys/default/smiley.gif)
|
|
|
|
NLNico
Legendary
Offline
Activity: 1876
Merit: 1295
DiceSites.com owner
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 17, 2015, 12:49:32 PM |
|
Actually after 2h 40m my script is finished. But because I made my own script I am bit afraid to share the result as it might have mistakes lol ![Tongue](https://bitcointalk.org/Smileys/default/tongue.gif) :X (I only had it for verification, didn't expect to be the first.) Hint: if my result is correct, the winner would be not surprising. I would hope Ryan can run it first though, just in case I made a mistake :X edit: I actually hope I am wrong, so my small bet still has a chance lol.
|
|
|
|
Mitchell
Legendary
Offline
Activity: 3990
Merit: 2207
Verified awesomeness ✔
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 17, 2015, 12:54:06 PM |
|
Actually after 2h 40m my script is finished. But because I made my own script I am bit afraid to share the result as it might have mistakes lol ![Tongue](https://bitcointalk.org/Smileys/default/tongue.gif) :X (I only had it for verification, didn't expect to be the first.) Hint: if my result is correct, the winner would be not surprising. I would hope Ryan can run it first though, just in case I made a mistake :X edit: I actually hope I am wrong, so my small bet still has a chance lol. One of those very big bets right?
|
| | | . Duelbits | | | ▄████▄▄ ▄█████████▄ ▄█████████████▄ ▄██████████████████▄ ▄████▄▄▄█████████▄▄▄███▄ ▄████▐▀▄▄▀▌██▄█▄██▐▀▄▄▀▌███ ██████▀▀▀▀████▀███▀▀▀▀█████ ▐████████████■▄▄▄■██████████▀ ▐██████████████████████████▀ ██████████████████████████▀ ▀███████████████████████▀ ▀███████████████████▀ ▀███████████████▀ | | | | | . ▄ ▄▄▀▀▀▀▄▄ ▄▀▀▄ █ █ ▀▄ █ ▄█▄ ▀▄ █ ▄▀ ▀▄ ▀█▀ ▄▀ ▀█▄▄▄▀▀ ▀ ▄▀ ▄▀ ▄▀
Live Games | | ▄▄▀▀▀▀▀▀▀▄▄ ▄▀ ▄▄▀▀▀▀▀▄▄ ▀▄ ▄▀ █ ▄ █ ▄ █ ▀▄ █ █ ▀ ▀ █ █ ▄▄▄ █ ▀▀▀▀▀▀▀▀▀▀▀▀▀ █ █ █ █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█ █▄█ █ ▀▀█ ▀▀█ ▀▀█ █ █▄█
Slots | | . ▄▀▀▀▀▀▀▀▀▀▀▀▀▀▄ █ ▄▄ █ ▄▀▀▀▀▀▀▀▀▀▀▀▀▀▄ █ █ ▄▄ █ █ █ █ █ █ ▄▀▀▄▀▀▄ █ █ █ ▀▄ ▄▀ █ █
Blackjack | | | | █▀▀▀▀▀█▄▄▄ ▀████▄▄ ██████▄ ▄▄▄▄▄▄▄▄█▀ ▀▀█ ████████▄ █ █████████▄ █ ██████████▄ ▄██ █████████▀▀▀█▄▄████ ▀▀███▀▀ ████ █ ███ █ █▀ ▄█████▄▄▄ ▄▄▀▀ ███████▀▀▀ | | | | | | | | | | [ Đ ][ Ł ] AVAILABLE NOW | |
Advertisements are not endorsed by me.
|
|
|
NLNico
Legendary
Offline
Activity: 1876
Merit: 1295
DiceSites.com owner
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 17, 2015, 12:58:02 PM |
|
Yeh, that would be the least surprising ![Tongue](https://bitcointalk.org/Smileys/default/tongue.gif) In a next round I could probably just share the result if I am first.. but I am really afraid somehow it's wrong (since it's my own script and first round) and I would make someone "happy" with the wrong result lol. So take the hint for what it is and hope Ryan has official result soon ![Smiley](https://bitcointalk.org/Smileys/default/smiley.gif)
|
|
|
|
zeraTunerse
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 17, 2015, 01:48:18 PM |
|
From Moneypot to Pevpot , op is always playing with ideas , and i like that.
|
|
|
|
RHavar (OP)
Legendary
Offline
Activity: 1531
Merit: 1886
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 17, 2015, 01:58:32 PM |
|
Can anyone confirm or deny that?
Looks perfect, it seems to exactly match: https://www.pevpot.com/draws/1(I also like how you use inclusive bounds, I'll update to that)
|
Check out gamblingsitefinder.com for a decent list/rankings of crypto casinos. Note: I have no affiliation or interest in it, and don't even agree with all the rankings ... but it's the only uncorrupted review site I'm aware of.
|
|
|
NLNico
Legendary
Offline
Activity: 1876
Merit: 1295
DiceSites.com owner
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 17, 2015, 02:11:19 PM |
|
Hm no. I used PHP. Example one is correct: echo hash_pbkdf2("sha256", "00000000000000000ef86b27c174df6a412c0ce43eab1d532034555749294137", "pevpot", 100000, 64); > 39aed3d2eff372916100106e355384495d1794320d4c3cb4c2e0e48cc36bbd06 Then with: echo hash_pbkdf2("sha256", "000000000000000009b7fb236187f120a0c86eb8785f099a8d197dd34b9d2553", "pevpot", 5000000000, 64); I got: > 6e466cdd13cc80b1137addf46362bbe3714fc9bf7faef9aba930554d3e080ba5 Anything wrong with the block hash I used or something? 5000000000, correct too right? edit: note the 64 is because PHP parameter is in hexits, not bytes.
|
|
|
|
NLNico
Legendary
Offline
Activity: 1876
Merit: 1295
DiceSites.com owner
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 17, 2015, 02:41:47 PM |
|
![Tongue](https://bitcointalk.org/Smileys/default/tongue.gif) obviously my PHP one could be wrong too.. so hope I am not wasting your time lol. I mean PHP doesn't really like big integers, potentially it's messing up that function too.
|
|
|
|
NLNico
Legendary
Offline
Activity: 1876
Merit: 1295
DiceSites.com owner
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 17, 2015, 02:53:21 PM |
|
Well PHP also uses OpenSSL in background and it seems to force the iterations into 'int' too ( source code) - but I seem to be running 64-bit version: > php -r 'echo PHP_INT_MAX;' > 9223372036854775807 edit: for the lulz I am now running with 2147483647 iterations ![Tongue](https://bitcointalk.org/Smileys/default/tongue.gif) might be not finished before I go to sleep though.
|
|
|
|
dooglus
Legendary
Offline
Activity: 2940
Merit: 1333
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 17, 2015, 04:13:16 PM |
|
Well PHP also uses OpenSSL in background and it seems to force the iterations into 'int' too ( source code) - but I seem to be running 64-bit version: > php -r 'echo PHP_INT_MAX;' > 9223372036854775807 edit: for the lulz I am now running with 2147483647 iterations ![Tongue](https://bitcointalk.org/Smileys/default/tongue.gif) might be not finished before I go to sleep though. I found a native PHP one: https://defuse.ca/php-pbkdf2.htmwhich should avoid the 32 bit problems. It passes the test-vector, and I'm testing it on the full data. Also running a native javascript one, and rebuilding openssl with using a 64 bit integer for the iteration count ![Cheesy](https://bitcointalk.org/Smileys/default/cheesy.gif) I got the same as NLNico using a modified openssl version. I ran into the 32 bit integer limit too, so did this to bypass it - it saved me having to rebuild openssl - I just copied and modified the function with the 32 bit limit: #include <stdio.h> #include <string.h> #include <openssl/hmac.h> #include <openssl/evp.h>
int pbkdf2(const char *pass, const unsigned char *salt, long iter, const EVP_MD *digest, unsigned char *out) { unsigned char digtmp[32], itmp[4]; int k, mdlen, saltlen = strlen(salt); unsigned long j; HMAC_CTX hctx_tpl, hctx;
mdlen = EVP_MD_size(digest); HMAC_CTX_init(&hctx_tpl); HMAC_Init_ex(&hctx_tpl, pass, strlen(pass), digest, NULL); itmp[0] = itmp[1] = itmp[2] = 0; itmp[3] = 1; HMAC_CTX_copy(&hctx, &hctx_tpl); HMAC_Update(&hctx, salt, saltlen); HMAC_Update(&hctx, itmp, 4); HMAC_Final(&hctx, digtmp, NULL); HMAC_CTX_cleanup(&hctx); memcpy(out, digtmp, mdlen); for (j = 1; j < iter; j++) { HMAC_CTX_copy(&hctx, &hctx_tpl); HMAC_Update(&hctx, digtmp, mdlen); HMAC_Final(&hctx, digtmp, NULL); HMAC_CTX_cleanup(&hctx); for (k = 0; k < mdlen; k++) out[k] ^= digtmp[k]; if (j % 10000000 == 9999999) { int i; printf("%lu ", (j+1)/1000000); for (i=0;i<32;i++) printf("%02x", out[i]); printf("\n"); } } HMAC_CTX_cleanup(&hctx_tpl); return 1; }
void main() { size_t i; unsigned char out[32]; const char pwd[] = "000000000000000009b7fb236187f120a0c86eb8785f099a8d197dd34b9d2553"; pbkdf2(pwd, "pevpot", 5000000000, EVP_sha256(), out); printf("out: "); for(i=0;i<32;i++) { printf("%02x", out[i]); } printf("\n"); }
It shows the output after every 10 million iterations, to show that it's really doing all the work: $ gcc -O3 pbkdf2.c -lssl -lcrypto $ ./a.out pass: 000000000000000009b7fb236187f120a0c86eb8785f099a8d197dd34b9d2553 ITERATION: 5000000000 salt: 706576706f74 10 4e54363ee4f5a8f0a13f36fcbe46568e496c787ac24ab466e18b80f959c4e426 20 1c08cfe17c6b036075fb45ea1d5b95073ebdfdd4a329cd1a30030e34f26cb8b1 30 110a65fb8928595ad797371bf1f77db371d62af560b6431704b7e91157a89065 [...] 4980 522f0ace7099f90c9a358014500f702fb10ab7f3a0ebeb3a7c221be91309a0d8 4990 38ca9ef690e27bcef846ef9852161f8f33223499fc2c57c1f0116995cb09744c 5000 6e466cdd13cc80b1137addf46362bbe3714fc9bf7faef9aba930554d3e080ba5 out: 6e466cdd13cc80b1137addf46362bbe3714fc9bf7faef9aba930554d3e080ba5 $
That last line is the same as NLNico's PHP output, so I'm reasonably confident in it. Then: >>> print 0x6e466cdd13cc80b1137addf46362bbe3714fc9bf7faef9aba930554d3e080ba5 % 2370006599 2341821270
Meaning the winner only bet 0.15 BTC! b6abba202c99971e59021cef44a03904ec847f3344067bea85f8fd12d01678ca 0.00097120 : 2336305993 - 2336403112 b83f1fa87c86f9f1ccfe4050f07d89cd42c9e6670f4ac2a50fb353b626e2cac8 0.14997120 : 2336403113 - 2351400232 <-- this guy b96d2df7cced243d4c729e26698f48e3b6f129120767812ff84e493f5efe8e6b 0.00997120 : 2351400233 - 2352397352
I also could be wrong, and would like to see NLNico's working, since this is a relatively surprising result.
|
Just-Dice | ██ ██████████ ██████████████████ ██████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████ ██████████████ ██████ | Play or Invest | ██ ██████████ ██████████████████ ██████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████ ██████████████ ██████ | 1% House Edge |
|
|
|
Falconer
Legendary
Offline
Activity: 2590
Merit: 1132
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 17, 2015, 04:17:09 PM |
|
Meaning the winner only bet 0.15 BTC! b6abba202c99971e59021cef44a03904ec847f3344067bea85f8fd12d01678ca 0.00097120 : 2336305993 - 2336403112 b83f1fa87c86f9f1ccfe4050f07d89cd42c9e6670f4ac2a50fb353b626e2cac8 0.14997120 : 2336403113 - 2351400232 <-- this guy b96d2df7cced243d4c729e26698f48e3b6f129120767812ff84e493f5efe8e6b 0.00997120 : 2351400233 - 2352397352
I also could be wrong, and would like to see NLNico's working, since this is a relatively surprising result. If this is correct then this guy would be the most happy guy ever to bet 0.15 and win 23 + BTC. Surprising result however this at the same time would be a shocking loss for the guy that buy 10 btc worth of tickets. I would love to hear an official winner statement regarding this from ryan soon
|
|
|
|
NLNico
Legendary
Offline
Activity: 1876
Merit: 1295
DiceSites.com owner
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 17, 2015, 04:19:53 PM |
|
Yeh, it could be that I did that part wrong as I wasn't sure about it: So if we calculated the result hash, can we just do: parseInt('hash',16)%tickets) or do we need some big int special since it's a 256 bit number ? I don't know much about that ![Sad](https://bitcointalk.org/Smileys/default/sad.gif) I did: parseInt('6e466cdd13cc80b1137addf46362bbe3714fc9bf7faef9aba930554d3e080ba5',16)%2370006599 > 693288453 Does that make any sense? Lol.
|
|
|
|
dooglus
Legendary
Offline
Activity: 2940
Merit: 1333
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 17, 2015, 04:25:42 PM |
|
I did:
parseInt('6e466cdd13cc80b1137addf46362bbe3714fc9bf7faef9aba930554d3e080ba5',16)%2370006599
> 693288453
Does that make any sense? Lol.
I'm guessing the parseInt() is giving you a 64 bit integer, and losing all the more significant bytes. I do prefer your answer however... ![Roll Eyes](https://bitcointalk.org/Smileys/default/rolleyes.gif) Edit: I was wrong - it's actually converting to floating point, and losing the least significant bits: > parseInt('6e466cdd13cc80b1137addf46362bbe3714fc9bf7faef9aba930554d3e080ba5',16) 4.9878843987532516e+76 > parseInt('6e466cdd13cc80b1137addf46362bbe3714fc9bf7faef9aba930554d3e080ba5',16) == parseInt('6e466cdd13cc80b1137addf46362bbe3714fc9bf7faef9aba930554d3e080ba5',16)+1 true
So I'm more sure now that the lucky winner is the owner of 1FuckThisFRNcH8eJkhWAMBndxRVZBVBdE and 1HoLyShitRw7dNvPvgPMDndTid5FDmvDnh ![Smiley](https://bitcointalk.org/Smileys/default/smiley.gif) See https://blockchain.info/tx/d3e9e97d8981136a189dad329527085c7a72ee2335acac00e1893ed547c419eb and https://blockchain.info/tx/b83f1fa87c86f9f1ccfe4050f07d89cd42c9e6670f4ac2a50fb353b626e2cac8.
|
Just-Dice | ██ ██████████ ██████████████████ ██████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████ ██████████████ ██████ | Play or Invest | ██ ██████████ ██████████████████ ██████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████ ██████████████ ██████ | 1% House Edge |
|
|
|
RHavar (OP)
Legendary
Offline
Activity: 1531
Merit: 1886
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 17, 2015, 04:28:05 PM |
|
I'm getting the same result as dooglus with my recompiled openssl, and same outcome: > var bignum = require('bignum'); > bignum('6e466cdd13cc80b1137addf46362bbe3714fc9bf7faef9aba930554d3e080ba5', 16).mod(2370006599).toString() '2341821270'
I do however want to wait until the other solutions I have running (in native js, and native php) terminate before sending the winner the money. But it's strongly looking like: b83f1fa87c86f9f1ccfe4050f07d89cd42c9e6670f4ac2a50fb353b626e2cac8 is our winner
|
Check out gamblingsitefinder.com for a decent list/rankings of crypto casinos. Note: I have no affiliation or interest in it, and don't even agree with all the rankings ... but it's the only uncorrupted review site I'm aware of.
|
|
|
NLNico
Legendary
Offline
Activity: 1876
Merit: 1295
DiceSites.com owner
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 17, 2015, 04:31:57 PM |
|
Okay, yeh with some basic testing parseInt() indeed messes up bigger numbers.
So I guess we do have a lucky/surprising winner.
|
|
|
|
dooglus
Legendary
Offline
Activity: 2940
Merit: 1333
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 17, 2015, 04:34:35 PM |
|
|
Just-Dice | ██ ██████████ ██████████████████ ██████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████ ██████████████ ██████ | Play or Invest | ██ ██████████ ██████████████████ ██████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████ ██████████████ ██████ | 1% House Edge |
|
|
|
NLNico
Legendary
Offline
Activity: 1876
Merit: 1295
DiceSites.com owner
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 17, 2015, 04:42:17 PM |
|
Told you it wasn't a surprising result... cowbay always wins those high multiplier bets on all sites :XD![Cheesy](https://bitcointalk.org/Smileys/default/cheesy.gif) Nice win!
|
|
|
|
dooglus
Legendary
Offline
Activity: 2940
Merit: 1333
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 17, 2015, 05:10:11 PM |
|
Told you it wasn't a surprising result... cowbay always wins those high multiplier bets on all sites :XD![Cheesy](https://bitcointalk.org/Smileys/default/cheesy.gif) Nice win! It's kind of cool that every ticket bought has a direct impact on the outcome by changing the modulus used. A difference of a single satoshi in either direction completely changes the result: >>> print 0x6e466cdd13cc80b1137addf46362bbe3714fc9bf7faef9aba930554d3e080ba5 % 2370006598 1757345155 ... and the 5.92947120 bet wins >>> print 0x6e466cdd13cc80b1137addf46362bbe3714fc9bf7faef9aba930554d3e080ba5 % 2370006600 886980269 ... and the 10.82969911 bet wins
|
Just-Dice | ██ ██████████ ██████████████████ ██████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████ ██████████████ ██████ | Play or Invest | ██ ██████████ ██████████████████ ██████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████ ██████████████ ██████ | 1% House Edge |
|
|
|
RHavar (OP)
Legendary
Offline
Activity: 1531
Merit: 1886
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 17, 2015, 06:26:41 PM Last edit: November 17, 2015, 09:13:03 PM by RHavar |
|
I got the same as NLNico using a modified openssl version. I ran into the 32 bit integer limit too, so did this to bypass it - it saved me having to rebuild openssl - I just copied and modified the function with the 32 bit limit:
Thanks for doing that BTW, I created a mini repo for it: https://github.com/moneypot/pevpot-stretchI'll try wrap it in a node module too later. (But for now, I'm still running the verification in the native php and native js solution. Make sure they corroborate the same stretched hash. ) Update: The native PHP solution is matching <modified openssl>, so I'm getting quite confident it's correct. I'm still waiting for the native javascript one to terminate, before I'm sure though =)
|
Check out gamblingsitefinder.com for a decent list/rankings of crypto casinos. Note: I have no affiliation or interest in it, and don't even agree with all the rankings ... but it's the only uncorrupted review site I'm aware of.
|
|
|
|