What is the rule in cricket if the wicket keeper steps forward and catches a ball (ie before the bowl ends). (1) before it crosses the stump, (2) before it crosses the batsman?
This is covered by Law 40.3 Position of the wicket-keeper:
The wicket-keeper shall remain wholly behind the wicket at the striker’s end from the moment the ball comes into play until
(a) a ball delivered by the bowler,
either (i) touches the bat or person of the striker,
or (ii) passes the wicket at the striker’s end,
or (b) the striker attempts a run.
In the event of the wicket-keeper contravening this Law, the striker’s end umpire shall call and signal No ball as soon as applicable after the delivery of the ball.
Therefore both your cases would be a no ball, unless the batsman has played the ball (or it has hit their person).