The rules for chess problems are given in the *Codex* here:
Codex of Chess Compositions
Look up the Article 16 for castlings and en passant.
Certainly there are problems with en passant key. But in these cases it can be proven that the last move was a double step of a pawn.