From 2.5.1 in this paper, how is
$p$ = FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFE FFFFFFFF 00000000 00000000 FFFFFFFF
= $2^{384} − 2^{128} − 2^{96} + 2^{32} − 1$
derived?
Cryptography Stack Exchange is a question and answer site for software developers, mathematicians and others interested in cryptography. It only takes a minute to sign up.
Sign up to join this communityFrom 2.5.1 in this paper, how is
$p$ = FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFE FFFFFFFF 00000000 00000000 FFFFFFFF
= $2^{384} − 2^{128} − 2^{96} + 2^{32} − 1$
derived?
To have a signed 2-complement representation then you have to left pad the value with a single 00 valued byte. Generally API's will already view hexadecimals as positive unless they are preceded with a minus sign.
E.g. in Java:
// read value from string
BigInteger x = new BigInteger("FF...FF");
// signed byte representation, with additional zero valued byte to the left
byte[] encX = x.toByteArray();