So I wonder what drove the standard to require that and where the 5-digit Technistore code fits in to this? There must have been some reason behind it being 5-digit - it's rarely seen as a code length.
It's a combination of the long code and short key.
The key allows 256 distinct mappings between the quote code and reset code. That means that 12345 quote can only map to at most 256 of the 100,000 possible output values. 999,744 of the outputs are not possible - our keyspace has been reduced hugely.
Notice I say "at most 256". It is possible for 12345 to map to 98765 using one or more keys. In fact, 12345 could map to 98765 using all 256 keys, but then we wouldn't need to find out they key at all.
So if you tell me the reset code and I know the quote code, it is highly likely that I can just guess the key. For a very limited number of quote/reset pairs, I get 2 possible keys (in fact, there are two combinations with 4). So more than 99% of the time, I just need a single quote/reset pair to work out the key.
So normally I get something like:
12345/74643 - only possible key is 123 (99.25% of the time)
Sometimes I get this:
23654/34234 - two possible keys 232 and 154 (about .75% of the time)
98747/37265 - one possible key 232 (about 99.25% of the time)
It would be really unlikely to get this:
23654/34234 - two possible keys 232 and 154 (about .75% of the time)
91737/72764 - two possible keys 078 and 154 (about .75% of the time)
(we know the key is 154 as it is the only common one)
Vanishly small chance of this happening:
23654/34234 - two possible keys 232 and 154 (about .75% of the time)
73748/38377 - two possible keys 232 and 154 (about .75% of the time)
98747/37265 - one possible key 232 (about 99.25% of the time)
I've just tested these by running every single possible combination of key and input code against the algorithm.
Not in any detail - have started looking at Texecom. Not aware of Tunstall.