Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add ipsec icv #4902

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

Open
ImanAfaneh293 wants to merge 2 commits into secdev:master
base: master
Choose a base branch
Loading
from ImanAfaneh293:add_ipsec_icv
Open

Conversation

@ImanAfaneh293
Copy link
Contributor

@ImanAfaneh293 ImanAfaneh293 commented Jan 28, 2026

Checklist:

  • If you are new to Scapy: I have checked CONTRIBUTING.md (esp. section submitting-pull-requests)
  • I squashed commits belonging together
  • I added unit tests or explained why they are not relevant
  • I executed the regression tests (using tox)
  • If the PR is still not finished, please create a Draft Pull Request

fixes #xxx

When icv_size is set to 8 or 12, the encrypted packet should contain a
truncated ICV of that length. Previously, the implementation always
defaulted to the full 16-byte ICV for AES-GCM, ignoring the configured
truncation.
This change ensures:
1. Encryption truncates the generated tag to the requested icv_size using
the Cipher API.
2. Decryption correctly verifies packets with truncated tags using the
 Cipher API.
Signed-off-by: Iman Afaneh <iafaneh@nvidia.com>
Signed-off-by: Iman Afaneh <iafaneh@nvidia.com>
Copy link

codecov bot commented Jan 28, 2026
edited
Loading

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.84%. Comparing base (f303033) to head (ec22ff5).

Additional details and impacted files
@@ Coverage Diff @@
## master #4902 +/- ##
=======================================
 Coverage 80.84% 80.84% 
=======================================
 Files 369 369 
 Lines 90968 90989 +21 
=======================================
+ Hits 73544 73563 +19 
- Misses 17424 17426 +2 
Files with missing lines Coverage Δ
scapy/layers/ipsec.py 90.39% <100.00%> (+0.39%) ⬆️

... and 5 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /