Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp2494235pxy; Mon, 3 May 2021 00:58:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxI49+RGwd3IXvDoBX9PVH/ShzsgCApZEJi2FFCIZ17+1V4lG+K2WrovYFNTmsjvv49um59 X-Received: by 2002:a17:902:c412:b029:ec:c89f:ce31 with SMTP id k18-20020a170902c412b02900ecc89fce31mr19104083plk.54.1620028697710; Mon, 03 May 2021 00:58:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620028697; cv=none; d=google.com; s=arc-20160816; b=XCKZmcklouLninTG0+fj0mMglk+BGXOEpnJr3jzM8q9/JgSZ3mtLB/UAi7M9oSiAO0 C97hIRwZgc9qmbDI3D4dxGJrvQAhIQhU2HJ6/yoQGQE/HTo0VCB2gQS83JvM9d2+FThC NdYeI4jrn9eIq5G/zvj0y/XxcyUzLwL0W7mZOMfG3gkTEsA6o9ZYrl2j+7WQ3Rj70DfI 8lBKjZvX6a/6KBMWYCcoa/OBBUKfPtAkg0t4o+Ta4w8gOljzQWVWhOo83lUVvSp/o+Ss 1jG3rtGnO6+fYrvS3zLHRb+ItxtYXNnAeq8NbyLxPncK3YlF5wptZtMtZr7odF/+zTXs umKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:subject:message-id:date:from:mime-version :dkim-signature; bh=f/I8crA6XyQMlGZyflnFllaw+4mke1a81RQOyGK/4Q0=; b=jYCnHAr3IHsFR56/EXn6RJ0GHi4Jz8zICIu40y8SvruXfS8FahIk9x85QLKQDRwSXa dVh3TxzxugjGC0awdR1Yv3AnOAKTzjgUmfACWF1ITHn1otnPOA397ypA1eNcMVQ5t7Fj VDtvMfWLkU6EbYS2IrWgVFEZv1BDizouBqnkja60y30FaHgrylLSDNQNCiNdN5I4yKET gnV7zUmsXGn/wD2qNLenE8WEqOy4madDPLz7aD1W3dghZ+7jMp4mPZbSZjSy7vHIgdPT lwAPrZNDtvKNIXgJ7jz5dJTPOh0gSHucEWIi9GGMjUWlw6aw9/8ewdGYl/pBeihn4kcn NjdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=pRa5Vdjw; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s1si12978578plq.245.2021.05.03.00.57.56; Mon, 03 May 2021 00:58:17 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=pRa5Vdjw; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232979AbhECH6A (ORCPT + 99 others); Mon, 3 May 2021 03:58:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47526 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232972AbhECH57 (ORCPT ); Mon, 3 May 2021 03:57:59 -0400 Received: from mail-qt1-x844.google.com (mail-qt1-x844.google.com [IPv6:2607:f8b0:4864:20::844]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 416CBC061761 for ; Mon, 3 May 2021 00:57:06 -0700 (PDT) Received: by mail-qt1-x844.google.com with SMTP id z5so3079868qts.3 for ; Mon, 03 May 2021 00:57:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=f/I8crA6XyQMlGZyflnFllaw+4mke1a81RQOyGK/4Q0=; b=pRa5Vdjw8OkcL5+KzBwx7yDLiyHNcNSZpWxfWVYiPRdsOIl/yT7tShaMCvI6Mblsai TBHqeEAPB+YbMJDbA2KxCvd+vJ3y8H1iM/pOAs7miw05Rs6svZ9+xSkYCVdiWyt5Rz5d cJ7dul62EcoxHVnsHtv9lpN4GA7bSkLhK7GM3+Cf5tiKUkN0M037T6zy9uewuOTsGshB C7eAdCsV58+ZoNW5W5p7YG7YVmsRfLVvOI5QzmOOD5Y/Q0jO18BRcIdkbj5veEJK/nTH +hGtoYCusdsNST01R3ztLDiu7zbrIcHg8PEYC5MalOmwdFkl5AGESn9h19akpOpI+tWe wabg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=f/I8crA6XyQMlGZyflnFllaw+4mke1a81RQOyGK/4Q0=; b=XkcA1B5Esm83Lahg6l5UIAHcWazmfZMszS1PqcN2HRNZZd9ut1zWIK8flRPkNpLwzQ F9cYqUvEVZEoRMd4RSNde3i8xIhx3sPK2GbLmhTU3m630CbHmXh6VBlKbAY96ulagopn lMxJRRUQJ2KPGxOZzfG0C0x0VPpvZhyT20tOJxsDpcbaK7nojk8msjatwg5f/geKYjFi YbJYsbf0NaWJysevQvsaP+mwzNSEmNudXAd6yt+pZH5QDSbDbM3gPogwlLTUhIV50Jce sBxFZziA/waXFKdmiCOX83htUoo4g/w1AKYK41e6KFYmTqVWbXOPkqqH9xV0m7/jyi3w J+gQ== X-Gm-Message-State: AOAM533S+8dt9zrdeV9Aq5xmxSxkSraK47por9D85fOQPeTzd9Z2s0ZZ vKW0N/FlD9TzCyWUENgACO4ukoWLBwyUiqzxSNOCO4RytLnj6Q== X-Received: by 2002:a05:622a:1387:: with SMTP id o7mr9212517qtk.387.1620028625455; Mon, 03 May 2021 00:57:05 -0700 (PDT) MIME-Version: 1.0 From: Kestrel seventyfour Date: Mon, 3 May 2021 09:56:40 +0200 Message-ID: Subject: cannot pass split cryptomgr tests for aes ctr To: linux-crypto@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Hi, I am trying to update the old ifxdeu driver to pass the crypto mgr tests. However, I continously fail to pass the split tests and I wonder what to do. For example, I successfully pass the test vector 0 here: https://elixir.bootlin.com/linux/latest/source/crypto/testmgr.h#L16654 if there is no split. But if the text "Single block msg" is split into two 8 byte blocks (single even aligned splits), which end up as separate skcipher walks in the driver, the second block is wrong and does not compare correctly, to what is hardcoded in testmgr.h. Same if I try it with online aes-ctr encoders in the web. I have tried doing the xor manually with the aes encoded iv, but I get the same result as the hardware and if I use the next last iv, I still do not get the second 8 bytes that are hardcoded in cryptomgr.h. Can someone shed a light on it? Is it valid to compare a crypto result that was done on a single walk with 16byte with two separate walks on the 8 byte splits (of the original 16)? Is the cryptomgr test on the split tests expecting that I concat the two walks into a single one? If yes, how to do that on the uneven splits with separations like 15 16 5 byte sequences, etc., fill up the walk up to full block size and spill over into the next walk? Thanks in advance.