Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Wireshark Demo #314

Closed
wants to merge 2 commits into from
Closed

Update Wireshark Demo #314

wants to merge 2 commits into from

Conversation

Hayyaaf
Copy link

@Hayyaaf Hayyaaf commented Nov 11, 2024

Summary

This update enhances the Wireshark demo in the oqs-demos repository by integrating OpenSSL 3 with the OQS provider for quantum-safe cryptography support. Key improvements include:

  • Updated Dockerfile:

    • Builds Wireshark 4.4.1 (latest version) with OpenSSL 3 with the OQS provider.
    • Consolidates the entire build process within the Dockerfile, simplifying configuration and maintenance.
  • Automated Header Generation:

    • Added generate_qsc_header.py, a Python script that automates the generation of qsc.h, defining post-quantum cryptographic algorithms for Wireshark.
    • The script fetches algorithm definitions from the ALGORITHMS.md file in the OQS provider repository to ensure support for the latest algorithms.
  • Project Cleanup and Expanded Documentation:

    • Expanded README.md with comprehensive setup instructions, configuration options, and cross-platform usage guidelines.
    • Removed outdated files (USAGE.md, build.sh, and wolfssl-qsc.h) to streamline the project structure.

Cross-Platform Notes:

Guidance for Linux and macOS display setup was drawn from documentation. Further testing on these platforms is recommended to ensure full functionality and compatibility.

Testing Summary

The updated Wireshark demo has been verified on Windows 11 with Docker 4.35.1 (latest version). Testing confirmed a successful build and functionality of Wireshark with post-quantum cryptography support.

Test Screenshots

The following screenshots show the successful integration of post-quantum cryptography in Wireshark. The tests capture traffic using the Kyber1024 and Frodo640aes algorithms.

Screenshot (5)
Screenshot (3)

@Hayyaaf
Copy link
Author

Hayyaaf commented Nov 11, 2024

Current image size is around 900 MB, and I'm aiming to reduce it further. Would you recommend stripping debug symbols, or are there other techniques you’d suggest? Any advice would be appreciated.

@@ -0,0 +1,86 @@
import os
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yikes -- this is complicated. Is there no other way to generate a suitable qsc,h file? E.g. by configuring oqs-provider in the intermediate image and throwing all else away?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yikes -- this is complicated. Is there no other way to generate a suitable qsc,h file? E.g. by configuring oqs-provider in the intermediate image and throwing all else away?

I wasn’t aware of this method, so I initially tried parsing the algorithms.md file from oqs-provider, which was difficult. Could you share more on setting up an intermediate Docker image to generate and isolate the qsc.h file?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have to apologize: I mistook "qsc.h" for "oqs.h". Indeed, recreating the contents of the old "qsc.h" would need to be done by way of a jinja2 script (and then running it in a checked-out version of oqsprovider in the intermediate image). But that also requires additional code --- and in that case, your solution above is just an alternative approach and I'd be fine with it if/for as long as it works: It's fragile in the face of possible future changes to the file ALGORITHMS.md, though.

Copy link
Author

@Hayyaaf Hayyaaf Nov 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that the current solution lacks robustness; I'll work on a more sustainable approach, as you suggested.

@baentsch
Copy link
Member

Current image size is around 900 MB, and I'm aiming to reduce it further. Would you recommend stripping debug symbols, or are there other techniques you’d suggest? Any advice would be appreciated.

Well, what elements are largest? The chose baseline image (ubuntu) isn't exactly small to begin with. Any chance to use alpine?

@Hayyaaf
Copy link
Author

Hayyaaf commented Nov 12, 2024

Well, what elements are largest? The chose baseline image (ubuntu) isn't exactly small to begin with. Any chance to use alpine?

I initially started with Alpine to keep the image small, but ran into numerous issues with Wireshark and its complex dependencies, which made it the largest component. That’s why I switched to Ubuntu. However, I’ll give Alpine another shot after automating the generation of qsc.h as you suggested.

@Hayyaaf Hayyaaf marked this pull request as draft November 12, 2024 15:18
@Hayyaaf Hayyaaf marked this pull request as ready for review November 14, 2024 02:17
- Upgrade Ubuntu to version 24.04.
- Upgrade Wireshark to version 4.4.1.
- Integrate OpenSSL 3 with liboqs and the OQS provider.
- Automate the generation of `qsc.h` using `generate_qsc_header.py`.
- Organize the build with dedicated directories for sources, builds, and installations.
- Migrate from Qt5 to Qt6 for improved compatibility.
- Update `README.md` and remove `USAGE.md`.

Signed-off-by: Khalid <[email protected]>

Update README

Signed-off-by: Khalid <[email protected]>

Refactor qsc.h generation using Jinja2 template

Signed-off-by: Khalid <[email protected]>
@Hayyaaf Hayyaaf marked this pull request as draft November 14, 2024 09:05
@Hayyaaf
Copy link
Author

Hayyaaf commented Nov 14, 2024

I apologize for the mistake. I unintentionally pushed a commit to the main branch of my fork, and although I have removed it and force-pushed, the commit still appears in this pull request. I will close this pull request and open a new one with the correct changes. I appreciate your understanding.

@Hayyaaf Hayyaaf closed this Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants