## Introduction
Someone decided to hide a picture from prying eyes and encrypted it! Restore the original image, help to return the painting to the public.
The purpose of this challenge is to recover the original picture, and that's a CTF challenge - the first one to do so is the winner!
## Challenge info
1. **Challenge type**: this challenge is a **Capture the flag** challenge - the winner will be the first participant to upload the correct answer.
2. **Encryption scheme**: CKKS.
3. **Supported libraries**: [OpenFHE](https://github.com/openfheorg/openfhe-development)
4. **Input**: [data.zip](https://github.com/fairmath/zkhack-image-challenge)
* 12 parts, encrypted separately via **OpenFHE** library and **CKKS** scheme
* crypto context
* public key
5. **Output**: the image, presented as an array of 3072 elements.
## Timeline
- **June 04, 2024** - start date.
- **June 11, 2024** - submission deadline.
- **June 26, 2024** - prize awarded.
## Parameters of the input
The original picture is a **32×32** color image in the RGB format. It's represented as an array of length **3072**, where the first **1024** integers correspond to the red component, followed by the green values, and the last **1024** are blue. The attacker split that array into 12 equal parts and encrypted each of them separately using the **OpenFHE** library and the **CKKS** scheme.
You can find the **encrypted pieces** of the image, crypto context and public key in [data.zip](https://github.com/fairmath/zkhack-image-challenge).
## Requirements of the output
Please pack the image as a `json` containing that **3072**-elements array `data`:
```json
{
"data": [1,2,3,4,5,...]
}
```
The picture is a **32×32** color image in the RGB format, represented as an array of length **3072**, where the first **1024** integers correspond to the red component, followed by the green values, and the last **1024** are blue.
## Resources
* [FHERMA participation guide](https://fherma.io/how_it_works)—more about FHERMA challenges.
* [OpenFHE](https://github.com/openfheorg/openfhe-development) repository, README, and installation guide.
* [OpenFHE Python](https://github.com/openfheorg/openfhe-python) repository, README, and installation guide.
* A vast collection of resources collected by [FHE.org](http://FHE.org) https://fhe.org/resources, including tutorials and walk-throughs, use-cases and demos.
* [OpenFHE AAAI 2024 Tutorial](https://openfheorg.github.io/aaai-2024-lab-materials/)—Fully Homomorphic Encryption for Privacy-Preserving Machine Learning Using the OpenFHE Library.
## Help
If you have any questions, you can:
* Contact us by email: support@fherma.io
* Join our [Discord](https://discord.gg/NfhXwyr9M5) server, and ask your questions in the [#fherma channel](https://discord.com/channels/1163764915803279360/1167875954392187030).
* Use [OpenFHE Discourse](https://openfhe.discourse.group) for OpenFHE related issues.