X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/da198be4b5ae28a3d1c711b31081aba5af33ed6d..98c799ba499b81a02bef8f04ccb5149394c4d4d5:/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); +} +