herm1t LIVE!ng room [entries|archive|friends|userinfo]
herm1t

[ website | twilight corner in the herm1t's cave ]
[ userinfo | ljr userinfo ]
[ archive | journal archive ]

ICG/LCG [Jan. 29th, 2011|01:00 pm]
[Tags|, , , , ]

Получил письмо от cl0ne (спасибо ему!), в котором он мне указал, что здесь я протупил страшно, off by one, модуль для x86 - 2^32, а значит любое нечетное число является сопростым к модулю, а значит можно упростить функцию в декрипторе, и увеличить количество вариантов до 2^61. Подробнее на форуме.
LinkLeave a comment

Обратимые ГПСЧ [Oct. 26th, 2010|09:01 pm]
[Tags|, , ]

Mental Driller использовал xor-перестановки, есть еще один вариант LCG+ICG
How one could achieve a "random" behaviour of index variable in a polymorphic decription loop? This topic was already mentioned on this forum, here (MentalDriller's PRIDE, xor-based permutation). Another idea is to use a LCG and find the modular mulptiplicative inverse for the selected multiplier. I wont go into math details of the topic (you can easily find all neccessary info in Wiki), so suppose that we have LCG: x_next = (a * x + c) mod m; if we choose prime m, it's immediately follows from the properties of LCG, that there exists such r, that (a * r) mod m = 1, and that x_prev = (r * (x - c)) mod m. In other words it is the random numbers generator which could produce the same sequence in a reverse order.
LinkLeave a comment

navigation
[ viewing | most recent entries ]