[Cryptography] updating a counter
John Denker
jsd at av8n.com
Mon May 19 16:39:32 EDT 2014
On 05/19/2014 12:59 PM, Ben Laurie wrote:
>> > Each subcounter gets updated every time. I arrange for
>> > the periods to be relatively prime, so that the period
>> > of the collection is the product of the periods of the
>> > individual subcounters.
> Hmm. That's surely not sufficient to ensure it doesn't repeat values.
> Which matters.
Actually it *is* sufficient to ensure that the overall
counter does not "repeat values" until its overall period
expires. Consider a collection of four subcounters, with
periods
2^32
2^32 - 1
2^31 - 1
2^29 - 1
The overall period is very nearly 2^124. Proof: Immediate
consequence of the fundamental theorem of arithmetic.
http://en.wikipedia.org/wiki/Fundamental_theorem_of_arithmetic
plus the fact that the block cipher is invertible.
On a verrry fast machine that will "repeat" once in 10^9
times the age of the universe. So yeah, it "repeats".
Please explain in more detail why that matters.
If you don't believe the theorem, please provide a counterexample.
More information about the cryptography
mailing list