Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp796990ybm; Tue, 21 May 2019 03:48:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqwTqo1s/a1qwl45Oz8WeSrROH2hP3HPvLH1baH3otmOLHg6CYbysklyE3+XNczvTEZZgsVe X-Received: by 2002:a62:e718:: with SMTP id s24mr344356pfh.247.1558435713159; Tue, 21 May 2019 03:48:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558435713; cv=none; d=google.com; s=arc-20160816; b=B4JJaLjvIggbTKRlX5MPI14C2pGKqP1Di1ZX189sJMvcGtOzEC4syEIPR2m7w4HcEY l8LuyhXTNJmAv0Bilpijb8IL/EuOFXFPtnCzQAQvYMhMT39PfJlnNwBJcQeLHS+dk4Os J8F8fEQLSwTjplkOEZy6W3OZwPuycTVyqVdoOktF6U6B3TLnQ38jxbN4o86HFfiyur8f eaoodpfOJTW6MLdJYyvEavBu2+YUQRBhLO6U+ikptEYkNBYV75qWSIJXcHow9xKI9GzS vd0j/hlMANoZ4jPNMq+jSR9+y8xKKfeNe14nBiPA/xE8q6f+/CLCFYcH9tE+kBOTa3J5 PQyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version; bh=bFrJ77u6RBwTW3dPG3Fg3RoazLFbQOyzHxd3Z8lV1z8=; b=xeuJL2VRwasI1q+Z0dytkjbWewOGT3Qt/UT4gWn9yDbDbUeKy4hCM0opOrkeGdqHgT /JElk6rbnjvB7ezUvLbmFVDVy5jicjvmhsTbNU2dUSiv7o6BZcLXC3P0suoaZfN1FDy3 KzKyQNHdHsnlVMMVxON9Nx60s4FfZjXoaJuWk8BWpMisJr21ecflC6rO9O76SFNaGvSx 4uEjk+Rh2v1sogZtEFrtnz2iy5ePu1IVywIdjHV2zef0hXDIMImJXMxV618ZSXGgnPYo JSWBgAmxdltffYRCK0AdzxqlQUqW6czleeqJEe/HH0jqWTctAJETkTmntjsbTf7YGdeI 4erA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h4si19493935pgc.298.2019.05.21.03.48.11; Tue, 21 May 2019 03:48:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727534AbfEUKr1 convert rfc822-to-8bit (ORCPT + 99 others); Tue, 21 May 2019 06:47:27 -0400 Received: from coyote.holtmann.net ([212.227.132.17]:42192 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726705AbfEUKr1 (ORCPT ); Tue, 21 May 2019 06:47:27 -0400 Received: from marcel-macpro.fritz.box (p5B3D2A37.dip0.t-ipconnect.de [91.61.42.55]) by mail.holtmann.org (Postfix) with ESMTPSA id DA314CF16B; Tue, 21 May 2019 12:55:42 +0200 (CEST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: [PATCH] crypto: af_alg - implement keyring support From: Marcel Holtmann In-Reply-To: <20190521100034.9651-1-omosnace@redhat.com> Date: Tue, 21 May 2019 12:47:23 +0200 Cc: linux-crypto@vger.kernel.org, Herbert Xu , keyrings@vger.kernel.org, David Howells , Stephan Mueller , Milan Broz , Ondrej Kozina , Daniel Zatovic Content-Transfer-Encoding: 8BIT Message-Id: References: <20190521100034.9651-1-omosnace@redhat.com> To: Ondrej Mosnacek X-Mailer: Apple Mail (2.3445.104.11) Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Hi Ondrej, > This patch adds new socket options to AF_ALG that allow setting key from > kernel keyring. For simplicity, each keyring key type (logon, user, > trusted, encrypted) has its own socket option name and the value is just > the key description string that identifies the key to be used. The key > description doesn't need to be NULL-terminated, but bytes after the > first zero byte are ignored. why use the description instead the actual key id? I wonder if a single socket option and a struct providing the key type and key id might be more useful. Regards Marcel