A computer-implemented method for a random-based leader election in a distributed network of data processing devices, said distributed network comprising a plurality of identified asynchronous processes, wherein all said identified processes or a subset thereof are running processes participating in the leader election, said method comprising the following steps: a) a random information (r) is generated by each running process and shared with the other running processes, so that each running process maintains a set of said random information (r), b) a distributed random information is calculated by each running process from the set of random information (r) by applying a first shared transformation function (f 1), so that the same distributed random information is made available to each running process, c) a designator of a single one of said running processes is calculated from the distributed random information by means of a second shared transformation function (f 2), d) a leader is elected among said running processes based on said designator, wherein each running process maintains a sorted set of all running processes and the total number (k) of running processes, characterized in that - the first shared transformation function is R = ∏ i = 1 n r i mod o, wherein R is the distributed random information, r i is the random information, mod designates the modulo operation, and o is a Mersenne prime defined as o = 2 n -1. - the second shared transformation function (f 2) is defined as m = R mod k or m = R mod k + 1, wherein m is the designator of the elected leader, R is the distributed random information, k is the total number of running processes, and mod designates the modulo operation, wherein the leader is elected by selecting the running process that corresponds to the m th element in said sorted set of running processes. a) a random information (r) is generated by each running process and shared with the other running processes, so that each running process maintains a set of said random information (r), b) a distributed random information is calculated by each running process from the set of random information (r) by applying a first shared transformation function (f 1), so that the same distributed random information is made available to each running process, c) a designator of a single one of said running processes is calculated from the distributed random information by means of a second shared transformation function (f 2), d) a leader is elected among said running processes based on said designator, wherein each running process maintains a sorted set of all running processes and the total number (k) of running processes, characterized in that - the first shared transformation function is R = ∏ i = 1 n r i mod o, wherein R is the distributed random information, r i is the random information, mod designates the modulo operation, and o is a Mersenne prime defined as o = 2 n -1. - the second shared transformation function (f 2) is defined as m = R mod k or m = R mod k + 1, wherein m is the designator of the elected leader, R is the distributed random information, k is the total number of running processes, and mod designates the modulo operation, wherein the leader is elected by selecting the running process that corresponds to the m th element in said sorted set of running processes. wherein each running process maintains a sorted set of all running processes and the total number (k) of running processes, characterized in that - the first shared transformation function is R = ∏ i = 1 n r i mod o, wherein R is the distributed random information, r i is the random information, mod designates the modulo operation, and o is a Mersenne prime defined as o = 2 n -1. - the second shared transformation function (f 2) is defined as m = R mod k or m = R mod k + 1, wherein m is the designator of the elected leader, R is the distributed random information, k is the total number of running processes, and mod designates the modulo operation, - the first shared transformation function is R = ∏ i = 1 n r i mod o, wherein R is the distributed random information, r i is the random information, mod designates the modulo operation, and o is a Mersenne prime defined as o = 2 n -1. R is the distributed random information, r i is the random information, mod designates the modulo operation, and o is a Mersenne prime defined as o = 2 n -1. - the second shared transformation function (f 2) is defined as m = R mod k or m = R mod k + 1, wherein m is the designator of the elected leader, R is the distributed random information, k is the total number of running processes, and mod designates the modulo operation, m is the designator of the elected leader, R is the distributed random information, k is the total number of running processes, and mod designates the modulo operation, wherein the leader is elected by selecting the running process that corresponds to the m th element in said sorted set of running processes.