From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Add support for base64url variant Date: Wed, 12 Jun 2019 17:50:11 -0400 Message-ID: References: <87pnobiglo.fsf@killashandra.ballybran.fr> <83r28p57jp.fsf@gnu.org> <87zhnd55eq.fsf@killashandra.ballybran.fr> <83mujd54qv.fsf@gnu.org> <87lfyr4p49.fsf@killashandra.ballybran.fr> <834l50pk1p.fsf@gnu.org> <874l4wt1dn.fsf@killashandra.ballybran.fr> <83sgsg7yln.fsf@gnu.org> <87blz4nelr.fsf@Rainer.invalid> <87pnnihaiw.fsf@Rainer.invalid> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="256634"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jun 12 23:50:42 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hbB8j-0014fH-PG for ged-emacs-devel@m.gmane.org; Wed, 12 Jun 2019 23:50:42 +0200 Original-Received: from localhost ([::1]:35142 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbB8i-0000Lf-Rf for ged-emacs-devel@m.gmane.org; Wed, 12 Jun 2019 17:50:40 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40171) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbB8P-0000Ij-Gj for emacs-devel@gnu.org; Wed, 12 Jun 2019 17:50:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hbB8O-0004Hl-Hz for emacs-devel@gnu.org; Wed, 12 Jun 2019 17:50:21 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:27726) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hbB8N-0004EI-70 for emacs-devel@gnu.org; Wed, 12 Jun 2019 17:50:20 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id D05B144375A for ; Wed, 12 Jun 2019 17:50:14 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id AE3C5443757 for ; Wed, 12 Jun 2019 17:50:13 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1560376213; bh=oSB+YoOComCnHkwL0T1Xb/3HCmNwjNoTMO50KhQeOvY=; h=From:To:Subject:References:Date:In-Reply-To:From; b=PGFmKxyo8GWH+3WRV+a/K57jecuPoy/TiOpRaB3Qdx95QGqiaX3oLDmzILiWSRJV6 0J92w8FLAEe3Sd7iIuJ3oHRzQrGWgt9HUn3rLo1YZqIB0Lq+opY8/KFoHTjQYdbBhX LrHCLz/woorgllNMYqOaJWYmCNSI2D7ro9Qz9DirfP9/RMd37XnkzGekpTTWYRMENa 8lLPpQ8/WyvUxg+j18eTbzv2oHWVvoqJ7itvpCbfJBytr+Ew67FtbI30zIz2yl4A2+ Qr3hDaGHf0+etJMqje/LSLnixCAGJDnKsNGnSp35m93HtZ0SEB3zG2Bho9Ljtj64B/ tpF1goFLBTJXA== Original-Received: from alfajor (cm-84.215.66.78.getinternet.no [84.215.66.78]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 4F461120921 for ; Wed, 12 Jun 2019 17:50:13 -0400 (EDT) Cancel-Lock: sha1:fia6oevX9384sId4GR8cp2lkQk0= In-Reply-To: <87pnnihaiw.fsf@Rainer.invalid> (Achim Gratz's message of "Wed, 12 Jun 2019 21:24:39 +0200") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 132.204.25.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:237463 Archived-At: > I've used it for sharding into a blobstore on NTFS/SMB (two characters > for first level, so tree width of 1024). The key is indeed a hash > (SHA512), so the probability of a collision would be low enough to just > ignore the case (for only 512 wide tree), but it felt cleaner to encode > via base32url instead. Ah, I was assuming a hex representation of the hash. In that case, using base32 is basically an optimization that shortens the filename by ~20% [ Using base64 would make the hash a bit weaker and shorten the filename by ~33% instead. ] Stefan