1
$\begingroup$

I try to implement spritz cryptography like this paper . But I don't know how to calculate LOW(b) and HIGH(b). In paper page 7.

low(b) = b mod D
high(b) = b/D

D = square root N
b = D * x+y

I don't khow what is x,y. The example LOW(b) and HIGH(b) of N=256 is

#define LOW(B)  ((B) & 0xf)
#define HIGH(B) ((B) >> 4)

what is LOW(b) and HIGH(b) of N=16.

$\endgroup$
3
  • $\begingroup$ 8 is not a square, so root 8 is not an integer. $\endgroup$ – CodesInChaos Nov 6 '15 at 9:11
  • $\begingroup$ Thank you . I just edit my question little bit. If N = 16 how to calculate low(b) and high(b). $\endgroup$ – user572575 Nov 6 '15 at 11:49
  • $\begingroup$ $\sqrt{16}=4$ => low = b mod 4 and high = b / 4 or if you prefer bitwise operations, low = b & 3 and high = b >> 2. $\endgroup$ – CodesInChaos Nov 6 '15 at 12:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.