From a97b2cc3af2bf5813c61ef019aa087d290d4fcbf Mon Sep 17 00:00:00 2001 From: Mariotaku Lee Date: Thu, 29 Apr 2021 03:43:40 +0900 Subject: [PATCH] Randomized input IV --- libgamestream/client.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libgamestream/client.c b/libgamestream/client.c index a7fa800..96430d0 100644 --- a/libgamestream/client.c +++ b/libgamestream/client.c @@ -670,10 +670,14 @@ int gs_start_app(PSERVER_DATA server, STREAM_CONFIGURATION *config, int appId, b RAND_bytes(config->remoteInputAesKey, 16); memset(config->remoteInputAesIv, 0, 16); + // GFE somehow doesn't like this totally legit random number, so we have to generate one + RAND_bytes(config->remoteInputAesIv, 4); srand(time(NULL)); char url[4096]; u_int32_t rikeyid = 0; + memset(&rikeyid, config->remoteInputAesIv, 4); + rikeyid = htonl(rikeyid); char rikey_hex[33]; bytes_to_hex(config->remoteInputAesKey, rikey_hex, 16);