Class astutedds::security::CryptoPlugin

ClassList > astutedds > security > CryptoPlugin

Cryptographic Service Plugin Interface (SPI) More...

  • #include <crypto_spi.hpp>

Public Functions

Type Name
virtual TokenSeq create_local_participant_crypto_tokens (ParticipantCryptoHandle local_crypto_handle, ParticipantCryptoHandle remote_crypto_handle, SecurityException & ex) = 0
Get crypto tokens for key exchange.
virtual bool decode_rtps_message (std::vector< uint8_t > & plain_buffer, std::span< const uint8_t > encoded_buffer, ParticipantCryptoHandle receiving_participant_crypto_handle, ParticipantCryptoHandle sending_participant_crypto_handle, SecurityException & ex) = 0
Decode RTPS message (verify authentication tag)
virtual bool decode_serialized_payload (std::vector< uint8_t > & plain_buffer, std::span< const uint8_t > encrypted_buffer, DatareaderCryptoHandle receiving_datareader_crypto_handle, DatawriterCryptoHandle sending_datawriter_crypto_handle, SecurityException & ex) = 0
Decrypt serialized payload.
virtual bool encode_rtps_message (std::vector< uint8_t > & encoded_buffer, std::span< const uint8_t > plain_buffer, ParticipantCryptoHandle sending_participant_crypto_handle, const std::vector< ParticipantCryptoHandle > & receiving_participant_crypto_handles, SecurityException & ex) = 0
Encode RTPS message (add authentication tag)
virtual bool encode_serialized_payload (std::vector< uint8_t > & encrypted_buffer, std::span< const uint8_t > plain_buffer, DatawriterCryptoHandle sending_datawriter_crypto_handle, SecurityException & ex) = 0
Encrypt serialized payload.
virtual DatareaderCryptoHandle register_local_datareader (ParticipantCryptoHandle participant_crypto_handle, const PropertySeq & reader_properties, const EndpointSecurityAttributes & reader_security_attributes, SecurityException & ex) = 0
Register local DataReader.
virtual DatawriterCryptoHandle register_local_datawriter (ParticipantCryptoHandle participant_crypto_handle, const PropertySeq & writer_properties, const EndpointSecurityAttributes & writer_security_attributes, SecurityException & ex) = 0
Register local DataWriter.
virtual ParticipantCryptoHandle register_local_participant (IdentityHandle identity_handle, PermissionsHandle permissions_handle, const PropertySeq & participant_properties, const ParticipantSecurityAttributes & participant_security_attributes, SecurityException & ex) = 0
Register local participant crypto handle.
virtual DatareaderCryptoHandle register_matched_remote_datareader (DatawriterCryptoHandle local_writer_crypto_handle, ParticipantCryptoHandle remote_participant_crypto_handle, const Token & shared_secret, bool relay_only, SecurityException & ex) = 0
Register matched remote DataReader.
virtual DatawriterCryptoHandle register_matched_remote_datawriter (DatareaderCryptoHandle local_reader_crypto_handle, ParticipantCryptoHandle remote_participant_crypto_handle, const Token & shared_secret, SecurityException & ex) = 0
Register matched remote DataWriter.
virtual ParticipantCryptoHandle register_matched_remote_participant (ParticipantCryptoHandle local_participant_crypto_handle, IdentityHandle remote_identity_handle, PermissionsHandle remote_permissions_handle, const Token & shared_secret, SecurityException & ex) = 0
Register matched remote participant.
virtual bool set_remote_participant_crypto_tokens (ParticipantCryptoHandle local_crypto_handle, ParticipantCryptoHandle remote_crypto_handle, const TokenSeq & remote_crypto_tokens, SecurityException & ex) = 0
Set remote participant crypto tokens.
virtual bool unregister_datareader (DatareaderCryptoHandle datareader_crypto_handle, SecurityException & ex) = 0
Unregister DataReader.
virtual bool unregister_datawriter (DatawriterCryptoHandle datawriter_crypto_handle, SecurityException & ex) = 0
Unregister DataWriter.
virtual bool unregister_participant (ParticipantCryptoHandle participant_crypto_handle, SecurityException & ex) = 0
Unregister participant.
virtual ~CryptoPlugin () = default

Detailed Description

Based on DDS Security 1.1 Section 8.5 Provides encryption, decryption, signing, and verification

Public Functions Documentation

function create_local_participant_crypto_tokens

Get crypto tokens for key exchange.

virtual TokenSeq astutedds::security::CryptoPlugin::create_local_participant_crypto_tokens (
    ParticipantCryptoHandle local_crypto_handle,
    ParticipantCryptoHandle remote_crypto_handle,
    SecurityException & ex
) = 0

Parameters:

  • local_crypto_handle Local handle
  • remote_crypto_handle Remote handle
  • ex Security exception output

Returns:

Crypto tokens for transmission


function decode_rtps_message

Decode RTPS message (verify authentication tag)

virtual bool astutedds::security::CryptoPlugin::decode_rtps_message (
    std::vector< uint8_t > & plain_buffer,
    std::span< const uint8_t > encoded_buffer,
    ParticipantCryptoHandle receiving_participant_crypto_handle,
    ParticipantCryptoHandle sending_participant_crypto_handle,
    SecurityException & ex
) = 0

Parameters:

  • plain_buffer Output buffer
  • encoded_buffer Input buffer
  • receiving_participant_crypto_handle Receiver handle
  • sending_participant_crypto_handle Sender handle
  • ex Security exception output

Returns:

True if successful


function decode_serialized_payload

Decrypt serialized payload.

virtual bool astutedds::security::CryptoPlugin::decode_serialized_payload (
    std::vector< uint8_t > & plain_buffer,
    std::span< const uint8_t > encrypted_buffer,
    DatareaderCryptoHandle receiving_datareader_crypto_handle,
    DatawriterCryptoHandle sending_datawriter_crypto_handle,
    SecurityException & ex
) = 0

Parameters:

  • plain_buffer Output buffer for plaintext
  • encrypted_buffer Input buffer with encrypted data
  • receiving_datareader_crypto_handle Reader handle
  • sending_datawriter_crypto_handle Writer handle
  • ex Security exception output

Returns:

True if successful


function encode_rtps_message

Encode RTPS message (add authentication tag)

virtual bool astutedds::security::CryptoPlugin::encode_rtps_message (
    std::vector< uint8_t > & encoded_buffer,
    std::span< const uint8_t > plain_buffer,
    ParticipantCryptoHandle sending_participant_crypto_handle,
    const std::vector< ParticipantCryptoHandle > & receiving_participant_crypto_handles,
    SecurityException & ex
) = 0

Parameters:

  • encoded_buffer Output buffer
  • plain_buffer Input buffer
  • sending_participant_crypto_handle Sender handle
  • receiving_participant_crypto_handles Receiver handles
  • ex Security exception output

Returns:

True if successful


function encode_serialized_payload

Encrypt serialized payload.

virtual bool astutedds::security::CryptoPlugin::encode_serialized_payload (
    std::vector< uint8_t > & encrypted_buffer,
    std::span< const uint8_t > plain_buffer,
    DatawriterCryptoHandle sending_datawriter_crypto_handle,
    SecurityException & ex
) = 0

Parameters:

  • encrypted_buffer Output buffer for encrypted data
  • plain_buffer Input buffer with plaintext
  • sending_datawriter_crypto_handle Writer handle
  • ex Security exception output

Returns:

True if successful


function register_local_datareader

Register local DataReader.

virtual DatareaderCryptoHandle astutedds::security::CryptoPlugin::register_local_datareader (
    ParticipantCryptoHandle participant_crypto_handle,
    const PropertySeq & reader_properties,
    const EndpointSecurityAttributes & reader_security_attributes,
    SecurityException & ex
) = 0

Parameters:

  • participant_crypto_handle Participant handle
  • reader_properties Reader crypto properties
  • reader_security_attributes Reader security attributes
  • ex Security exception output

Returns:

Reader crypto handle


function register_local_datawriter

Register local DataWriter.

virtual DatawriterCryptoHandle astutedds::security::CryptoPlugin::register_local_datawriter (
    ParticipantCryptoHandle participant_crypto_handle,
    const PropertySeq & writer_properties,
    const EndpointSecurityAttributes & writer_security_attributes,
    SecurityException & ex
) = 0

Parameters:

  • participant_crypto_handle Participant handle
  • writer_properties Writer crypto properties
  • writer_security_attributes Writer security attributes
  • ex Security exception output

Returns:

Writer crypto handle


function register_local_participant

Register local participant crypto handle.

virtual ParticipantCryptoHandle astutedds::security::CryptoPlugin::register_local_participant (
    IdentityHandle identity_handle,
    PermissionsHandle permissions_handle,
    const PropertySeq & participant_properties,
    const ParticipantSecurityAttributes & participant_security_attributes,
    SecurityException & ex
) = 0

Parameters:

  • identity_handle Identity of participant
  • permissions_handle Permissions of participant
  • participant_properties Crypto properties
  • participant_security_attributes Security attributes
  • ex Security exception output

Returns:

Participant crypto handle


function register_matched_remote_datareader

Register matched remote DataReader.

virtual DatareaderCryptoHandle astutedds::security::CryptoPlugin::register_matched_remote_datareader (
    DatawriterCryptoHandle local_writer_crypto_handle,
    ParticipantCryptoHandle remote_participant_crypto_handle,
    const Token & shared_secret,
    bool relay_only,
    SecurityException & ex
) = 0

Parameters:

  • local_writer_crypto_handle Local writer handle
  • remote_participant_crypto_handle Remote participant handle
  • shared_secret Shared secret
  • relay_only Whether this is relay-only
  • ex Security exception output

Returns:

Remote reader crypto handle


function register_matched_remote_datawriter

Register matched remote DataWriter.

virtual DatawriterCryptoHandle astutedds::security::CryptoPlugin::register_matched_remote_datawriter (
    DatareaderCryptoHandle local_reader_crypto_handle,
    ParticipantCryptoHandle remote_participant_crypto_handle,
    const Token & shared_secret,
    SecurityException & ex
) = 0

Parameters:

  • local_reader_crypto_handle Local reader handle
  • remote_participant_crypto_handle Remote participant handle
  • shared_secret Shared secret
  • ex Security exception output

Returns:

Remote writer crypto handle


function register_matched_remote_participant

Register matched remote participant.

virtual ParticipantCryptoHandle astutedds::security::CryptoPlugin::register_matched_remote_participant (
    ParticipantCryptoHandle local_participant_crypto_handle,
    IdentityHandle remote_identity_handle,
    PermissionsHandle remote_permissions_handle,
    const Token & shared_secret,
    SecurityException & ex
) = 0

Parameters:

  • local_participant_crypto_handle Local participant handle
  • remote_identity_handle Remote identity
  • remote_permissions_handle Remote permissions
  • shared_secret Shared secret from authentication
  • ex Security exception output

Returns:

Remote participant crypto handle


function set_remote_participant_crypto_tokens

Set remote participant crypto tokens.

virtual bool astutedds::security::CryptoPlugin::set_remote_participant_crypto_tokens (
    ParticipantCryptoHandle local_crypto_handle,
    ParticipantCryptoHandle remote_crypto_handle,
    const TokenSeq & remote_crypto_tokens,
    SecurityException & ex
) = 0

Parameters:

  • local_crypto_handle Local handle
  • remote_crypto_handle Remote handle
  • remote_crypto_tokens Tokens received from remote
  • ex Security exception output

Returns:

True if successful


function unregister_datareader

Unregister DataReader.

virtual bool astutedds::security::CryptoPlugin::unregister_datareader (
    DatareaderCryptoHandle datareader_crypto_handle,
    SecurityException & ex
) = 0

Parameters:

  • datareader_crypto_handle Handle to unregister
  • ex Security exception output

Returns:

True if successful


function unregister_datawriter

Unregister DataWriter.

virtual bool astutedds::security::CryptoPlugin::unregister_datawriter (
    DatawriterCryptoHandle datawriter_crypto_handle,
    SecurityException & ex
) = 0

Parameters:

  • datawriter_crypto_handle Handle to unregister
  • ex Security exception output

Returns:

True if successful


function unregister_participant

Unregister participant.

virtual bool astutedds::security::CryptoPlugin::unregister_participant (
    ParticipantCryptoHandle participant_crypto_handle,
    SecurityException & ex
) = 0

Parameters:

  • participant_crypto_handle Handle to unregister
  • ex Security exception output

Returns:

True if successful


function ~CryptoPlugin

virtual astutedds::security::CryptoPlugin::~CryptoPlugin () = default


The documentation for this class was generated from the following file include/astutedds/security/crypto_spi.hpp