From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#58472: [PATCH] Make `message-unique-id' less prone to collisions Date: Fri, 14 Oct 2022 11:22:08 +0200 Message-ID: References: <87k054qq7b.fsf@rfc20.org> <87h707r8at.fsf@rfc20.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3434"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 58472@debbugs.gnu.org, Paul Eggert To: Matt Armstrong Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Oct 14 11:23:37 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ojGum-0000hq-SA for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 14 Oct 2022 11:23:36 +0200 Original-Received: from localhost ([::1]:40642 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ojGuj-0006LP-W7 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 14 Oct 2022 05:23:35 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42290) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ojGuE-0006Id-R3 for bug-gnu-emacs@gnu.org; Fri, 14 Oct 2022 05:23:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36700) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ojGuE-0005x6-Il for bug-gnu-emacs@gnu.org; Fri, 14 Oct 2022 05:23:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ojGuE-0002Be-DJ for bug-gnu-emacs@gnu.org; Fri, 14 Oct 2022 05:23:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 14 Oct 2022 09:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58472 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 58472-submit@debbugs.gnu.org id=B58472.16657393398299 (code B ref 58472); Fri, 14 Oct 2022 09:23:02 +0000 Original-Received: (at 58472) by debbugs.gnu.org; 14 Oct 2022 09:22:19 +0000 Original-Received: from localhost ([127.0.0.1]:35771 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojGtX-00029m-E5 for submit@debbugs.gnu.org; Fri, 14 Oct 2022 05:22:19 -0400 Original-Received: from mail-oa1-f49.google.com ([209.85.160.49]:39575) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojGtS-00029H-Kx for 58472@debbugs.gnu.org; Fri, 14 Oct 2022 05:22:17 -0400 Original-Received: by mail-oa1-f49.google.com with SMTP id 586e51a60fabf-1322fa1cf6fso5191171fac.6 for <58472@debbugs.gnu.org>; Fri, 14 Oct 2022 02:22:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=5+S4ELI1DP/RC+MDPstKg/ANgfNqztJ5UUQawL9T3JM=; b=LQzL1EfRNXMjzVLOuSdPVIrgD5ToDQtkb1egGCKW+5xgbtmxchENwER5OgL+mVQWhO 9muUJH4jEyibEUjoRYgIzp25TYALWXOOuoJiFPTKAlyhFC+/gdfPrmU3q/dnxI27ouOf hKFLVxCkDWN+GDCK9HoMijk4Ow1v7ERpz+MZbRteQf5jpRIkhfMD5S29B2vc8swk0kbx LX2cS5tTyXnKympRnkoTZ9OOZPhXlWkyr85RGGjOsflIBGT9t4MSSxKmdIUnje1/surV cyvunc1VpWl88jOGqtCN2V5PdUrxWKq6rEuoUgYUnoKShEquTY8yxmONi1xFZPeVq2Am EpBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=5+S4ELI1DP/RC+MDPstKg/ANgfNqztJ5UUQawL9T3JM=; b=yYQV5BucQPL4iJPcklkCa7Arb6p7n42d/S40Ykrue95AK57LBlvZ0idGaIZWNl6nrl PSWiZbSnds5h73RQ6KGgsMoQbqyLIJ71Wni0OONczgogQNbkiWVjAl8X/Yig1kV5Kdio boZ0rzdeCNOLUdyEUncMBmSXIQGj6KALtZo0yGUz6tUd+2a0LySQ2Y5vHKoFVvUngmid YtRsCMsCJKs1JY5gPAUADl8SZhRqOnWDxXXt+2F1ZnAr4RplFx19He/d+SpHV+VC0yHE MwXA4DW+ajFypOfnkDOX2XW12loMyUMmOHR4TZPC0Akg/rmFhB4rdJu0Jahy8YyjpHss mqeg== X-Gm-Message-State: ACrzQf1TyYAfoxma84THuuKLLMSRd48Kvohbxo4KvYnaGqhsdNPk2Ken uNP0eHN5HWZpkx1numF0s0mVl1Qj0CFXbcyZgP4= X-Google-Smtp-Source: AMsMyM6soNyQURF1Z0fVMF81RaVxMpjZxY2+6reSQHA/a44dRmCh2XgFNfbrtSgUH0mr+mT+jC4H+enVZkhaSBuipr4= X-Received: by 2002:a05:6870:9126:b0:132:b724:e96c with SMTP id o38-20020a056870912600b00132b724e96cmr7957331oae.199.1665739329199; Fri, 14 Oct 2022 02:22:09 -0700 (PDT) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Fri, 14 Oct 2022 11:22:08 +0200 In-Reply-To: <87h707r8at.fsf@rfc20.org> X-Hashcash: 1:20:221014:matt@rfc20.org::JYfkTujJFnjoC8I/:2USo X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:245387 Archived-At: Matt Armstrong writes: > Inspired by https://nullprogram.com/blog/2010/05/11/ and the code linked > there (https://nullprogram.com/download/uuid.el) I came up with this: That's pretty neat! > One question: I'm not sure that (random (exp 2 512)) actually gives more > entropy than a simple call to (random). It depends on Emacs' RNG. Last > I checked there was code still calling something like rand(), which > generally not intended for this purpose. Ouch, indeed. I think we should use the stuff Paul pointed to, which AFAICT just punts to Gnulib.