# A code based group signature scheme

Implementation of the scheme as proposed in:
> [EZERMAN, M. F., LEE, H. T., LING, S., NGUYEN, K., WANG, H. A Provably Secure Group Signature Scheme from Code-Based Assumptions. IACR Cryptology ePrint Archive. 2015.](https://eprint.iacr.org/2015/479.pdf)

Original implementation was received from Dr. Ezerman and Dr. Lee. The received implementation was subjected to minor changes to allow for time and space measurements of selected operations and parameters. Modified implementation is therefore attached.

## Prerequisites
Implementation is made in the C++ programming language.
It requires the following compiler and libraries to be installed:
```
sudo apt-get install g++
sudo apt-get install libgmp-dev
sudo apt-get install libntl-dev
sudo apt-get install libmpc-dev
```
## Compilation
Run the following command to create a ```test``` executable:
```
g++ code_GS.cpp -o test -lntl -lgmp
```
## Running the scheme
Finally run the executable with the following command, where the first parameter is the member ID that is used for the signature that will be opened and second one gives a random seed.
```
./test 38 10        
```
### Changing the group size and message
Group signature parameters are defined as constants in the ```code_GSS.cpp``` file.
```
#define log_NGU 16      // should be less than 31
#define NGU 65536       // (number of group user) = 2^(log_NGU)
#define k_1 1680        // random part = k_E - log_NGU, in this instance k_1 = 1696 - (log_NGU)
```
Some constants for easily changing group sizes:
| log_NGU | NGU      | k_1  |
|---------|----------|------|
| 2       | 4        | 1694 |
| 6       | 64       | 1690 |
| 7       | 128      | 1689 |
| 8       | 256      | 1688 |
| 10      | 1024     | 1686 |
| 12      | 4096     | 1684 |
| 14      | 16384    | 1682 |
| 16      | 65536    | 1680 |
| 18      | 262144   | 1678 |
| 20      | 1048576  | 1676 |
| 22      | 4194304  | 1674 |
| 24      | 16777216 | 1672 |

To sign a different message, simply input the message in the attached ```msg.txt``` file.

---
### Authors of the original implementation:
Ezerman, F. et al.

---
### README, modifications:
Hluckova, P.
