recvUnauthenticatedEncryptMessage method
Receive and process an unauthenticated encrypted message in Strobe.
The recvUnauthenticatedEncryptMessage
method is used to receive and process an unauthenticated encrypted
message within the Strobe protocol. This operation is typically used for secure communication where integrity
is not a requirement. The method processes the ciphertext, updating the internal state of the Strobe instance
and returning the decrypted message.
Parameters:
meta
: A boolean flag indicating whether metadata is included in the operation.ciphertext
: The ciphertext to be received and decrypted.
Returns:
- A
List<int>
containing the decrypted message.
Usage:
List<int> ciphertext = ...; // Received unauthenticated ciphertext.
List<int> plaintext = strobeInstance.recvUnauthenticatedEncryptMessage(true, ciphertext);
// Receive and process unauthenticated encrypted message.
The recvUnauthenticatedEncryptMessage
method is suitable for use cases where encryption is the primary concern,
and data integrity is not a strict requirement.
Implementation
List<int> recvUnauthenticatedEncryptMessage(bool meta, List<int> ciphertext) {
return operate(meta, StrobeOperation.recvEnc, ciphertext, 0, false);
}