A method for securely providing a personalized electronic identity on a terminal , which identity is usable by a user for identification purposes when using an online service, wherein in a system with data-processing devices (9; 10; 11; 12) and a terminal assigned to a user , the method involves an identification application on the terminal and, furthermore, a personalization application and an identity provider application being executed, and wherein the method comprises the following in this case: - transmission of a request for relaying an identity attribute assigned to the user from the personalization application to the identity provider application; - transmission of the identity attribute from the identity provider application to the personalization application, once consent for transmission of the identity attribute by the identity provider application has been received from the user ; - generation of an asymmetric key pair with a public and a private key by the identification application on the terminal , in response to the receiving of a request for generation of the asymmetric key pair in the terminal from the personalization application; - transmission of the public key from the identification application on the terminal to the personalization application; - generation of an electronic certificate for the public key by the personalization application and storage of the electronic certificate to a first public key infrastructure of the personalization application in a data memory, furthermore comprising: - generation of a hash value for the identity attribute; and - recording of the hash value in the electronic certificate; - encryption of the identity attribute with the public key by the personalization application; - transmission the encrypted identity attribute and the electronic certificate from the personalization application to the identification application on the terminal ; and - decryption of the encrypted identity attribute with the private key and storage of the decrypted identity attribute and the electronic certificate as the personalized electronic identity of the user in a local memory device of the terminal . - transmission of a request for relaying an identity attribute assigned to the user from the personalization application to the identity provider application; - transmission of the identity attribute from the identity provider application to the personalization application, once consent for transmission of the identity attribute by the identity provider application has been received from the user ; - generation of an asymmetric key pair with a public and a private key by the identification application on the terminal , in response to the receiving of a request for generation of the asymmetric key pair in the terminal from the personalization application; - transmission of the public key from the identification application on the terminal to the personalization application; - generation of an electronic certificate for the public key by the personalization application and storage of the electronic certificate to a first public key infrastructure of the personalization application in a data memory, furthermore comprising: - generation of a hash value for the identity attribute; and - recording of the hash value in the electronic certificate; - generation of a hash value for the identity attribute; and - recording of the hash value in the electronic certificate; - encryption of the identity attribute with the public key by the personalization application; - transmission the encrypted identity attribute and the electronic certificate from the personalization application to the identification application on the terminal ; and - decryption of the encrypted identity attribute with the private key and storage of the decrypted identity attribute and the electronic certificate as the personalized electronic identity of the user in a local memory device of the terminal . <EOS>