X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/6c38d4c96fa96c871c739718081caa5e56ce968a..c5d886170c256ea2296ef5ac85a5137ae072d67b:/armsrc/crypto1.c?ds=sidebyside 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); +} +