Skip to content

Commit

Permalink
Fix bug on decryption
Browse files Browse the repository at this point in the history
  • Loading branch information
rubiogarcia465179 committed Jan 31, 2025
1 parent aec61df commit d746098
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -273,8 +273,6 @@ LD_LIBRARY_PATH=/home/TLS-GF2X /home/TLS-GF2X/apps/openssl s_client -connect 127

## To-Do List

1. ~~**Figure out how to link the files having entropic encryption** -- `providers/implementations/ciphers/cipher_chacha20_poly1305_hw.c` -- To the openSSL build process. Not sure if this is to be done in a individual makefile that needs to be created, in ``providers\implementations\ciphers\build.info``, or `Makefile.in`. **We need to figure out this before continuing testing**
2. ~~**Verify `gf2x` Installation**: Test the build in a Docker container (e.g., Mehmet’s setup) to confirm `gf2x` is correctly installed and linked. Verify that all the code integrated into `providers/implementations/ciphers/cipher_chacha20_poly1305_hw.c` is valid. That means, function declaration, headers, includes, etc. To make things easier, all function declarations can be added directly into `providers/implementations/ciphers/cipher_chacha20_poly1305_hw.c`. If I remember well, is not the most clean approach, but can be done!
3. **Check behavior**: Test that encryption actually does something. So far, entropic_encryption function generates a segfault error.
4. **Add decryption**: Add decryption function. Check that output is the same as input.
5. **Hybrid symmetric encryption**: If desired, we can integrate first chachapoly encryption, then over the chachapoly encrypted test, perform entropic encryption. For decrypting, inverse process.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1478,7 +1478,8 @@ void entropic_decryption(const unsigned char *in, unsigned char *out, size_t len
}
printf("\nInisde entropic decryption 7 - Before reduction\n");
// Reduce the multiplication result
reduction(2, mult_result, final_key, lenR_64, lenR, lenM / 2, lenM_64);
// reduction(2, mult_result, final_key, lenR_64, lenR, lenM / 2, lenM_64);
reduction(2, mult_result, final_key, lenR_64, lenR, lenM, lenM_64);
free(mult_result);
mult_result = NULL;

Expand Down

0 comments on commit d746098

Please sign in to comment.