|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.i2p.crypto.eddsa.math.Encoding
net.i2p.crypto.eddsa.math.bigint.BigIntegerLittleEndianEncoding
public class BigIntegerLittleEndianEncoding
Field Summary |
---|
Fields inherited from class net.i2p.crypto.eddsa.math.Encoding |
---|
f |
Constructor Summary | |
---|---|
BigIntegerLittleEndianEncoding()
|
Method Summary | |
---|---|
FieldElement |
decode(byte[] in)
Decode a FieldElement from its (b-1)-bit encoding. |
byte[] |
encode(BigInteger x)
Convert x to little endian. |
byte[] |
encode(FieldElement x)
Encode a FieldElement in its (b-1)-bit encoding. |
boolean |
isNegative(FieldElement x)
From the Ed25519 paper: x is negative if the (b-1)-bit encoding of x is lexicographically larger than the (b-1)-bit encoding of -x. |
void |
setField(Field f)
|
BigInteger |
toBigInteger(byte[] in)
Convert in to big endian |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BigIntegerLittleEndianEncoding()
Method Detail |
---|
public void setField(Field f)
setField
in class Encoding
public byte[] encode(FieldElement x)
Encoding
encode
in class Encoding
public byte[] encode(BigInteger x)
public FieldElement decode(byte[] in)
Encoding
decode
in class Encoding
in
- the (b-1)-bit encoding of a FieldElement.
public BigInteger toBigInteger(byte[] in)
public boolean isNegative(FieldElement x)
isNegative
in class Encoding
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |