From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 82rxFHobbGFiHwEAgWs5BA (envelope-from ) for ; Sun, 17 Oct 2021 14:47:54 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id CEcKEHobbGE3aAAAB5/wlQ (envelope-from ) for ; Sun, 17 Oct 2021 12:47:54 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id E0C3C12FD8 for ; Sun, 17 Oct 2021 14:47:53 +0200 (CEST) Received: from localhost ([::1]:60968 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mc5Zx-0004YM-2o for larch@yhetil.org; Sun, 17 Oct 2021 08:47:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35440) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mc5ZY-0004XS-FO for guix-devel@gnu.org; Sun, 17 Oct 2021 08:47:28 -0400 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]:44718) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mc5ZV-0002AR-NI for guix-devel@gnu.org; Sun, 17 Oct 2021 08:47:28 -0400 Received: by mail-wr1-x443.google.com with SMTP id e3so35611859wrc.11 for ; Sun, 17 Oct 2021 05:47:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:subject:from:to:date:user-agent:mime-version :content-transfer-encoding; bh=nhk4oh2GGz0TNY1JUfntrImVVNYBXD5SLMLOmwCcXgg=; b=Jy+YF4HY+20pTqRBnsfSAwVCSwKqvvryxibpuGH8yVG80+rsfAH4wJhehk/+7Q2Pmr uL9K5/dw9XT+wTe7RsPGtscksDs/YIrRORboyEtK8a9MzAwnV96s0AhfHxzgKfsijoi7 oSWP5oR5rVEIGSHXAITlDoEydi9H8jjHLsI/vb+T3HrPXpPx8baQHokMRcft5N7vPVqq kEtHFChSkNWNGuvtf77ZQO1MZPvSPjfWebiSw5m4IIkTWmzQTBwwEwkz+aXNSafjXHH2 2LDLF6a2e6dGm1d+PL8WL5CraPletKcDLZxN7ZETAh1NDPMADdoYXYNT4LAUsecncc5n Bvcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:date:user-agent :mime-version:content-transfer-encoding; bh=nhk4oh2GGz0TNY1JUfntrImVVNYBXD5SLMLOmwCcXgg=; b=dpHaLZGklW41fj7AeL7anIJzMvpjR0ZxQ/l39FhI4DSJq259K6hZuuHLplgKf2Bn29 d2hN7D/S05BNYpzdWkHqJ0qyjG6CuyVOu+yDaJseR/Tp3He1fGLe2/6dN2yf/IPVqaFX rA/YO975cfXxqQigOil0M92qGvsQ4tEqN+vv4RobTJtKamMaErV+LdsVkiHAnYbJgpce uKJ3eBD57nqLj/lCtUAkL0Stlxtmq/5oXf2+XrBKRSRpomC8D3gyAX5CLjveeytuPgdb 1mbXqsVntCFSXe++SooFMwhlYB60N7on7rgC5ID4IPmIeVpsjfkYNH2PRcQpXx2rDWqi 6ltw== X-Gm-Message-State: AOAM532pNp0SLWdqX4PdaWJXIABY5lhyPLD9ar6fEJesbjlJhjEzMXtv 182/+2CrQjs4WuSxoBmI5Vu3V8HFg2WWSg== X-Google-Smtp-Source: ABdhPJwp16u1H7qc5bK/7eE3cL1EqwdBVLQdEAakosfsqTNFDaa+bApcx1+ViIDGDhpP8cqz+N5IQg== X-Received: by 2002:adf:f8c2:: with SMTP id f2mr28954945wrq.234.1634474843538; Sun, 17 Oct 2021 05:47:23 -0700 (PDT) Received: from nijino.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id j1sm10265883wrd.28.2021.10.17.05.47.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Oct 2021 05:47:23 -0700 (PDT) Message-ID: <5f7e587c376ed0abffa321152e185cbf4014e05b.camel@gmail.com> Subject: Using G-Expressions for public keys (substitutes and possibly more) From: Liliana Marie Prikler To: guix-devel@gnu.org Date: Sun, 17 Oct 2021 14:47:21 +0200 Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=2a00:1450:4864:20::443; envelope-from=liliana.prikler@gmail.com; helo=mail-wr1-x443.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1634474874; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=nhk4oh2GGz0TNY1JUfntrImVVNYBXD5SLMLOmwCcXgg=; b=mZvraeS2vFGj4wVN0tixWoXkJWGGUJgabK7kzMQ3cvCVywiQyeo0Tpf8MhMhH/gus74c3g wn00bdDF5um5oFTWeKh48Co2ckH6fxCOHWGob6PnWDryQ4FAIzhDAxGRwLqFzoo8FOFf8J ptzHhbcPvblLpGIGKw79FPACo4noWOQ5r1PkMqmQu4FYGtBKVLj7BXmUQijb0s3j6k6QaO e05XZU1qJCP975XRNJQiNu1DBOONWOK6EnDzNH84BmfIh5ZcV25uEHstiEBvxnHoBF4l9f 9oCIs1SfrYEl9+GX7nn9iJy/RTeU3tYpjCqZXsAGPvaITSP4zIWqmVewJM6x4g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1634474874; a=rsa-sha256; cv=none; b=lqc3m7751zWF3AYgo/t8i96lfVc+JgpPpUGqqBb4p8Hj393LtXySdIO0NE41yda7/mVXZ8 2UjyXqb53QWkcERNSitXS8HiWBo+Kqhe8vbGYHDj4eDNhoSYh3tIxBkmLQLPeF5BuDBcIE iFbmntpZi+cdBbtv0yolD4ozXjDHVtpG2yFW2t8TGJ4++vRGZL+DIWd3B9wyvTmEl2UNEF BlKZmFc9bw4/+OLry7+Dl8T1GIOa6so7TsCtZLR8BdCcCKubGzGC1MptnDCQLnQIOdGJme ODkAHOBlioof2BwFzEphtIhv09ENEDu5jeuyOiwbaQJdHM4tobxIPpWygxmuxQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=Jy+YF4HY; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Spam-Score: -3.12 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=Jy+YF4HY; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Queue-Id: E0C3C12FD8 X-Spam-Score: -3.12 X-Migadu-Scanner: scn0.migadu.com X-TUID: 7qRKRDIIGLMC Hi Guix, let's say I wanted to add my own substitute server to my config.scm. At the time of writing, I would have to add said server's public key to the authorized-keys of my guix-configuration like so: (cons* (local-file "my-key.pub") %default-authorized-guix-keys) or similarily with append. This local-file incantation is however pretty weak. It changes based on the current working directory and even if I were to use an absolute path, I'd have to copy both that file and the config.scm to a new machine were I to use the same configuration there as well. However, it turns out that the format for said key files is some actually pretty readable Lisp-esque stuff. For instance, an ECC key reads like (public-key (ecc (curve CURVE) (q #Q#))) with spaces omitted for simplicity. Were it not for the (q #Q#) bit, we could construct it using scheme- file. In fact, it is so simple that in my local config I now do exactly that. (define-record-type* ...) (define-gexp-compiler (ecc-key-compiler (ecc-key ) ...) ...) (ecc-key (name "my-key.pub") (curve 'Ed25519) (q "ABCDE...")) Could/should we support such formats out of the box? WDYT? Regards, Liliana