ratchet method
Ratchet the Strobe protocol state to enhance security.
The ratchet
method is used to update the Strobe protocol state by invoking the "RATCHET" operation.
This operation is typically performed to enhance security by deriving new key material and ensuring forward secrecy.
Parameters:
length
: The length of the key material to derive during the ratchet operation.
Usage:
strobeInstance.ratchet(32); // Ratchet the Strobe protocol to derive 32 bytes of key material.
The ratchet
method should be called periodically to advance the Strobe protocol's internal
state and derive fresh key material, helping to protect the confidentiality of data.
Implementation
void ratchet(int length) {
operate(false, StrobeOperation.ratchet, List.empty(), length, false);
}