Skip to content

Incorrect max handshake message payload size calculation #16

@Scratch-net

Description

@Scratch-net

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions