Skip to content

Implement Aho-Corasick algorithm #227

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

Merged
merged 4 commits into from
Feb 8, 2025
Merged

Implement Aho-Corasick algorithm #227

merged 4 commits into from
Feb 8, 2025

Conversation

Waujito
Copy link
Owner

@Waujito Waujito commented Feb 2, 2025

This algorithm will be a successor of z-function in --sni-detection=brute.
Also it may speedup domain name matching in --sni-detection=parse

An idea behind this algorithm is usability of bruteforce mode for TLSv1.3 kyber. Before this PR it was implemented as z-function iterating over string n times, where n is amount of matching domains. This was leading to degraded performance, especially without connbytes. Aho-Corasick allows this to go in linear time. Time complexity improvements were requested in #220 and #213.

@Waujito Waujito merged commit 7ebaccf into main Feb 8, 2025
58 checks passed
@Waujito Waujito deleted the aho_corasick branch February 20, 2025 21:29
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.

1 participant