You're missing the modulus operation. It's kind of hidden in a single line of code.
Whoops. Yeah, missed that first time around.
The more I play around with the XOR patterns and permutations of row order/orientations, the less I think that these words are meaningful. It's a fairly unlikely coincidence, I admit, for "is" "the" & "keyfile" to appear, but those aren't particularly long words, with "keyfile" being the only exception.
But, perhaps more important--why would they use the term "keyfile" (or "key file") at all? The result wouldn't be a file, it would be a private key. I don't see the puzzle creators using a phrase like "keyfile" when "privkey" or even "key" would suffice, especially when "keyfile" is technically innacurate.
Not to mention generating this phrase requires a series convoluted steps:
1. Arrange 6 out of 8 rows in a pattern that doesn't appear anywhere else in the painting (to be fair, it may be undiscovered, but the bishop/knight explanation breaks down, for me. It's almost certainly a queen rather than a bishop, and the knight's movement is precise in a way that doesn't reflect the jumping around necessary for this row order/orientation)
2. XOR with 011010,
but only after you skip the first bit entirely.
3. Cycle back to the beginning of the 6 rows and rinse/repeat.
What about the 011 pattern that tracks through all of the rows without deviation? Sure, it's possible to encode words and still have that pattern exist, but it's a hell of a lot harder, and--considering the route you have to take to generate the above phrase, seemingly unnecessary.
EDIT: actually, on the second thought and the second reading, my thinking entirely