SEC_TRAFFIC_SECRETS structure (sspi.h)

Contains the traffic secrets for a connection.

Syntax

typedef struct _SEC_TRAFFIC_SECRETS {
  wchar_t                 SymmetricAlgId[SZ_ALG_MAX_SIZE];
  wchar_t                 ChainingMode[SZ_ALG_MAX_SIZE];
  wchar_t                 HashAlgId[SZ_ALG_MAX_SIZE];
  unsigned short          KeySize;
  unsigned short          IvSize;
  unsigned short          MsgSequenceStart;
  unsigned short          MsgSequenceEnd;
  SEC_TRAFFIC_SECRET_TYPE TrafficSecretType;
  unsigned short          TrafficSecretSize;
  unsigned char           TrafficSecret[ANYSIZE_ARRAY];
} SEC_TRAFFIC_SECRETS, *PSEC_TRAFFIC_SECRETS;

Members

SymmetricAlgId[SZ_ALG_MAX_SIZE]

THe negotiated symmetric key algorithm (e.g. BCRYPT_AES_ALGORITHM).

ChainingMode[SZ_ALG_MAX_SIZE]

The negotiated symmetric key algorithm chaining mode (e.g. BCRYPT_CHAIN_MODE_GCM or BCRYPT_CHAIN_MODE_CCM).

HashAlgId[SZ_ALG_MAX_SIZE]

The negotiated hash algorithm (e.g. BCRYPT_SHA256_ALGORITHM or BCRYPT_SHA384_ALGORITHM).

KeySize

They size (in bytes) of the symmetric key to derive from this traffic secret.

IvSize

The size (in bytes) of the IV to derive from this traffic secret.

MsgSequenceStart

The offset of the first byte of the TLS message sequence to be protected with a key derived from TrafficSecret. Use 0 to indicate the first byte of the buffer.

MsgSequenceEnd

The offset of the last byte of the TLS message sequence to be protected with a key derived from TrafficSecret. Use 0 if the secret is for the encryption of application data or decryption of incoming records.

TrafficSecretType

The type of traffic secret from the TRAFFIC_SECRET_TYPE enumeration.

TrafficSecretSize

The size (in bytes) of the traffic secret.

TrafficSecret[ANYSIZE_ARRAY]

Traffic secret of type TrafficSecretType, TrafficSecretSize bytes long, used to derive write key and IV for message protection.

Requirements

Requirement Value
Header sspi.h

See also

TRAFFIC_SECRET_TYPE