From a70fcfb65597ff22e4b2b8735d1afa550386603c Mon Sep 17 00:00:00 2001 From: iceman Date: Mon, 15 Feb 2016 02:46:48 +0100 Subject: [PATCH] add: added a noncedistance method --- armsrc/crypto1.c | 10 ++++++++++ 1 file changed, 10 insertions(+) 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); +} + -- 2.39.5