Is there a way to restart a program with EV3?
If I were you I'd use a loop inside the program. In this loop the prompt for entering the code would be displayed, then the user input would be read. Finally, the code would be checked and if correct, the proper action executed, otherwise a failure message would be shown and the execution would loop back to the start (display the prompt).