If the police suspect you have committed a crime they can ask for you details and you are required to give them your details.