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

[psp] Add support for the PSP Security Protocol #4678

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

eyalitki
Copy link

Checklist:

  • [V] If you are new to Scapy: I have checked CONTRIBUTING.md (esp. section submitting-pull-requests)
  • [V] I squashed commits belonging together
  • [V] I added unit tests or explained why they are not relevant
  • [V] I executed the regression tests (using cd test && ./run_tests or tox)

Description:

PSP stands for PSP Security Protocol, and is a lightweight IPSec-Like implementation that was released by Google and is getting traction within data centers.

This commit adds support for versions 0 & 1 of the protocol which use AES-GCM in 128 and 265 bits. Support was tested against the testing tool of the RFC which is quite cumbersome. Example test vector is found in the usage instructions in the code itself.

The field names are taken from the LUA dissector for Wireshark as was provided by the RFC's GitHub repository.

@gpotter2
Copy link
Member

Hi & thanks for the PR !

Could you:

  • move this layer to contrib/ ? The general rule is to put layers that you'd find on any network in layers/, and more specialised ones in contrib
  • add some unit tests? You'll find many examples in test/, it can be as easy as building and dissecting a few packets, and testing some fields.

Thanks !

PSP stands for PSP Security Protocol, and is a lightweight
IPSec-Like implementation that was released by Google and
is getting traction within data centers.

This commit adds support for versions 0 & 1 of the protocol
which use AES-GCM in 128 and 265 bits. Support was tested
against the testing tool of the RFC which generated the
same PCAPs that are now used for unit testing.

Signed-off-by: Eyal Itkin <eyal.itkin@gmail.com>
@eyalitki
Copy link
Author

Ack, made the changes as suggested. The unit tests include:

  • Basic field checks
  • The scenario from the usage example
  • 3 main scenarios from the RFC testing tool itself - the .pcap files are auto-generated as "test vectors" by the RFC tool

This way, the unit tests ensure that Scapy complies with the RFC as part of its regression

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