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

pel.c incorrect bit shift for storing send/recv packet counters #7

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

Conversation

Aznable111
Copy link

Not a major issue for usability but caused confusion when debugging using this AES implementation elsewhere.

Fixed the packet counter for HMAC-SHA1 validation to where storing each byte of the send and receive packet counters correctly do a right shift to store the most significant values into the greater positions of the array. This prevents the packet counter from looping after reaching the 256th packet.

@creaktive
Copy link
Owner

Thanks for fix @Aznable111!
Yeah, consistency with other AES implementations is great. Anyways, I was wondering, what would happen when the fixed version of tsh client tries to connect to an older version of tsh server? Or vice-versa. I suspect it would work seamlessly, since the current behavior of looping after reaching the 256th packet is not known to cause any issue.
But just wanted to check with you before merging.

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