For Visa it was 835ms for valid, 762ms for dummy, prefix and check digit appears to be checked client side.
Or more likely "someone will notice, eventually"
Also in infosec: what is old is new. We still find shitty comparison routines (timing attacks) and SQL injection... some day :)
If the rand function produces uniform random numbers, then with enough samples the signal comes out ontop the noise.
If it is non-uniform, then with enough samples you can determine the non uniformity, and you are at square 1 again.
Use proper security instead of obscurity.
And it's not a thing anyone has a legitimate interest in submitting more than that per second.
I.e. the padding to add is (5 - duration_of_operation) with duration of operation being far lower than 5 s.
What would be a proper first step to harden API for timing attacks?
An easy mitigation would be to just drop the card number into a queue and process asynchronously without waiting and returning to the user.
I used to work at a big bank in the US and the parent's description sounds exactly like how it would work.
Bonus, if they can't separate which exclusions were from legitimate requests and which came from this script, they can't just delete those entries from the database.
Of course, no one should do this...
I think they would probably just declare them all invalid, and roll back to yesterday.
There's some exceptions (tokens etc.), but not relevant to this use case.
The first 6 digits of a card number is called the BIN code. That leaves just 9 digits that have to be spammed.
The fact that BIN lists are publicly available is reducing the space significantly.
An expiration date will get you a bit farther, but you really need the CVV also.