CPC G06F 16/137 (2019.01) [G06F 9/30029 (2013.01); H04L 9/0643 (2013.01)] | 13 Claims |
1. Method for calculating a modifier code of a file, implemented by at least one device, the file being mixed using a same mixing function, hashes being obtained using a same hashing function, the method comprising the following steps:
a) establishing a list of a plurality of possible modifier codes given the number of bits on which the plurality of possible modifier codes are generated;
b) establishing a list of a plurality of possible mixer numbers given the number of bits on which the plurality of possible mixer numbers are generated;
c) for each of the plurality of possible modifier codes:
i) creating a list of hashes of the file;
ii) for each the plurality of possible mixer numbers, calculating a hash of the file modified by the modifier code then mixed with the mixer number, the modification of the file being performed using a same modification function;
iii) adding each hash calculated in step ii) to the list of hashes of the file;
iv) counting a number of different elements N of the list of hashes of the file;
v) memorizing the number N, as well as the modifier code associated with the number N, if the number N is the first to be counted or is greater than the number N previously memorized; and
d) returning the modifier code last memorized.
|