pub fn SetupAuthPSKS(
    config: HPKEConfig,
    pkR: &HpkePublicKey,
    info: &Info,
    psk: &Psk,
    psk_id: &PskId,
    skS: &HpkePrivateKey,
    randomness: Randomness
) -> SenderContextResult
Expand description

Authentication using both a PSK and an Asymmetric Key - Sender

This mode is a straightforward combination of the PSK and authenticated modes. The PSK is passed through to the key schedule as in the former, and as in the latter, we use the authenticated KEM variants.

def SetupAuthPSKS(pkR, info, psk, psk_id, skS):
  shared_secret, enc = AuthEncap(pkR, skS)
  return enc, KeyScheduleS(mode_auth_psk, shared_secret, info,
                           psk, psk_id)

The PSK MUST have at least 32 bytes of entropy and SHOULD be of length Nh bytes or longer.