A method for authenticating by a network server a communication apparatus, the communication apparatus comprising a tamper resistant area adapted to memorize a first secret, the first secret being a first hardware diversification key or a master key used to derive a first hardware diversification key, F_HWDK, the network server being configured to communicate with the communication apparatus (10 0) through a wireless network and to read at least one data element memorized in a secure distributed ledger, the method comprising the steps of: - receiving from the communication apparatus a request message comprising a subscriber identifier; - providing, by consulting a database accessible by the network server, a device identifier associated to the received subscriber identifier allowing to identify the communication apparatus; - identifying the manufacturer (132, 133) of the electronic circuit of the communication apparatus using the unique device identifier in order to ease the access to a second hardware diversification key, S_HWDK, memorized in the secured distributed ledger; - - identifying in the secure distributed ledger, using the device identifier, a record published by the manufacturer (132, 133) of at least a portion of the communication apparatus, said record comprising a second secret attributed to the identified communication apparatus, the second secret being a second diversification key or a master key used to derive the second hardware diversification key, S_HWDK; - generating a challenge message comprising a random number RAND and sending it to the communication apparatus for it to generate a first result F_HWRES derived from the first secret and the random number RAND; - receiving from the communication apparatus a response message comprising the first result F_HWRES, the communication apparatus being authenticated by the network server if the first result F_HWRES is equal to a second result S_HWRES derived by the network server from the second secret and the random number RAND, which demonstrates that the first secret is equal to the second secret. - receiving from the communication apparatus a request message comprising a subscriber identifier; - providing, by consulting a database accessible by the network server, a device identifier associated to the received subscriber identifier allowing to identify the communication apparatus; - identifying the manufacturer (132, 133) of the electronic circuit of the communication apparatus using the unique device identifier in order to ease the access to a second hardware diversification key, S_HWDK, memorized in the secured distributed ledger; - - identifying in the secure distributed ledger, using the device identifier, a record published by the manufacturer (132, 133) of at least a portion of the communication apparatus, said record comprising a second secret attributed to the identified communication apparatus, the second secret being a second diversification key or a master key used to derive the second hardware diversification key, S_HWDK; - generating a challenge message comprising a random number RAND and sending it to the communication apparatus for it to generate a first result F_HWRES derived from the first secret and the random number RAND; - receiving from the communication apparatus a response message comprising the first result F_HWRES, the communication apparatus being authenticated by the network server if the first result F_HWRES is equal to a second result S_HWRES derived by the network server from the second secret and the random number RAND, which demonstrates that the first secret is equal to the second secret.