i want to encrypt pixel value using henon equation :
Xi+2 = 1 - a*(Xi+1)*(Xi+1) + bXi (sorry i can't post image)
where a=1.4, b=0.3, x0=0.01, x1=0.02,
with this code :
k[i+2] =1-a*(Math.pow(k[i+1], 2))+b*k[i]
i can get random value from henon equation
1.00244, -0.40084033504000005, 1.0757898361270288, -0.7405053806319072, 0.5550494445953806, 0.3465365454865311, 0.99839222507778, -0.2915408854881054, 1.1805231444476698, -1.038551118053691, -0.15586685140049938, 0.6544223990721852,
. after that i rounded the random value
with this code :
inter[i]= (int) Math.round((k[i]*65536)%256)
i can encrypt the pixel value by XOR with random value (henon).
my question :
there are some negative random value from henon, as we know that there aren't negative pixel value.
so may i skip the negative random value (only save positive random value) to encrypt original pixel value ?
Thanks