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

Incorrect max handshake message payload size calculation #16

Open
Scratch-net opened this issue Jul 22, 2017 · 0 comments
Open

Incorrect max handshake message payload size calculation #16

Scratch-net opened this issue Jul 22, 2017 · 0 comments

Comments

@Scratch-net
Copy link

Scratch-net commented Jul 22, 2017

As stated in spec,

A Noise handshake message is also less than or equal to 65535 bytes.

It includes plain & encrypted public keys as well as authentication tag, provided by AEAD cipher.

So, this code

	if len(payload) > MaxMsgLen {
		panic("noise: message is too long")
	}

is incorrect. MaxMsgLen depends on DHLen & token/pattern

@Scratch-net Scratch-net changed the title Incorrect max handshake message size calculation Incorrect max handshake message payload size calculation Jul 22, 2017
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

No branches or pull requests

1 participant