The solution is interesting and may relate to this puzzle. Each image is converted to six bits of information, and this series of six bits are used as index into Base58 charset, "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz". To simplify it, each 6 bits are index how much is each letter away from the beginning of charset - the letter/number "1". This series of 6 bits converts to WIF encoded private key in this manner. If something like this applies to this puzzle also, we are looking for series of 6 bits which begin with 5 since all WIF encoded private keys begin with this number.
Heh, I solved that one. I was excited that it might apply to this one too but alas I've tried it and nothing. Compared to 1FLAMEN6, this was a cinch...
Here is my solution code:
import java.io.*;
public class Puzzle
{
static int perm = 0;
static char[][] pt = new char[720][];
static char b58[] = {
'1','2','3','4','5','6','7','8','9','A','B','C','D','E',
'F','G','H','J','K','L','M','N','P','Q','R','S','T','U',
'V','W','X','Y','Z','a','b','c','d','e','f','g','h','i',
'j','k','m','n','o','p','q','r','s','t','u','v','w','x',
'y','z','?','?','?','?','?','?'
};
static {
for (int i = 0; i< 720;i++) {
pt[i] = new char[6];
}
}
static void swap(char i[], int j, int k) {
char tmp = i[j];
i[j] = i[k];
i[k] = tmp;
}
static void permute(char[] i, int start, int end) {
int c;
if (start == end) {
pt[perm][0] = i[0];
pt[perm][1] = i[1];
pt[perm][2] = i[2];
pt[perm][3] = i[3];
pt[perm][4] = i[4];
pt[perm][5] = i[5];
perm++;
} else {
for (c = start; c <= end; c++) {
swap(i, start, c);
permute(i, start + 1, end);
swap(i, start, c);
}
}
}
public static void main(String args[]) throws Exception {
char[] lst = {'A','B','C','D','E','F'};
permute(lst, 0,5);
// Data file represents which vertices inside the
// 6 point hexagon are used on each character of
// the key. Labels A,B,C,D,E,F.
File f = new File("data");
FileInputStream fis = new FileInputStream(f);
InputStreamReader ir = new InputStreamReader(fis);
BufferedReader br = new BufferedReader(ir);
String[] key = new String[51];
// Slurp in vertices file
int c=0;
while (true) {
String l = br.readLine();
if (l == null) break;
key[c] = l; c=c+1;
}
// For every permutation of vertices
for (int p=0;p<720;p++) {
// Build candidate string
StringBuffer candidate = new StringBuffer();
for (int i=0;i<51;i++) {
String keychars = key[i];
// Translate into binary given perm p
int total = 0;
for (int j=0;j int rel = keychars.charAt(j) - 'A';
int v = pt[p][rel] - 'A';
// Tricky. Rotate position of bits on each frame!
v=v-i; while (v < 0) v=v+6;
total += (int)Math.pow(2,v);
}
candidate.append(b58[total]);
}
String candidateStr = candidate.toString();
if ((candidateStr.startsWith("5H") ||
candidateStr.startsWith("5J") ||
candidateStr.startsWith("5K") ||
candidateStr.startsWith("5L")) && !candidateStr.contains("?"))
System.out.println(candidate.toString());
}
}
}
And this is the data file:
F
FC
CE
FAC
AC
AC
ABFD
FBC
FCD
E
FA
CED
BFEC
ABFED
FCD
BE
FC
EA
AC
ACDEF
DEF
BCDF
CF
ABE
BCEF
CDE
ACF
AD
BCD
ACDF
FB
BCE
AF
ACDE
CF
CFA
BDE
ABDEF
ACD
ABF
F
CD
CDEF
AB
ABCF
AE
ABEF
B
ACE
CD
ABCE