StaticfromCreate an EncapsulationPublicKey from an X25519PublicKey.
StaticfromCreate an EncapsulationPublicKey from raw X25519 public key bytes.
Returns the encapsulation scheme.
Returns true if this is an X25519 public key.
Returns the X25519 public key if this is an X25519 encapsulation key.
Returns the raw public key data.
Encapsulate a new shared secret for this public key.
This generates a random shared secret and encapsulates it so that only the holder of the corresponding private key can recover it.
A tuple of [sharedSecret, ciphertext]
Get string representation.
Returns a unique reference to this EncapsulationPublicKey instance.
The reference is derived from the SHA-256 hash of the tagged CBOR representation, providing a unique, content-addressable identifier.
Returns the CBOR tags associated with this public key.
Returns the untagged CBOR encoding.
Returns the tagged CBOR encoding.
Returns the tagged value in CBOR binary representation.
Creates an EncapsulationPublicKey by decoding it from untagged CBOR. Note: Without tags, we assume X25519 scheme.
Creates an EncapsulationPublicKey by decoding it from tagged CBOR.
StaticfromStaticfromStatic method to decode from tagged CBOR binary data.
StaticfromStatic method to decode from untagged CBOR binary data.
Returns the UR representation.
Returns the UR string representation.
StaticfromStaticfromCreates an EncapsulationPublicKey from a UR string.
Represents a public key for key encapsulation.
Use this to encapsulate a shared secret for a recipient.