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

fix FFDHE key exchange in TLS 1.3 #274

Merged
merged 1 commit into from
Jun 19, 2018
Merged

fix FFDHE key exchange in TLS 1.3 #274

merged 1 commit into from
Jun 19, 2018

Conversation

tomato42
Copy link
Member

@tomato42 tomato42 commented Jun 18, 2018

in TLS 1.3 the FFDH key share must be the size of the
prime while it could have been padded or had the zero
bytes truncated in TLS 1.2 and earlier

that means it needs to be passed as a bytearray to key
exchange handling methods while the it was passed as an
integer previously

make the funcion handle both inputs and verify the size
of the share in case of TLS 1.3-like call


This change is Reviewable

@tomato42 tomato42 added the bug unintented behaviour in tlslite-ng code label Jun 18, 2018
@tomato42 tomato42 added this to the v0.8.0 milestone Jun 18, 2018
@tomato42 tomato42 self-assigned this Jun 18, 2018
@tomato42 tomato42 added this to To do in TLS 1.3 support via automation Jun 18, 2018
@tomato42 tomato42 moved this from To do to In progress in TLS 1.3 support Jun 18, 2018
@Jakuje Jakuje self-requested a review June 19, 2018 08:12
Copy link
Collaborator

@Jakuje Jakuje left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: the commit message says "while the it was passed as an integer previously". I assume the "the" should have said "then". Otherwise it looks good for me.

in TLS 1.3 the FFDH key share must be the size of the
prime (it must be left-padded with zeros), while it
could have been padded or had the zero bytes
truncated in TLS 1.2 and earlier

that means it needs to be passed as a bytearray to key
exchange handling methods while it was passed as an
integer previously

make the function handle both inputs and verify the size
of the share in case of TLS 1.3-like call
@tomato42
Copy link
Member Author

@Jakuje commit message updated

@tomato42 tomato42 merged commit 0eb4399 into master Jun 19, 2018
TLS 1.3 support automation moved this from In progress to Done Jun 19, 2018
@tomato42
Copy link
Member Author

@Jakuje thanks for the review!

@tomato42 tomato42 deleted the tls_1.3_ffdhe branch June 19, 2018 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug unintented behaviour in tlslite-ng code
Projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants