Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp333160rwe; Fri, 14 Apr 2023 03:40:52 -0700 (PDT) X-Google-Smtp-Source: AKy350ZUjeYwfHVaGS9w+b5YZYsUE6haZG/CHAuz31Go8eGa9eUFhzZs2kPkb6lANS68b+J9EetE X-Received: by 2002:a05:6a20:440d:b0:dd:dfe4:f06a with SMTP id ce13-20020a056a20440d00b000dddfe4f06amr1944750pzb.3.1681468852618; Fri, 14 Apr 2023 03:40:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681468852; cv=none; d=google.com; s=arc-20160816; b=wFpL1bNafgkOLWmkZ+dOXOpy7TMuBuCdaKvO24E+7K6sXhqCO9qm5KSsUHB/aZBqmP sAmz3PL4GTubHSJ1BltwbT9VeLml90O7iXqOFH6FA6mWyX97ipoHeWRWrnA8eKR910Au qZgBkY8II9C2QCq8aWsF2Z4AZQehUjAnlTnxFVK3Fuv7RofVD+to5YIx3S3K8PlcMz0h kB1SM9uP2ABw7r5WmV172eS7LbpAjVTdg9Qb9SdTpFC2tdgXkm7Ike/nBprSF+LZyDt+ JVU676/fIl4yvwPYwKl5Xdv1i/idPO7P+06z7tZ/I71Tbwh1TeYXwXLBLCpB/qWQyeih 3XNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:content-id:mime-version:subject :cc:to:references:in-reply-to:from:organization:dkim-signature; bh=8ImxfDW+HI+T5Uzz+n0KuVu+0MYLKcnnAu5eKOGRaY4=; b=DnKa+qVxNvEnzvOC65xC3xpFSBuzKTrCSHmQClC3GV6h6997XBWg440E3WRsKRGWvJ 43NRZ9swAoT6lHwfoiXpseetS1bHGZcXdA+sDMarCGRnWfqepKRiCJHbakeOcLFgLAxG t7bzFwiq0f2ffIpH3miWT1KY6AfblxnGVioxQgb0dtsoOgq1PXW9syBPRVmyybkkzMm9 sY/M2BPdNZLtePBfd3b7T+mYPIUoYBfWRf+6h/3Q7HYJbebii0BHd2dxsPzcu8cIEv6Z 3w/v8YhiXSTGQep0z/UU/QVzxcJw0k99Cjeoek8Rvl+yec+ZROEXxnEw9tKIwvYFL649 +h2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=IIyNfRza; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h24-20020a63df58000000b0051b54dccff6si3261487pgj.727.2023.04.14.03.40.23; Fri, 14 Apr 2023 03:40:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=IIyNfRza; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229826AbjDNKfo (ORCPT + 99 others); Fri, 14 Apr 2023 06:35:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40236 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230305AbjDNKfc (ORCPT ); Fri, 14 Apr 2023 06:35:32 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1FE2083DB for ; Fri, 14 Apr 2023 03:34:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1681468484; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=8ImxfDW+HI+T5Uzz+n0KuVu+0MYLKcnnAu5eKOGRaY4=; b=IIyNfRzaTJDHKz1No5I5FE6LmrBAgW7rV3PknUCSpCp8PwRx94lIMXVJTbOAvPp6LBJ1NS BPgf47ZmWuTwnflANjhjAuKa+C4YJGJQVaTNY2Lxc8CZvJvWXh4SRLCvbQb/ABMoolPIud q4NE1o1hfEGuumIm9gk9e8VJGi61ORw= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-74-F1ZtuOGaPJmDkvsIVXNVDg-1; Fri, 14 Apr 2023 06:34:39 -0400 X-MC-Unique: F1ZtuOGaPJmDkvsIVXNVDg-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A4D35281723B; Fri, 14 Apr 2023 10:34:38 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.33.36.5]) by smtp.corp.redhat.com (Postfix) with ESMTP id B82E61121320; Fri, 14 Apr 2023 10:34:37 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: References: <48886D84-1A04-4B07-A666-BB56684E759F@oracle.com> <380323.1681314997@warthog.procyon.org.uk> <1078650.1681394138@warthog.procyon.org.uk> <1235770.1681462057@warthog.procyon.org.uk> <1239035.1681467430@warthog.procyon.org.uk> To: Herbert Xu Cc: dhowells@redhat.com, Chuck Lever III , Scott Mayhew , Ard Biesheuvel , Jeff Layton , Linux NFS Mailing List , "linux-crypto@vger.kernel.org" Subject: Re: Did the in-kernel Camellia or CMAC crypto implementation break? MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1239685.1681468477.1@warthog.procyon.org.uk> Date: Fri, 14 Apr 2023 11:34:37 +0100 Message-ID: <1239686.1681468477@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Herbert Xu wrote: > Interesting. Could you outline how this new interface would work? I'll write up an API doc for my code as I have it working and post that. > And have you looked whether the aead interface could fit into your > model? Do you mean use the aead API rather than inventing my own? Looking at aead.h, there aren't enough bits in it as it stands: struct aead_alg { int (*setkey)(struct crypto_aead *tfm, const u8 *key, unsigned int keylen); int (*setauthsize)(struct crypto_aead *tfm, unsigned int authsize); int (*encrypt)(struct aead_request *req); int (*decrypt)(struct aead_request *req); int (*init)(struct crypto_aead *tfm); void (*exit)(struct crypto_aead *tfm); unsigned int ivsize; unsigned int maxauthsize; unsigned int chunksize; struct crypto_alg base; }; In krb5, for encryption, there are two keys, not one, and no IV to be passed in. The code I have will insert a confounder and a checksum, which must have space allowed for it. David