Search distance from ciphertext instead of descending distance from plaintext