From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 752AB46B87 for ; Mon, 3 Jul 2023 23:51:08 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 96DF968C5BC; Tue, 4 Jul 2023 02:51:05 +0300 (EEST) Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 33FDD68C562 for ; Tue, 4 Jul 2023 02:50:59 +0300 (EEST) X-GND-Sasl: michael@niedermayer.cc Received: by mail.gandi.net (Postfix) with ESMTPSA id 591BD1BF203 for ; Mon, 3 Jul 2023 23:50:58 +0000 (UTC) Date: Tue, 4 Jul 2023 01:50:57 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20230703235057.GQ1093384@pb2> References: <20230702193010.11654-1-cus@passwd.hu> <54fe8899-d250-8d62-1157-621deb546040@gmail.com> <168841533190.542.8113031316523716543@lain.khirnov.net> <4b0740-7b32-415b-47af-3199463854b@passwd.hu> <168841859463.9711.12513000520212201640@lain.khirnov.net> MIME-Version: 1.0 In-Reply-To: <168841859463.9711.12513000520212201640@lain.khirnov.net> Subject: Re: [FFmpeg-devel] [PATCH 1/2] avformat/hlsenc: fall back to av_get_random_seed() when generating AES128 key X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: multipart/mixed; boundary="===============0741855072656305148==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============0741855072656305148== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="V2tfspbppmK1TQo2" Content-Disposition: inline --V2tfspbppmK1TQo2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jul 03, 2023 at 11:09:54PM +0200, Anton Khirnov wrote: > Quoting Marton Balint (2023-07-03 22:54:41) > > On Mon, 3 Jul 2023, Anton Khirnov wrote: > > My patch use av_get_random_seed() which uses what the underlying OS=20 > > provides, BCrypt for Windows, /dev/urandom for Linux, arc4random() for= =20 > > BSD/Mac. >=20 > IOW it's a jungle of various paths, some of which are not guaranteed to > be cryptographically secure. I see no such guarantees for arc4random() > from a brief web search, and the fallback get_generic_seed() certainly > is not either. Granted it's only used on obscure architectures, but > still. >=20 > The doxy even says > > This function tries to provide a good seed at a best effort bases. >=20 > > You really think that these are significantly worse than > > OpenSSL/GCrypt, so it should not be allowed to fallback to? >=20 > I think we should be using cryptographically secure PRNG for generating > encryption keys, or fail when they are not available. If you want to get > rid of the openssl dependency, IMO the best solution is a new > int av_random(uint8_t* buf, size_t len); > that guarantees either cryptographically secure randomness or an error. "guarantees cryptographically secure randomness" ? If one defined "cryptographically secure" as "not broken publically as of t= oday" Iam saying that as i think "guarantees" can be misleading in what it means thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The day soldiers stop bringing you their problems is the day you have stopp= ed=20 leading them. They have either lost confidence that you can help or conclud= ed=20 you do not care. Either case is a failure of leadership. - Colin Powell --V2tfspbppmK1TQo2 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZKNe3QAKCRBhHseHBAsP qzRgAJ4sU0xjMVsVIFQOzPx65VbbcnmVuQCfbj0kOWJ41bU8fs9VBUQ5r8SWjAQ= =pLxs -----END PGP SIGNATURE----- --V2tfspbppmK1TQo2-- --===============0741855072656305148== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". --===============0741855072656305148==--