Page MenuHomePhabricator

Cognate's StringHasher requires 64-bit PHP, doesn't work with 32-bit
Open, Needs TriagePublic

Description

		if ( PHP_INT_SIZE !== 8 ) {
			// 32 bit systems will result in poor hashes
			throw new RuntimeException( 'Cognate must run on a 64bit system' );
		}

How poor are the hashes going to be? Why is there no 32-bit compatible option?

At the very minimum this needs to be documented at https://www.mediawiki.org/wiki/Extension:Cognate

Event Timeline

Legoktm created this task.Dec 28 2017, 9:28 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptDec 28 2017, 9:28 AM
thiemowmde closed this task as Invalid.Dec 28 2017, 10:12 AM
thiemowmde added subscribers: daniel, thiemowmde.

The extension is 64-bit-only by design, see T150404. The TL;DR is: The risk of hash collisions is to big on 32 bit.

Legoktm reopened this task as Open.Dec 28 2017, 10:34 AM

Unfortunately that doesn't answer the question of what the risk actually is (such as if you have less than X items, does it become safe?), but I mostly opened this task for documentation purposes:

At the very minimum this needs to be documented at https://www.mediawiki.org/wiki/Extension:Cognate