Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iuNBh-0001QY-1n for pgsql-general@arkaria.postgresql.org; Wed, 22 Jan 2020 21:05:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iuNBf-0002eA-Cu for pgsql-general@arkaria.postgresql.org; Wed, 22 Jan 2020 21:05:19 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iuNBd-0002e0-Bj for pgsql-general@lists.postgresql.org; Wed, 22 Jan 2020 21:05:19 +0000 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iuNBY-0003le-EO for pgsql-general@lists.postgresql.org; Wed, 22 Jan 2020 21:05:16 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id E2BE14C9; Wed, 22 Jan 2020 16:05:09 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Wed, 22 Jan 2020 16:05:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm2; bh=G SEZf5WIQXyoNjVH792jwJFPzqrMk/733lBJzkg4+GE=; b=mcvAM8aLn53dQbMR9 8BKeJj8RToMG5uwWplfkqFwlDfiEVYXwVq9s6ugIcPCSM8G9D/N4RD9Nb/tYHBG2 1rdb2fyrMFuVSlwxazOB2x/PjCk1Esuy44nRbbCR/I3h60kCmjbNtu7NaNDcFtvf KIjdYC+wT/49jtv0H79jyYdyUWZQ18e7iiKUd/7W+smqyu0fLptZeKRNnRBIW/4w ojpd2uq4KF/V5LniLaEpngiiFB4XUTwsn5kGohYDJWc/gJ1/9ZKvYnqdZQkEApFA yEqX+NcksyGEXdEcYAj7GGnQqugnA7j6lxKkD7tb0hG0G2RDUc4F4SXHKgWO/xdt T0OcA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=GSEZf5WIQXyoNjVH792jwJFPzqrMk/733lBJzkg4+ GE=; b=SGlMT4VdUqk0vhA7IPgp2YpoXLkFCAmWhTuXgXPmUm4F6sNl9gAVzj+yq w6s68hufr5WUWmJWEdPHDaKnfIGnXV4z4kTfowsytZnkYN0g+lzOeGSFFPjidLqb DfBeYGO1YqO7yJF41cS88593raNB+Apijg67YZPpuOJSu+w6xuANwWdymxwrzzNF s9wReccKJwg0g8ov6ONVGgc7WmR/i9r14T2E5aIeh5tYmzSPkPiYS4jstH3DajS6 xROBdcTEfHkUdY8lCpwEbh3RghuXTocBYmvAJOec+dQS8tjgd4HCSmVJvWVbwGmN l0Vva7Fvtk4hQ4+UUEy8yvmepZV3g== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrvddtgddufeelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffvfhfhkffffgggjggtgfesthekredttdefjeenucfhrhhomheptegurhhi rghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtoh hmqeenucffohhmrghinhepphhoshhtghhrvghsqhhlrdhorhhgnecukfhppeejuddrvddu vddruddvledrudelfeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhm X-ME-Proxy: Received: from [192.168.1.10] (unknown [71.212.129.193]) by mail.messagingengine.com (Postfix) with ESMTPA id 72079306088B; Wed, 22 Jan 2020 16:05:08 -0500 (EST) Subject: Re: calculating the MD5 hash of role passwords in C To: Matthias Apitz , Justin Cc: "pgsql-generallists.postgresql.org" References: <20200122182036.GA2908@c720-r342378> <20200122185847.GA90048@elch.exwg.net> <20200122194113.GA2410@c720-r342378> <20200122205802.GA3032@c720-r342378> From: Adrian Klaver Message-ID: <6ecdd8da-1a3c-1b30-ea61-3756b57beafb@aklaver.com> Date: Wed, 22 Jan 2020 13:05:07 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.3.1 MIME-Version: 1.0 In-Reply-To: <20200122205802.GA3032@c720-r342378> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 1/22/20 12:58 PM, Matthias Apitz wrote: > El día miércoles, enero 22, 2020 a las 03:32:17p. m. -0500, Justin escribió: > >> Not sure what your after but here is more information regarding how to >> store passwords in Postgresql, ... > > I just want to write a piece of C-code to generate the same string as > stored in rolpassword based on the roles password (and as I learned > added the rolname), i.e. how to generate md52f128a1fbbecc4b16462e8fc8dda5cd5 > from sisis123 (password) and sisis (rolename). And this, not to brute > force credentials, but to understand the hash. The way Postgres does it: https://doxygen.postgresql.org/src_2common_2md5_8c.html#ad1cda4632643f79bbb60f0466fec0e41 > > matthias > > -- Adrian Klaver adrian.klaver@aklaver.com