NodeCrypto Help

Hybrid KEM Decapsulate

Category: Post-Quantum Cryptography ยท Node Type ID: pqc-hybridkem-decaps

Decapsulates shared secret using hybrid secret key and ciphertext

Overview

Decapsulates a 1,120-byte X25519 + ML-KEM-768 hybrid ciphertext using the recipient's 2,432-byte Hybrid Secret Key, recovering the exact same 32-byte combined Recovered Shared Secret produced by Hybrid KEM Encapsulate.

When to Use

Parameter Configuration

Hybrid KEM Decapsulate has no configurable parameters.

Port I/O Specification

See Ports & Connections for general wiring rules, data type colors, and dynamic port creation.

Input Ports

Port Nature: Fixed Input Ports (2 total).

Port NamePort IDData TypeRequiredVisibility ConditionDescription
Hybrid Secret Key secretKey Bytes Required Always visible Recipient's 2,432-byte Hybrid Secret Key.
Hybrid Ciphertext ciphertext Bytes Required Always visible 1,120-byte Hybrid Ciphertext received from the sender.

Output Ports

Port Nature: Fixed Output Ports (1 total).

Port NamePort IDData TypeVisibility ConditionDescription
Recovered Shared Secret sharedSecret Bytes Always visible Recovered 32-byte combined shared secret.

Error Cases

When any of the following conditions occurs at runtime, this node transitions to an ERROR state and downstream nodes connected to its outputs do not execute.

Error CodeDefault Engine MessageTrigger Condition
INVALID_KEY_MATERIAL Invalid key length or format Raised when Hybrid Secret Key is not 2,432 bytes or Hybrid Ciphertext is not 1,120 bytes.

Examples

Decapsulating a Hybrid KEM Ciphertext

Recover the 32-byte hybrid shared secret on the recipient side.

  1. Connect Hybrid Secret Key from Hybrid KEM KeyGen and Hybrid Ciphertext from Hybrid KEM Encapsulate to Hybrid KEM Decapsulate.