Skip to content

Commit

Permalink
Merge pull request #816 from mariotaku/master
Browse files Browse the repository at this point in the history
Randomized input IV
  • Loading branch information
irtimmer authored Jul 20, 2021
2 parents 7c8795f + 660cc7d commit 8f4d9aa
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions libgamestream/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
#include <arpa/inet.h>
#include <uuid/uuid.h>
#include <openssl/sha.h>
#include <openssl/aes.h>
Expand Down Expand Up @@ -670,10 +671,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);

Expand Down

0 comments on commit 8f4d9aa

Please sign in to comment.