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

Simplify message ID generation and get rid of randNum #327

Closed
wneessen opened this issue Oct 6, 2024 · 0 comments · Fixed by #329
Closed

Simplify message ID generation and get rid of randNum #327

wneessen opened this issue Oct 6, 2024 · 0 comments · Fixed by #329

Comments

@wneessen
Copy link
Owner

wneessen commented Oct 6, 2024

In release notes for the latest release I saw mention of randomness and changes to it and I went and checked where randNum is used and I was surprised that it is used only in SetMessageID. Even more I was surprised that it is used twice, to obtain two number and than additional 17 bytes random string is used as well. I really do not get why message IDs have to be so complicated?

<processID.randomNumberPrimary.randomNumberSecondary.randomString@hostname>

I mean, if you have 17 bytes of secure random string in there, there is really no need for extra non-secure two numbers at all. This is just adding characters without much benefit. And with 17 bytes of secure randomness I would even claim that there is no point in adding anything extra, it is not really feasible that two strings would happen to be the same, so process ID is also unnecessary.

My proposal would be to increase randomString length to 22 characters, this is around 128 bits of entropy then, and do not use anything else for message ID.

Originally posted by @mitar in #326

@wneessen wneessen changed the title Simply message ID generation and get rid of randNum Simplify message ID generation and get rid of randNum Oct 7, 2024
@wneessen wneessen linked a pull request Oct 7, 2024 that will close this issue
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 a pull request may close this issue.

1 participant