PublicKey

org.sigilaris.core.crypto.PublicKey
See thePublicKey companion trait
object PublicKey

Attributes

Companion
trait
Source
PublicKey.scala
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
PublicKey.type

Members list

Type members

Classlikes

final case class Point(p: ECPoint) extends PublicKey

Public key representation wrapping a BouncyCastle EC point.

Public key representation wrapping a BouncyCastle EC point.

Lazily computes and caches x/y coordinates and byte array when needed.

Value parameters

p

BouncyCastle elliptic curve point

Attributes

Source
PublicKey.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait PublicKey
class Object
trait Matchable
class Any
Show all
final case class XY(x: UInt256, y: UInt256) extends PublicKey

Public key representation storing explicit x and y coordinates.

Public key representation storing explicit x and y coordinates.

Lazily computes and caches the BouncyCastle EC point when needed.

Value parameters

x

x-coordinate as 32-byte datatype.UInt256

y

y-coordinate as 32-byte datatype.UInt256

Attributes

Source
PublicKey.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait PublicKey
class Object
trait Matchable
class Any
Show all

Inherited and Abstract types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror
Source
Mirror.scala
type MirroredLabel <: String

The name of the type

The name of the type

Attributes

Inherited from:
Mirror
Source
Mirror.scala

Value members

Concrete methods

def fromByteArray(array: Array[Byte]): Either[UInt256Failure, PublicKey]

Decodes a public key from a 64-byte array (x||y).

Decodes a public key from a 64-byte array (x||y).

Value parameters

array

64-byte array: x (32 bytes) || y (32 bytes), big-endian

Attributes

Returns

Right(PublicKey) on success, Left(failure) if array length is not 64 or coordinates are invalid

Source
PublicKey.scala
def fromECPoint(p: ECPoint): PublicKey

Constructs a public key from a BouncyCastle EC point.

Constructs a public key from a BouncyCastle EC point.

Value parameters

p

elliptic curve point

Attributes

Returns

public key with Point representation

Note

Used internally when deriving keys from private keys or recovering from signatures

Source
PublicKey.scala

Constructs a public key from x and y coordinates.

Constructs a public key from x and y coordinates.

Value parameters

x

x-coordinate as datatype.UInt256

y

y-coordinate as datatype.UInt256

Attributes

Returns

public key with PublicKey.XY representation

Source
PublicKey.scala

Givens

Givens

cats.Eq instance comparing public keys by their (x, y) coordinates.

cats.Eq instance comparing public keys by their (x, y) coordinates.

Attributes

Source
PublicKey.scala

Default Hash instance for public keys, using Keccak-256 over the 64-byte representation.

Default Hash instance for public keys, using Keccak-256 over the 64-byte representation.

Attributes

Source
PublicKey.scala

codec.byte.ByteDecoder instance that deserializes a public key from 64 bytes (x||y).

codec.byte.ByteDecoder instance that deserializes a public key from 64 bytes (x||y).

Attributes

Source
PublicKey.scala
inline given pubkeyByteEncoder: pubkeyByteEncoder

codec.byte.ByteEncoder instance that serializes a public key to 64 bytes (x||y).

codec.byte.ByteEncoder instance that serializes a public key to 64 bytes (x||y).

Attributes

Source
PublicKey.scala