Packages

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.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Fp480
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. trait BigIntImpl extends AnyRef

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. val ExpectedFp480Length: Long
  5. val ExpectedOrderLength: Long
  6. val Impl: BigIntImpl
  7. val One: T
  8. final val Order: BigInt
  9. final val Prime: BigInt
  10. val Zero: T
  11. def apply(b: ByteVector): T
  12. def apply(x: BigInt): T
  13. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  14. def bigIntToByteVector(b: BigInt): ByteVector
  15. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  16. lazy val curvePoints: CurvePoints[T]
  17. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  19. 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()
  20. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  21. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  22. def inverseModPrime(fp: Fp480): Fp480

    inverse mod a prime is always in Fp480, so the cast is safe.

  23. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  24. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  25. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  26. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  27. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  28. def toString(): String
    Definition Classes
    AnyRef → Any
  29. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  30. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  31. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  32. object implicits

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from AnyRef

Inherited from Any

Ungrouped