5.1.4 Authentication Using Both a PSK and an Asymmetric Key (同时使用 PSK 和非对称密钥进行认证)
5.1.4 Authentication Using Both a PSK and an Asymmetric Key (同时使用 PSK 和非对称密钥进行认证)
此模式是 PSK 模式和认证模式的直接组合.与 PSK 模式一样, PSK 作为输入提供给密钥调度, 与认证模式一样, 使用认证的 KEM 变体.
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)
def SetupAuthPSKR(enc, skR, info, psk, psk_id, pkS):
shared_secret = AuthDecap(enc, skR, pkS)
return KeyScheduleR(mode_auth_psk, shared_secret, info,
psk, psk_id)
PSK 必须具有至少 32 字节的熵, 并且应该为 Nh 字节或更长的长度.有关更详细的讨论, 请参见 9.5 节.