Patent ID: 10387054

Abstract:
A secure element and method for backup of data stored in a non-volatile memory of the secure element. The method for backup of data includes de-fragmenting an area of the non-volatile memory so as to form, in the area, an occupied region and a free region. The method further includes compressing the portion of data contained in the occupied region, after de-fragmentation, and compressing the contents of the free region using a compression algorithm that is different from the one used for compressing the portion of data contained in the occupied region. In one embodiment, the occupied region is compressed using a dictionary, and the free region is compressed by applying run-length encoding (RLE). The method also includes generating a backup image containing the compressed portion of data and the compressed contents of the free region, and writing the backup image into the nonvolatile memory. The area may contain objects to be handled by a program coded in an object language. Metadata for each area may also be generated and stored in the nonvolatile memory. A method of restoring data, including configuring the secure element in a busy mode to avoid corruption of the contents, and a method for resetting the secure element, are also disclosed.