object Fp480
Fp480 represents a value in the field of integers mod some Prime - that is, values in [0, Prime - 1].
This is a pattern that is laid out by https://failex.blogspot.com/2017/04/and-glorious-subst-to-come.html
The idea is that Fp480
is a type alias for some dependent type on a singleton "Impl.T", which
is just a subtype of BigInt.
We get the guarantees about Fp480's safety by modding anytime someone calls the apply on the companion object, but without any runtime allocations.
- Alphabetic
- By Inheritance
- Fp480
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- trait BigIntImpl extends AnyRef
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val ExpectedFp480Length: Long
- val ExpectedOrderLength: Long
- val Impl: BigIntImpl
- val One: T
- final val Order: BigInt
- final val Prime: BigInt
- val Zero: T
- def apply(b: ByteVector): T
- def apply(x: BigInt): T
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def bigIntToByteVector(b: BigInt): ByteVector
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- lazy val curvePoints: CurvePoints[T]
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def fastModPrime(i: BigInt): Fp480
Only call this if
i
is very close to the Prime, otherwise it will be inefficient.Only call this if
i
is very close to the Prime, otherwise it will be inefficient.- Annotations
- @tailrec()
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def inverseModPrime(fp: Fp480): Fp480
inverse mod a prime is always in Fp480, so the cast is safe.
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- object implicits
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated