Skip to content

kezniklm/Eratosthenes-Sieve-and-Message-Decoder

Repository files navigation

C Language Course - IJC Project 1

Implementation of Eratosthenes Sieve and Message Decoder from PPM Image File

Evaluation: 15/15 points

Assignment

Assignment link

Eratosthenes Sieve

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.

Features

  • Prints last prime numbers up to a given limit using the Eratosthenes Sieve algorithm.
  • Efficiently marks and filters out multiples of primes.

Message Decoder from PPM Image File

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.

Features

  • 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.

Compilation

To compile the program, use the following command:

$ make

Usage - Eratosthenes Sieve

To run the program that is using MACROS:

$ ./primes

To run the program that is using inline functions:

$ ./primes-i

Usage - Message Decoder from PPM Image File

$ ./steg-decode <image_file>

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published