2

The findProgramAddress method iteratively searches for an off-curve point for a given combination of program address and seeds. Whenever the user-supplied combination of program address and seeds results in an on-curve point, the algorithm decrements a bump seed, starting from 255, and tries again.

Does anyone know of a combination of program address and seeds that would cause this algorithm to fail to find an off-curve point (ie. run the bump seed all the way down to zero and give up)?

1
  • 1
    You can probably guess, I'm trying to write a test for this exact logic. Jul 27, 2023 at 23:17

1 Answer 1

2

The mechanism of finding off curve PDA with a decreasing bump is designed so that the probability of it reaching 0 without finding a proper key is almost never going to happen. And by using PDA, you can actually take the assumption it will always find an off curve key.

Combinations of such keys exist mathematically but not plausible in reality.

1
  • 1
    That sounds like a challenge. Jul 28, 2023 at 23:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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