Java Program to Implement Naor-Reingold Pseudo Random Function
Naor-Reingold Pseudo-Random Function is a function of generating random numbers. Moni Naor and Omer Reingold described efficient constructions for various cryptographic primitives in the private key as well as public-key cryptography.
Input : N = 5 Output: 9.0, 9.0, 3.0, 9.0, 3.0 Input : N = 7 Output: 9.0, 81.0, 9.0, 9.0, 3.0, 3.0, 9.0
- Declare the variables p, l, g, n, x and arrays a and arr
- Take input from the user for generating random numbers
- Generate random numbers and use the defined approach:
Let p and l be prime numbers with l|p−1. Select an element g ε Fp* of multiplicative order l. Then for each n-dimensional vector a = (a0,a1, ..., an). They define the function as: fa(x)=ga0.a1x1a2x2…..anxn ε Fp
- Print the random numbers
Below is the implementation of the Naor-Reingold Pseudo-Random Function:
The Random numbers are: 9.0, 9.0, 3.0, 81.0, 3.0, 81.0, 9.0, 9.0, 3.0, 3.0,
My Personal Notes arrow_drop_up
Please Login to comment...