sendUnauthenticatedEncryptedMessage method

List<int> sendUnauthenticatedEncryptedMessage(
  1. bool meta,
  2. List<int> plaintext
)

Encrypt and send data without authentication in Strobe.

The sendUnauthenticatedEncryptedMessage method is used to encrypt and send data without authentication in the Strobe protocol. This operation is typically used for secure communication where confidentiality is the primary concern, and data integrity is not strictly required. The method encrypts the provided plaintext, updates the internal state of the Strobe instance, and returns the ciphertext.

Parameters:

  • meta: A boolean flag indicating whether metadata is included in the operation.
  • plaintext: The plaintext data to be encrypted and sent.

Returns:

  • A List<int> containing the ciphertext for the provided plaintext.

Usage:

List<int> plaintext = ...; // Data to be encrypted and sent.
List<int> ciphertext = strobeInstance.sendEncUnauthenticated(true, plaintext);
// Encrypt and send data without authentication.

The sendUnauthenticatedEncryptedMessage method is suitable for use cases where data confidentiality is the primary concern, and data integrity can be ensured through other means.

Implementation

List<int> sendUnauthenticatedEncryptedMessage(
    bool meta, List<int> plaintext) {
  return operate(meta, StrobeOperation.sendEnc, plaintext, 0, false);
}