Skip to content

pyrophone.cabe

Byte-stream CABE transforms backed by the optional cabe extra.

Encryption nodes each own one PyCABE client and its lease cache. Service settings are captured at startup; encapsulation attributes are read for each message. Printer inspects envelope headers locally, without a client or decryption. Importing this module or declaring graphs does not import PyCABE or perform I/O.

Classes

NameDescription
DecapsulatorAuthenticate and decrypt each CABE envelope, emitting only its payload.
EncapsulatorEncrypt each plaintext byte payload into one encoded CABE envelope.
PrinterPrint CABE headers on one stdout line and forward the original bytes.

Decapsulatorclass#

class Decapsulator(_CABETransform)

Bases: _CABETransform

Authenticate and decrypt each CABE envelope, emitting only its payload.

Envelope attributes and content type are not forwarded on the bytes port. Decode, authorization, and authentication errors fail the node; unauthenticated plaintext is never emitted.

transformmethodasync#

async def transform(value: bytes) -> bytes
Inherited from pyrophone.cabe._CABETransform

serviceattributeclass attributeinstance attribute#

Inherited from pyrophone.cabe._CABETransformView source
service = Property[dict[str, object]](
  title='Key service',
  description='CABE service URL and optional PyCABE client settings. Missing TLS paths default from CABE_CERTIFICATE_FILE, CABE_KEY_FILE and CABE_CA_FILE when the node starts.'
)

runmethodasync#

Inherited from pyrophone.cabe._CABETransformView source
async def run() -> None

Encapsulatorclass#

class Encapsulator(_CABETransform)

Bases: _CABETransform

Encrypt each plaintext byte payload into one encoded CABE envelope.

attrsattributeclass attributeinstance attribute#

attrs = Property[dict[str, object]](
  default={},
  title='Attributes',
  description='CABE attributes for each outgoing message, such as sensitivity.'
)

transformmethodasync#

async def transform(value: bytes) -> bytes
Inherited from pyrophone.cabe._CABETransform

serviceattributeclass attributeinstance attribute#

Inherited from pyrophone.cabe._CABETransformView source
service = Property[dict[str, object]](
  title='Key service',
  description='CABE service URL and optional PyCABE client settings. Missing TLS paths default from CABE_CERTIFICATE_FILE, CABE_KEY_FILE and CABE_CA_FILE when the node starts.'
)

runmethodasync#

Inherited from pyrophone.cabe._CABETransformView source
async def run() -> None

Printerclass#

class Printer(Transform[bytes, bytes])

Bases: Transform[bytes, bytes]

Print CABE headers on one stdout line and forward the original bytes.

Inspection decodes and validates the envelope format without contacting a key service. Headers remain unverified; this node does not authenticate or decrypt messages. Attributes appear first; lease references use full hex. Algorithm and partial IV are omitted; other headers follow.

transformmethodasync#

async def transform(value: bytes) -> bytes