Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1024351ybh; Thu, 16 Jul 2020 00:36:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy+J9nUn34YCJtFbADXhCnamUeC+QmYSPBR4JQgLSlh5U3Mv1dfrIoqmikTPYZX5AjqJCR2 X-Received: by 2002:a17:906:9147:: with SMTP id y7mr2323092ejw.399.1594885004640; Thu, 16 Jul 2020 00:36:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594885004; cv=none; d=google.com; s=arc-20160816; b=JtNq4vIoTlKka2P/na4AncglLmYLeoS9tCPVLibNHDP2gkbMD1a5GR6qwKITqhBEoj omNbyQG4ioega2zhaadp7gRacG2E4ndasLjMEnkXmk0zovDnmVtTFndvnGDuVIfHvgyV yrSIjWVFlC2iqni5GAaOJ+uFSQqa67gEUBReFxRrGkSsFzawf0R3rV3nh2JCov9HvQAX s2RoLsr7SNETyiA7ntZN9TJouYYPXELbJnteKEZVagI8CqDzw8YrCcTc3kTQolXmaZwc uVTjrqZZAR9bU4IpNcOtFJNSJqnYu05ewhu9GA45RnjVURGrCgKmgAJOc34f2+d1apOI GhKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=VdiMKo6i9u51zayKToVMtPShDZvsbnEa68ZygYpxW0I=; b=kDc+K0gSVVg/LOANKAZvrq8QZ7jHFAb3Q3gVAn+YTIrrBTMdoQhSeITol6zO+Tmi8y Xrh3M8K9g2gnFsNpfvK+cew9paD1Ic2Lh3orfPpG9XUtFfNpgfY8WPUt7xovbahLw+Rc uB4FeLSjznEjrFb/AtUzuADyfFPxoAgDMBSs7SZFlMJmGgFkt1UBayDuWH1zKieTOCmD JawtEXO4KokXuySXgCJojgB6MzV2pW7A+D1U1KB3vtXIWzCNtrdhHPacAuCUqDwLPaLE mpojItTPlPZIHzLw4PvfYkIdUusLuc6uFKvw/mQUzcgAzhZ5cyeFksgpRAbD3CmSwdaG Q6dg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v18si2764706edy.249.2020.07.16.00.36.20; Thu, 16 Jul 2020 00:36:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726069AbgGPHgS (ORCPT + 99 others); Thu, 16 Jul 2020 03:36:18 -0400 Received: from helcar.hmeau.com ([216.24.177.18]:39708 "EHLO fornost.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725921AbgGPHgS (ORCPT ); Thu, 16 Jul 2020 03:36:18 -0400 Received: from gwarestrin.arnor.me.apana.org.au ([192.168.0.7]) by fornost.hmeau.com with smtp (Exim 4.92 #5 (Debian)) id 1jvyR8-0003l4-CL; Thu, 16 Jul 2020 17:36:11 +1000 Received: by gwarestrin.arnor.me.apana.org.au (sSMTP sendmail emulation); Thu, 16 Jul 2020 17:36:10 +1000 Date: Thu, 16 Jul 2020 17:36:10 +1000 From: Herbert Xu To: Iuliana Prodan Cc: Horia Geanta , Aymen Sghaier , "David S. Miller" , Silvano Di Ninno , Franck Lenormand , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, linux-imx Subject: Re: [PATCH 2/2] crypto: caam - support tagged keys for skcipher algorithms Message-ID: <20200716073610.GA28215@gondor.apana.org.au> References: <1594591536-531-1-git-send-email-iuliana.prodan@nxp.com> <1594591536-531-3-git-send-email-iuliana.prodan@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1594591536-531-3-git-send-email-iuliana.prodan@nxp.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Mon, Jul 13, 2020 at 01:05:36AM +0300, Iuliana Prodan wrote: > Tagged keys are keys that contain metadata indicating what > they are and how to handle them using tag_object API. > > Add support, for tagged keys, to skcipher algorithms by > adding new transformations, with _tk_ prefix to distinguish > between plaintext and tagged keys. > > For job descriptors a new option (key_cmd_opt) was added for KEY command. > Tagged keys can be loaded using only a KEY command with ENC=1 > and the proper setting of the EKT bit. The EKT bit in the > KEY command indicates which encryption algorithm (AES-ECB or > AES-CCM) should be used to decrypt the key. These options will be kept in > key_cmd_opt. > > The tk_ transformations can be used directly by their name: > struct sockaddr_alg sa = { > .salg_family = AF_ALG, > .salg_type = "skcipher", /* this selects the symmetric cipher */ > .salg_name = "tk(cbc(aes))" /* this is the cipher name */ > }; > or for dm-crypt, e.g. using dmsetup: > dmsetup -v create encrypted --table "0 $(blockdev --getsz /dev/mmcblk2p10) > crypt capi:tk(cbc(aes))-plain :32:logon:seckey 0 /dev/mmcblk2p10 0 1 > sector_size:512". > > Signed-off-by: Franck LENORMAND > Signed-off-by: Iuliana Prodan Can this use the existing paes name instead of tk as done in other drivers? Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt