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

Implement sequence tracking #420

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

Conversation

bodgit
Copy link
Contributor

@bodgit bodgit commented Dec 22, 2020

Based on the MIT Kerberos implementation. It tracks the 64 previously seen
sequence numbers for the purposes of out of order delivery and replay
protection.

Example usage:

var payload messages.EncAPRepPart
if err := payload.Unmarshal(b); err != nil {
        return err
}

ss := gssapi.NewSequenceState(payload.SequenceNumber, flags & gssapi.ContextFlagReplay != 0, flags & gssapi.ContextFlagSequence != 0, true)

...

var token gssapi.MICToken
if err := token.Unmarshal(b); err != nil {
        return err
}

if err := ss.Check(token.SndSeqNum); err != nil {
        return err
}

Fixes #419

Based on the MIT Kerberos implementation. It tracks the 64 previously seen
sequence numbers for the purposes of out of order delivery and replay
protection.

Fixes jcmturner#419
@jcmturner jcmturner force-pushed the sequence-tracking branch from 95c20ce to 82c657c Compare June 13, 2022 20:54
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.

Keeping track of sequence numbers
1 participant