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

lib.ipsec: optimization, standard compliance and fix a packet leak #1381

Merged
merged 14 commits into from
Sep 13, 2018

Conversation

eugeneia
Copy link
Member

  • improved ESP performance by avoiding lib.protocol.header on the fast path (531170a), and an improved padding function (796c177)
  • use full 16-byte ICV as opposed to 12-byte ICV (43d498a), use standard AEAD identifier
  • fix a packet leak in ESP resynchronization (5b86f94)

eugeneia added 14 commits April 10, 2018 19:49
...for transport mode when run without an explicit mode.
 * add a note that explains performance differences between esp transport and
   tunnel modes

 * explicitly return a single value from `decap' in tunnel mode (because of
   that thing where LuaJIT can trip over this)

...these changes are mostly notes to prevent future selfs from wondering about
this again.
This avoids the potentially significant overhead of the lib.protocol.header
abstractions during ESP encapsulation by using raw FFI casts instead.
Support the one mandatory ICV length, RFC4106 says:

  Implementations MUST support a full-length 16-octet ICV, and MAY support
  8 or 12 octet ICVs, and MUST NOT support other ICV lengths.

Also use the chance to use standard AEAD indentifers to denote the supported
AEAD, as per ietf-ipsec@2018-01-08.yang schema.
Saves some cycles during encapsulation by specializing the padding function for
power of two alignments.
@eugeneia eugeneia merged commit 5b86f94 into snabbco:ipsec Sep 13, 2018
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