Bitcoin Forum
November 06, 2024, 05:11:31 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 »  All
  Print  
Author Topic: Game 2: First person to crack this gets 5 BTC [SOLVED]  (Read 2449 times)
Ean (OP)
Full Member
***
Offline Offline

Activity: 199
Merit: 100



View Profile
January 09, 2012, 11:08:20 PM
Last edit: January 14, 2012, 08:06:24 AM by Ean
 #1

When I tried to solve the last puzzle I got some ideas. Therefore I decided to give away the prize.

The new riddle:
t+3HVMPwe1rr96QryQdZtZt1LWfcXnEFSG9rKiRuv8ewxwvUmZMH1zwn/Xi4

(Address: 1QE6bWhqizxUVuq55GjL1SErVKH9YCHb7e)

Quote from: Douglas Adams
The World Wide Web is the only thing I know of whose shortened form takes three times longer to say than what it's short for
scintill
Sr. Member
****
Offline Offline

Activity: 448
Merit: 254


View Profile WWW
January 10, 2012, 02:03:56 AM
 #2

Awesome!  It's like a new brand of "capture the flag"

So, same rules as last time?

1SCiN5kqkAbxxwesKMsH9GvyWnWP5YK2W | donations
Ean (OP)
Full Member
***
Offline Offline

Activity: 199
Merit: 100



View Profile
January 10, 2012, 06:35:54 AM
 #3

So, same rules as last time?
More or less. You get 7 days, but I don't think I can give any hints without give it away.

Quote from: Douglas Adams
The World Wide Web is the only thing I know of whose shortened form takes three times longer to say than what it's short for
Ean (OP)
Full Member
***
Offline Offline

Activity: 199
Merit: 100



View Profile
January 11, 2012, 08:47:46 PM
 #4

Okay, I'll give you a clue:
It's not base64.

Quote from: Douglas Adams
The World Wide Web is the only thing I know of whose shortened form takes three times longer to say than what it's short for
scintill
Sr. Member
****
Offline Offline

Activity: 448
Merit: 254


View Profile WWW
January 12, 2012, 07:11:43 AM
 #5

Okay, I'll give you a clue:
It's not base64.

Ahh, I hit dead ends investigating that angle with the last one, so I didn't think much of it this time, especially since it looks the same!

I had some ideas for non-base64, but they don't seem to be working out.  If you feel like giving another hint, maybe you can answer this: Is there significant extraneous or missing information?  (I guess the last one had a few extra bits, but for purposes of a hint I wouldn't consider them extra.)

1SCiN5kqkAbxxwesKMsH9GvyWnWP5YK2W | donations
Ean (OP)
Full Member
***
Offline Offline

Activity: 199
Merit: 100



View Profile
January 12, 2012, 08:41:42 AM
 #6

Is there significant extraneous or missing information?
Nothing is missing.
In a way, you could say it's not encoded at all ...

Quote from: Douglas Adams
The World Wide Web is the only thing I know of whose shortened form takes three times longer to say than what it's short for
mb300sd
Legendary
*
Offline Offline

Activity: 1260
Merit: 1000

Drunk Posts


View Profile WWW
January 12, 2012, 06:30:44 PM
 #7

I can't figure it out.. If thats not base64, I have no idea where to start. I assume you're also using 7-bit since its the same length.

1D7FJWRzeKa4SLmTznd3JpeNU13L1ErEco
Ean (OP)
Full Member
***
Offline Offline

Activity: 199
Merit: 100



View Profile
January 12, 2012, 06:58:05 PM
 #8

It's actually closer to the answer than you think.
In a way, you don't even need to decode.

Quote from: Douglas Adams
The World Wide Web is the only thing I know of whose shortened form takes three times longer to say than what it's short for
MelMan2002
Sr. Member
****
Offline Offline

Activity: 461
Merit: 251



View Profile
January 13, 2012, 10:13:29 PM
 #9

Read the + and / as mathematical operators.  The rest is in base58Check.

private key: 5KEzAJbyWBoJdjiDAMatvGTjUTurFsyweGknk8r29tUGSS7k5o9

19F6veduCZcudwXuWoVosjmzziQz4EhBPS
Ean (OP)
Full Member
***
Offline Offline

Activity: 199
Merit: 100



View Profile
January 13, 2012, 10:36:57 PM
 #10

Read the + and / as mathematical operators.  The rest is in base58Check.

private key: 5KEzAJbyWBoJdjiDAMatvGTjUTurFsyweGknk8r29tUGSS7k5o9
Congratulations!
Now you just have to take the coins.

Quote from: Douglas Adams
The World Wide Web is the only thing I know of whose shortened form takes three times longer to say than what it's short for
MelMan2002
Sr. Member
****
Offline Offline

Activity: 461
Merit: 251



View Profile
January 13, 2012, 10:59:01 PM
 #11

Thought I did - have I not?  Shocked

19F6veduCZcudwXuWoVosjmzziQz4EhBPS
Ean (OP)
Full Member
***
Offline Offline

Activity: 199
Merit: 100



View Profile
January 13, 2012, 11:06:01 PM
 #12

Thought I did - have I not?  Shocked
I suppose.
But I can still see them in Electrum ...

Quote from: Douglas Adams
The World Wide Web is the only thing I know of whose shortened form takes three times longer to say than what it's short for
xzion
Member
**
Offline Offline

Activity: 96
Merit: 10


View Profile
January 13, 2012, 11:24:33 PM
Last edit: January 13, 2012, 11:51:46 PM by xzion
 #13

can you give a bit more details on how to get the right result?
i still can't get it to work  Sad

EDIT: nevermind, got it. good challenge!

Tips: 1xzionJBueq1AkPSmexA7suWkztAkNwSs
MelMan2002
Sr. Member
****
Offline Offline

Activity: 461
Merit: 251



View Profile
January 13, 2012, 11:45:58 PM
 #14

can you give a bit more details on how to get the right result?
i still can't get it to work  Sad

Details on Base58Check can be found here:
https://en.bitcoin.it/wiki/Base58Check_encoding

Either you find a calculator that can handle a custom number system (my searches were fruitless but I'm sure that they exist) or you convert it to a number system that you can use to do the divide and addition operations.

To convert "Xi4" to base 10, for example, you would have (30*58^2)+(41*58^1)+(3*58^0)=103301

19F6veduCZcudwXuWoVosjmzziQz4EhBPS
MelMan2002
Sr. Member
****
Offline Offline

Activity: 461
Merit: 251



View Profile
January 13, 2012, 11:50:05 PM
 #15

I suppose that the other option is to do the division by hand in Base58Check but...that can be rather tricky.

19F6veduCZcudwXuWoVosjmzziQz4EhBPS
Ean (OP)
Full Member
***
Offline Offline

Activity: 199
Merit: 100



View Profile
January 14, 2012, 12:00:54 AM
 #16

I used these python functions for the conversion to and from integer numbers:

Code:
__b58chars = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'
__b58base = len(__b58chars)

def b58encode(v):
    result = []
    while v > 0:
        v, mod = divmod(v, __b58base)
        result.append(__b58chars[mod])
    return ''.join(result[::-1])

def b58decode(v):
    return sum(__b58chars.find(c) * __b58base ** i for i, c in enumerate(v[::-1]))

Quote from: Douglas Adams
The World Wide Web is the only thing I know of whose shortened form takes three times longer to say than what it's short for
scintill
Sr. Member
****
Offline Offline

Activity: 448
Merit: 254


View Profile WWW
January 14, 2012, 12:29:52 AM
 #17

Good job, MelMan2002!

If anyone else is wondering, here's how I replicated the result in PHP:

Code:
<?php

// adapted from
// http://darklaunch.com/2009/08/07/base58-encode-and-decode-using-php-with-example-base58-encode-base58-decode
function base58_decode($num) {
    
$alphabet '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
    
$len strlen($num);
    
$decoded 0;
    
$multi 1;
 
    for (
$i $len 1$i >= 0$i--) {
        
$decoded bcadd($decodedbcmul($multistrpos($alphabet$num[$i])));
        
$multi bcmul($multistrlen($alphabet));
    }
 
    return 
$decoded;
}

function 
base58_encode($num) {
    
$alphabet '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
    
$base_count strlen($alphabet);
    
$encoded '';
 
    while (
bccomp($num$base_count) >= 0) {
        
$div bcdiv($num$base_count0);
        
$mod bcsub($numbcmul($base_count$div));
        
$encoded $alphabet[$mod] . $encoded;
        
$num $div;
    }
 
    if (
$num) {
        
$encoded $alphabet[(int)$num] . $encoded;
    }
 
    return 
$encoded;
}

// http://us2.php.net/manual/en/ref.bc.php#99130
function bcdechex($dec) {
    
$last bcmod($dec16);
    
$remain bcdiv(bcsub($dec$last), 16);

    if(
$remain == 0) {
        return 
dechex($last);
    } else {
        return 
bcdechex($remain).dechex($last);
    }
}

$num base58_decode('3HVMPwe1rr96QryQdZtZt1LWfcXnEFSG9rKiRuv8ewxwvUmZMH1zwn');

$num bcdiv($numbase58_decode('Xi4'));
$key bcadd(base58_decode('t'), $num);
echo 
base58_encode($num), "\n";
echo 
substr(bcdechex($num), 264), "\n";

(No warranty or anything on this code Wink)

If I paste the base58 output into the WIF field on Casascius' address utility, appending "?", it calculates the correct private address and adjusts the WIF to match the correct answer.  I'm not sure if this adjustment is because of a bug in my program, or if it's part of the checksum stuff.

The hex goes in fine, although I'll have to read about base58check to see why the substr is necessary.

I'm curious Ean, did you purposely camouflage this to look like base64, even the same length as the last one?  If so it seems to have been effective! Smiley

1SCiN5kqkAbxxwesKMsH9GvyWnWP5YK2W | donations
Ean (OP)
Full Member
***
Offline Offline

Activity: 199
Merit: 100



View Profile
January 14, 2012, 12:35:59 AM
 #18

I'm curious Ean, did you purposely camouflage this to look like base64, even the same length as the last one?
Of course.

Quote from: Douglas Adams
The World Wide Web is the only thing I know of whose shortened form takes three times longer to say than what it's short for
MelMan2002
Sr. Member
****
Offline Offline

Activity: 461
Merit: 251



View Profile
January 14, 2012, 01:00:58 AM
 #19

I'm curious Ean, did you purposely camouflage this to look like base64, even the same length as the last one?
Of course.

Yes, very clever Ean - I enjoyed the challenge. Smiley  Thank you!

19F6veduCZcudwXuWoVosjmzziQz4EhBPS
xzion
Member
**
Offline Offline

Activity: 96
Merit: 10


View Profile
January 14, 2012, 01:43:47 AM
 #20

wasn't using the correct order of operations. doh!

Tips: 1xzionJBueq1AkPSmexA7suWkztAkNwSs
Pages: [1] 2 »  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!