uuidgen possible problem with v3 uuids
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
util-linux (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Generating a version 3 uuid on Ubuntu appears to be producing inconsistent output compared to online checkers and versions of this tool compiled on different OSs. E.g.
On U18.04.5
uuidgen --namespace @dns --name 'foo' -m (version 3 using md5)
3f46ae03-
uuidgen --namespace @dns --name 'foo' -s (version 5 with sha1)
b84ed8ed-
On Gentoo,
uuidgen --namespace @dns --name 'foo' -m
3f46ae03-
uuidgen --namespace @dns --name 'foo' -s
b84ed8ed-
On raspbian
uuidgen --namespace @dns --name 'foo' -m
3f46ae03-
uuidgen --namespace @dns --name 'foo' -s
b84ed8ed-
Looking at this https:/
gave me pause to see if I could replicate this similar problem
On Ubuntu, using the python library I get
python -c "import uuid ; print(uuid.
3f46ae03-
The same result is returned on raspbian and Gentoo.
This makes me wonder if there's a problem with the uuidgen tool, as python is giving me consistent results on all three OS's and agrees with the uuidgen tool in Gentoo and Raspbian and also agrees with the output of this webtool
and this
Ubuntu is producing a different result.
We've not yet moved to U20 LTS due to block on the upgrade path - but I note that after downloading and testing the same on U20 20.04 TLS, the behaviour of uuidgen has changed
uuidgen --namespace @dns --name 'foo' -m c654-36b0- a55d-cd0aa042c9 f2
3f46ae03-
So clearly this has changed between the V 2.34 on U20 and V 2.31.1 on U18.
This is all rather unfortunately as these are supposed to be deterministic. Should I expect that the behaviour of uuidgen to change on the older LTS versions? Or does the LTS status indicate that this different version wouldn't be backported?
As long I know how/when these uuid's are generated I can work around it (or just use sha1 versions).
Thanks!