A method for providing a random element for a cryptographic algorithm, the method being implemented by an electronic calculator comprising a core and a set of memories, the set of memories including a reference memory having intrinsic randomness in a predefined state of generating random elements, the method comprising:
- an initialization phase of initializing a physical unclonable function;
- and
- a use phase of using the physical unclonable function,
- wherein the initialization phase comprises:
- reading a reference message in a first memory zone, the first memory zone being included in the reference memory of the set of memories, the reading step being performed in a predefined state of generating random elements of the reference memory, wherein the reference memory is a volatile memory or a non-volatile memory, wherein when the reference memory is the non-volatile memory, the predefined state of generating random elements is an initial blank state of said memory, and when the reference memory is the volatile memory, the predefined state of generating random elements is a state at a switching on of the reference memory;
- and
- writing the reference message in a second memory zone, distinct from the first memory zone, the second memory zone being included in the set of memories;
- and
- the use phase comprises subsequent reading of the reference message in the second memory zone, the reference message read in the second memory zone forming the random element for the cryptographic algorithm.