0

When trying to redeem a btcc chip I noticed a bad encoded mini private key. One of the character is "l". Anyway has seen this before? I guess these keys are also base58 normally? Thanks

  • Have you tried the digit 1, the uppercase i, and the lowercase L? – Pieter Wuille Dec 31 '16 at 11:15
  • Hi Pieter, I tried I and i (but aren't these excluded as it is base58?). – Bart DV Dec 31 '16 at 11:26
  • It's not a 1 neither... – Bart DV Dec 31 '16 at 11:26
  • Please remove the link; it contains enough of your private key to make brute-forcing it worthwile. – maservant Dec 31 '16 at 12:40
2

Solved: it appeared to be an "i" but the private key showed it as "l".

0

Not too hard to brute-force

static const char* base58 = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";
static void mini ( )
{
  char* x = "S6c56bnXQiBjk9mqSY*******NzrRy?";
  QByteArray xx ( x );
  char* n = xx.data ( );

  for ( int i0 ( 0 ); i0 < 58; i0++ ) { n [18] = base58 [i0];
    for ( int i1 ( 0 ); i1 < 58; i1++ ) { n [19] = base58 [i1];
      for ( int i2 ( 0 ); i2 < 58; i2++ ) { n [20] = base58 [i2];
        for ( int i3 ( 0 ); i3 < 58; i3++ ) { n [21] = base58 [i3];
          for ( int i4 ( 0 ); i4 < 58; i4++ ) { n [22] = base58 [i4];
            for ( int i5 ( 0 ); i5 < 58; i5++ ) { n [23] = base58 [i5];
              for ( int i6 ( 0 ); i6 < 58; i6++ ) { n [24] = base58 [i6];
                const MyKey32 sha ( MyKey32::sha256 ( xx ) );
                if ( sha.constData ( ) [0] == 0 )
                {
                  const QByteArray temp ( xx.constData ( ), 30 );
                  const MyKey32 priv ( MyKey32::sha256 ( temp ) );
                  _trace ( QString ( "%1 %2" )
                     .arg ( priv.toStringWif ( false ) )
                     .arg ( priv.getAddressHashClassic ( ).toString ( ) ) );
                }
              }}}}}}}
}
  • 1
    Might be but I'm not a coder and I don't understand your snippet. Anyway, it's just one character that isn't correct and I wonder how in earth this is possible. I will try to brute force manually :-) – Bart DV Dec 31 '16 at 13:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.