Module webrtc_sctp::stack::cookie[][src]

SCTP cookies are part of the 4-way handshake, and provide a means for the server to avoid storing state after receiving an INIT from a peer, thus avoiding certain types of denial of service attacks.

Structs

Cookie
Hex
Secret

The Secret struct contains a secret key to be used for generating HMACs, and provides functions for basic MAC generation and verification. A Secret is cloneable and maintains a shared inner state so all holders of a cloned Secret will access the same key. The secret may (and should) be periodically regenerated via regenerate(). The Secret will store a copy of the previous key which may be used for verifying cookies with timestamps indicating they were produced prior to the generation of the current key. Therefore, cookies in transit during a regeneration may still be verified (until the next regeneration, of course).