Re: pgcrypto support for bcrypt $2b$ hashes

2022-08-01 Thread Jacob Champion
As discussed in [1], we're taking this opportunity to return some patchsets that don't appear to be getting enough reviewer interest. This is not a rejection, since we don't necessarily think there's anything unacceptable about the entry, but it differs from a standard "Returned with Feedback" in

Re: pgcrypto support for bcrypt $2b$ hashes

2021-10-02 Thread Daniel Fone
On Sat, 2 Oct 2021 at 23:22, Andreas Karlsson wrote: > Please add your patch to the current open commitfest. > Done. https://commitfest.postgresql.org/35/3338/ Thanks for the guidance. Daniel

Re: pgcrypto support for bcrypt $2b$ hashes

2021-10-02 Thread Andreas Karlsson
On 10/2/21 5:48 AM, Daniel Fone wrote: I don’t get these compiler warnings and I can’t find any settings to use that might generate them. I’m compiling on macOS 11.6 configured with `--enable-cassert --enable-depend --enable-debug CFLAGS=-O0` I’ve optimistically updated the patch to hopefully

Re: pgcrypto support for bcrypt $2b$ hashes

2021-10-02 Thread Sergey Shinderuk
On 02.10.2021 06:48, Daniel Fone wrote: > I don’t get these compiler warnings and I can’t find any settings to use that > might generate them. I’m compiling on macOS 11.6 configured with > `--enable-cassert --enable-depend --enable-debug CFLAGS=-O0` > Hi, Daniel! I don't get them from clang on

Re: pgcrypto support for bcrypt $2b$ hashes

2021-10-01 Thread Daniel Fone
Hi Andreas, > On 1/10/2021, at 12:17 AM, Andreas Karlsson wrote: > > On 9/28/21 11:58 PM, Daniel Fone wrote: >>> On 29/09/2021, at 2:33 AM, Daniel Gustafsson wrote: >>> I don't see why not, the best first patches are those scratching an itch. >>> If >>> you feel up for it then give it a go,

Re: pgcrypto support for bcrypt $2b$ hashes

2021-09-30 Thread Andreas Karlsson
On 9/28/21 11:58 PM, Daniel Fone wrote: On 29/09/2021, at 2:33 AM, Daniel Gustafsson wrote: I don't see why not, the best first patches are those scratching an itch. If you feel up for it then give it a go, I - and the rest of pgsql-hackers - can help if you need to bounce ideas. I’m glad

Re: pgcrypto support for bcrypt $2b$ hashes

2021-09-28 Thread Daniel Fone
> On 29/09/2021, at 2:33 AM, Daniel Gustafsson wrote: > >> On 28 Sep 2021, at 05:15, Daniel Fone wrote: >> >>> On 26/09/2021, at 12:09 AM, Daniel Gustafsson wrote: >>> >>> Upgrading our crypt_blowfish.c to the upstream 1.3 version would be the >>> correct >>> fix IMO, but since we have a

Re: pgcrypto support for bcrypt $2b$ hashes

2021-09-28 Thread Daniel Gustafsson
> On 28 Sep 2021, at 05:15, Daniel Fone wrote: > > Hi Daniel, > > Thanks for the feedback. > >> On 26/09/2021, at 12:09 AM, Daniel Gustafsson wrote: >> >> But 2b and 2a hashes aren't equal, although very similar. 2a should have the >> many-buggy to one-correct collision safety and 2b hashes

Re: pgcrypto support for bcrypt $2b$ hashes

2021-09-27 Thread Daniel Fone
Hi Daniel, Thanks for the feedback. > On 26/09/2021, at 12:09 AM, Daniel Gustafsson wrote: > > But 2b and 2a hashes aren't equal, although very similar. 2a should have the > many-buggy to one-correct collision safety and 2b hashes shouldn't. The fact > that your hashes work isn't conclusive

Re: pgcrypto support for bcrypt $2b$ hashes

2021-09-25 Thread Daniel Gustafsson
> On 24 Sep 2021, at 04:12, Daniel Fone wrote: > At the moment, pgcrypto’s `crypt` doesn’t recognise this prefix. However, > simply `replace`ing the prefix with $2a$ allows crypt to validate the hashes. > This patch simply adds recognition for the prefix and treats the hash > identically to

pgcrypto support for bcrypt $2b$ hashes

2021-09-24 Thread Daniel Fone
Hello, I've recently been working with a database containing bcrypt hashes generated by a 3rd-party which use the $2b$ prefix. This prefix was introduced in 2014 and has since been recognised by a number of bcrypt implementations. [1][2][3][4] At the moment, pgcrypto’s `crypt` doesn’t