public class Ed25519LittleEndianEncoding extends Encoding
Constructor and Description |
---|
Ed25519LittleEndianEncoding() |
Modifier and Type | Method and Description |
---|---|
FieldElement |
decode(byte[] in)
Ignores top bit.
|
byte[] |
encode(FieldElement x)
Preconditions:
|h| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc. Write p=2^255-19; q=floor(h/p). Basic claim: q = floor(2^(-255)(h + 19 2^(-25)h9 + 2^(-1))). |
boolean |
isNegative(FieldElement x)
Return true if x is in {1,3,5,...,q-2}
Return false if x is in {0,2,4,...,q-1} Preconditions: |x| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc. |
(package private) static int |
load_3(byte[] in,
int offset) |
(package private) static long |
load_4(byte[] in,
int offset) |
public byte[] encode(FieldElement x)
static int load_3(byte[] in, int offset)
static long load_4(byte[] in, int offset)
public FieldElement decode(byte[] in)
public boolean isNegative(FieldElement x)
isNegative
in class Encoding