Skip to content

Simplify message ID generation and get rid of randNum #327

@wneessen

Description

@wneessen

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions