From: Hamlin, Garick L <ghamlin@isc.upenn.edu>
To: Konstantin Knizhnik <k.knizhnik@postgrespro.ru>
Cc: Andreas Karlsson <andreas@proxel.se>
Cc: Andres Freund <andres@anarazel.de>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Subject: Re: libpq compression
Date: Mon, 11 Feb 2019 15:10:54 +0000
Message-ID: <20190211151051.GA18279@isc.upenn.edu> (raw)
In-Reply-To: <c04c778a-dafb-d206-9db8-2001e670b8b7@postgrespro.ru>
References: <aad16e41-b3f9-e89d-fa57-fb4c694bec25@postgrespro.ru>
<20190208071431.skfmpbeclrkpzuac@alap3.anarazel.de>
<8d210267-a2fa-662f-b167-0e5991d45dd7@proxel.se>
<c04c778a-dafb-d206-9db8-2001e670b8b7@postgrespro.ru>
On Mon, Feb 11, 2019 at 05:56:24PM +0300, Konstantin Knizhnik wrote:
>
> Also such attack is possible only if session_id can be somehow "guessed". If
> it is just big random number, then it is very unlikely that it can be hacked
> in in this way.
I am not arguing against compression, but this point isn't exactly true.
The _uniformity_ of the key makes a big difference in the practicality of
the attack, not the total entropy.
For example, if the session_id was a 128 bit hex string and I knew or
guessed the characters before the secret part and could send data that ended
up near the secret then I can guess one character at a time and infer
the guess is correct when the size of the packet gets smaller. IOW, I
really only have to guess with 1/16 odds each digit (because its a hex
string in this example).
In the case, the 128 bit secret only provides the effective protection
of an 8-bit secret because it can be guessed left to right 4 bits at a
time.
Garick
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: ghamlin@isc.upenn.edu, k.knizhnik@postgrespro.ru, andreas@proxel.se, andres@anarazel.de
Subject: Re: libpq compression
In-Reply-To: <20190211151051.GA18279@isc.upenn.edu>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox