Skip to content

Latest commit

 

History

History

sieveOfEratosthenes

Sieve of Eratosthenes

This benchmark prints all prime numbers less than a maximum integer using the Sieve of Eratosthenes algorithm. For example, given an open number Num = 20, the algorithm finds every prime in the range [2,Num] and prints a list containing all primes in the range, as well as a zero for each composite.

Unencrypted value: The input corresponding to the maximum integer is not encrypted.

Encrypted Values: All output values (primes or zeros) are encrypted. The cardinality of the set of primes is not disclosed. The latter is possible by either return the encrypted prime or the encryption of zero in the output set.

The source code of this benchmark is available both in C as well as CEAL (.sca) format. In CEAL, _o.sca denotes a program without privacy protections, while _s.sca denotes a privacy-preserving program.

CEAL Benchmark Evaluation

alt text