-
Notifications
You must be signed in to change notification settings - Fork 873
Add support for HMAC based on sha256 (128b keys). #669
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
base: master
Are you sure you want to change the base?
Conversation
Also extract duplicated code into local function. Sponsored by: Digital Fingerprints.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good changes, but it needs some test cases to exercise sha256.
Even if you haven't got any ESP packets, at least, you can instantiate the hash and it can fail to authenticate the packets in question.
And please, rebase on top of the-tcpdump-group:master. |
In addition to the previous comment, which still stands (merging from 3 years ago is not rebasing), you might want to read the file |
Thank you very much for all your comments and I am very sorry for breaking contributors' rules. From what I see now, after 3+ years, this patch was wrong from the very beginning and here is my explanation why I think so. The original patch was kind-of quick and therefore dirty hack to allow IPSEC debugging under certain configuration. Particularly, to make sure the encryption works as expected and data is correctly encrypted/decrypted. In my humble opinion, the pull request should have been splitted into at least two smaller ones:
While the first one is rather obvious, the second one is tricky as the whole function relies on Summing up, my original intention was to enable ESP decryption for different ENC+AUTH scenario, but from my current perspective this pull request should be closed and I should create another one only to implement |
Thank you for the detailed comment. If you think it would make more sense to split the change into two commits, split it. If the first commit is useful on its own, it can be merged on its own. Would you like to take more time to state the decryption problem properly? |
+1 for this (and keeping the issue open) |
Add support for HMAC based on SHA256 with 128 bits keys.
It can be used in the following form:
./tcpdump -nr ~/ipsec_dump.pcap -s0 -E "[email protected] aes256-cbc-hmac-sha256-128:[KEY1],[email protected] aes256-cbc-hmac-sha256-128:[KEY2]"
Sponsored by: Digital Fingerprints