Computer-implemented method for controlling access of a user to a security system, wherein the user is assigned an electronically readable identification document containing an electronic identification of the user, wherein the security system comprises a control unit, the method having the steps of: - receiving a permission request for access of the user to the security system, wherein the permission request is received by the control unit; - upon receipt of the permission request, verifying, by the control unit, whether a first trust anchor (GBVA.1) is present in a protected first memory of the control unit, and whether a second trust anchor (GBVA.2) is present in a protected second memory of the identification document; - in the case that the first and the second trust anchor are present in the memories when the permission request is received, using the stored first trust anchor and the second trust anchor (GBVA.2) for mutual authentication of the control unit and the identification document; - in the case of the successful mutual authentication of the identification document and the control unit, transmitting the electronic identification of the user stored in the identification document to an authorisation server by the control unit; - in the case that the first trust anchor is not present in the first memory and/or the second trust anchor is not present in the second memory, prompting an authentication server by the control unit to generate the first trust anchor and to transmit it to the control unit and to generate the second trust anchor and to transmit it to the identification document; storing the transmitted first trust anchor by the control unit in the first memory and storing the transmitted second trust anchor by the identification document in the second memory; and transmitting the electronic identification of the user stored in the identification document to the authorisation server, wherein the transmission is effected or enabled by the authentication server; - granting or denying the access of the user to the security system by the authorisation server depending on the transmitted (422, 423) electronic identification, - wherein the verification, generation and transmission of the first and second trust anchor are performed fully automatically, without waiting for a user input. - receiving a permission request for access of the user to the security system, wherein the permission request is received by the control unit; - upon receipt of the permission request, verifying, by the control unit, whether a first trust anchor (GBVA.1) is present in a protected first memory of the control unit, and whether a second trust anchor (GBVA.2) is present in a protected second memory of the identification document; - in the case that the first and the second trust anchor are present in the memories when the permission request is received, using the stored first trust anchor and the second trust anchor (GBVA.2) for mutual authentication of the control unit and the identification document; - in the case of the successful mutual authentication of the identification document and the control unit, transmitting the electronic identification of the user stored in the identification document to an authorisation server by the control unit; - in the case that the first trust anchor is not present in the first memory and/or the second trust anchor is not present in the second memory, prompting an authentication server by the control unit to generate the first trust anchor and to transmit it to the control unit and to generate the second trust anchor and to transmit it to the identification document; storing the transmitted first trust anchor by the control unit in the first memory and storing the transmitted second trust anchor by the identification document in the second memory; and transmitting the electronic identification of the user stored in the identification document to the authorisation server, wherein the transmission is effected or enabled by the authentication server; - granting or denying the access of the user to the security system by the authorisation server depending on the transmitted (422, 423) electronic identification, - wherein the verification, generation and transmission of the first and second trust anchor are performed fully automatically, without waiting for a user input.