EccKey

class EccKey

A P-256 key pair, in the shape PlayReady stores them.

A device's group, signing and encryption keys are all of this form. On disk they appear as zgpriv.dat, zprivsig.dat and zprivencr.dat, and inside a .prd as fixed 96-byte slots.

The public point is always derived from the private scalar rather than read from the blob, so a .prd whose stored public half disagrees with its private half cannot produce a key pair that fails silently later.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The private scalar as 32 big-endian bytes.

Link copied to clipboard

The public point as 64 bytes, X then Y, big-endian and without a 0x04 prefix.

Functions

Link copied to clipboard
fun dumps(privateOnly: Boolean = false): ByteArray

Serialize as d‖X‖Y (96 bytes), or just d (32 bytes) when privateOnly is set.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String