Evaluation: 15/15 points
The Eratosthenes Sieve algorithm is an ancient Greek method for finding all prime numbers up to a given limit. It works by iteratively marking the multiples of each prime number, starting from 2, as composite (not prime). The algorithm stops when the square of the current prime exceeds the given limit. The remaining unmarked numbers are prime.
- Prints last prime numbers up to a given limit using the Eratosthenes Sieve algorithm.
- Efficiently marks and filters out multiples of primes.
The program utilizes the Eratosthenes Sieve algorithm to determine the selected bytes for encoding the message. Starting from the prime number 29, the program identifies prime numbers and assigns corresponding bytes for message embedding.
- Steganography technique using prime numbers for message encoding.
- Efficient utilization of LSBs in selected bytes representing color channels.
- Decoding terminates upon reaching the '\0' character.
To compile the program, use the following command:
$ make
To run the program that is using MACROS:
$ ./primes
To run the program that is using inline functions:
$ ./primes-i
$ ./steg-decode <image_file>