Slide 28
Slide 28 text
WireGuardのセキュリティ強化
wg_noise_handshake_consume_initiation(struct message_handshake_initiation *src, struct wg_device *wg)
{
…
/* e */
message_ephemeral(e, src->unencrypted_ephemeral, chaining_key, hash);
/* es */
#ifdef USE_SE
if (!mix_dh_use_se(chaining_key, key, wg->static_identity.static_private, e))
goto out;
#else
if (!mix_dh(chaining_key, key, wg->static_identity.static_private, e))
goto out;
#endif
/* s */
if (!message_decrypt(s, src->encrypted_static,
sizeof(src->encrypted_static), key, hash))
goto out;
…
/* ss */
if (!mix_precomputed_dh(chaining_key, key, handshake->precomputed_static_static))
goto out;
…
}
noise.c変更点3 DH calculation
4th.DH calc.
Static Secret
Pub
Ephemeral Public