sum code for finding key, buggy for now because ciphertext getst mangled somehow