X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/da198be4b5ae28a3d1c711b31081aba5af33ed6d..7f0cb92e0d91031d30d1db92b6df9849571baeeb:/armsrc/crypto1.c diff --git a/armsrc/crypto1.c b/armsrc/crypto1.c index 98d38b2b..68cb9b4e 100644 --- a/armsrc/crypto1.c +++ b/armsrc/crypto1.c @@ -141,3 +141,13 @@ uint32_t prng_successor(uint32_t x, uint32_t n) return SWAPENDIAN(x); } + +uint32_t prng_successor_one(uint32_t x) +{ + SWAPENDIAN(x); + + x = x >> 1 | (x >> 16 ^ x >> 18 ^ x >> 19 ^ x >> 21) << 31; + + return SWAPENDIAN(x); +} +