Authorities entitled to check identification may not use serial numbers, blocking codes or blocking attributes in such a way that they can be used to enable the automated retrieval of personal data or to establish connections between data files. In derogation from the first sentence, the following may use serial numbers for the following purposes:
1. identity card authorities in order to retrieve personal data from their databases, and
2. federal and state police authorities and offices, state tax investigation units and the agencies of the customs investigation service in order to retrieve the serial numbers of identity cards which have been lost or declared invalid or which are suspected of being used by unauthorized persons.