From nobody Fri Apr 29 23:12:13 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 628291ABBE14; Fri, 29 Apr 2022 23:12:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KqpCy0BDQz3w1y; Fri, 29 Apr 2022 23:12:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651273934; h=from:from: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; bh=melC3552uUea55plGwbe8i8gyJlqVup+G9QYYeo2pQA=; b=nze2iVnV8UMidiOV/zR4F5Mf2nnmmUY6atbFmS3M6vDmMF+Hx4tTaHwVBoDtAgDOLTj9YY ldisl1cFvF9f8u4uC7qetI8oL26Dx+g4TLIujv5uG+hE1dqeNHNBFpta50lOcsrL9muy6d Qemo4m9sGzJJ73dKsnaiwxoH+463YeHhMvdPPOSOK07ctJkBl6Fk+0c02Yy9flvEEq0IpC NorISMpySGq7gBiwMdPC/4MK2lUwUwhQ5gtEYm5cZpQY0Icixl/ZIDUI3L2/JgOpCfcSQJ kgPJfyFBZMSxhjZY03nH2Ct8vOqo/Knm0uRvVUHLKFCx0eyd8UzMeVz725gGYw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ACA1815DFB; Fri, 29 Apr 2022 23:12:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 23TNCDe4044367; Fri, 29 Apr 2022 23:12:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 23TNCDhk044366; Fri, 29 Apr 2022 23:12:13 GMT (envelope-from git) Date: Fri, 29 Apr 2022 23:12:13 GMT Message-Id: <202204292312.23TNCDhk044366@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: bac4d5138e3b - stable/13 - crypto: Define POLY1305_BLOCK_LEN constant. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: bac4d5138e3bb1b16c5f88a29011e217d054600f Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651273934; h=from:from: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; bh=melC3552uUea55plGwbe8i8gyJlqVup+G9QYYeo2pQA=; b=HDp6Dyo0EzyGW0PHt8QBliGtgt3VhJMgyQH3EhyE1Lwaj5vChTRHTGsG6qdCSd26h7Kmu9 fStjbAr1SNC00VnFatOGuWzqgMOsKW3WeFnrC3OqCzd6aYi386F63Rt1IkmuMCE0x3z3hD MSd2y2oeo5/PyLMx4pWQOGPynDeO6XkZ7wcAQ/L15LQGr8MTYgjtP8srZnDV1wta9aS7fr 1aZQgFZdvalyGEm2BOMUfyIX7Ty3dANGjelCJOijrWL8pgW1YEoQA7fJiCz0E42PPS3WNU yuYT+t+TS9GX5mQ3g5OYM7dJQXnPF/X8GjF8o51lU1ZhI6k7mzWl2w6ga/r9Vw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1651273934; a=rsa-sha256; cv=none; b=ZgSZVG9AVscQm6DD7VJbpHNrsWLWNUBFuZfdlEUBv+ijvh7KbEi4cfNK+8gmKBPyvYfHt6 w9flS8GHjV5Kc1xTm+oEUUbSoboY50jD1KLdO70cQxsaqef9Ohg9vTzd+BgljvGeDpNcuh TSZZ9hMmDeJQXzl7l6c9K33HJK9jku3gG/eWIBwAHGHNJ/QRodjeEjXqZIJDD/bZjj98lw XWuZYdf7iKcllfkY99rbKpm/9Qp06k9f26HvmaMCp1ofV9ooFr7YKqVHxVQByeTBpsbqnE yHw3qmM7mxjy5TtMra4fvP8lDb0QBKwWMQDdWA/4B89VJu+859XZ+22Rligq+g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=bac4d5138e3bb1b16c5f88a29011e217d054600f commit bac4d5138e3bb1b16c5f88a29011e217d054600f Author: John Baldwin AuthorDate: 2021-12-16 21:47:16 +0000 Commit: John Baldwin CommitDate: 2022-04-29 21:09:17 +0000 crypto: Define POLY1305_BLOCK_LEN constant. Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D33485 (cherry picked from commit 47fc04958562e3a1fca06f9321f89bea3d1dcab7) --- sys/opencrypto/cryptodev.h | 1 + sys/opencrypto/xform_poly1305.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/opencrypto/cryptodev.h b/sys/opencrypto/cryptodev.h index b127f4ee6b38..db17e8d2d3b7 100644 --- a/sys/opencrypto/cryptodev.h +++ b/sys/opencrypto/cryptodev.h @@ -95,6 +95,7 @@ #define SHA2_256_BLOCK_LEN 64 #define SHA2_384_BLOCK_LEN 128 #define SHA2_512_BLOCK_LEN 128 +#define POLY1305_BLOCK_LEN 16 /* HMAC values */ #define NULL_HMAC_BLOCK_LEN 64 diff --git a/sys/opencrypto/xform_poly1305.c b/sys/opencrypto/xform_poly1305.c index d8ceab47deca..374ab3c68cbb 100644 --- a/sys/opencrypto/xform_poly1305.c +++ b/sys/opencrypto/xform_poly1305.c @@ -14,6 +14,7 @@ CTASSERT(sizeof(union authctx) >= sizeof(struct poly1305_xform_ctx)); CTASSERT(POLY1305_KEY_LEN == crypto_onetimeauth_poly1305_KEYBYTES); CTASSERT(POLY1305_HASH_LEN == crypto_onetimeauth_poly1305_BYTES); +CTASSERT(POLY1305_BLOCK_LEN == crypto_onetimeauth_poly1305_BYTES); static void xform_Poly1305_Init(void *polyctx) @@ -64,7 +65,7 @@ struct auth_hash auth_hash_poly1305 = { .keysize = POLY1305_KEY_LEN, .hashsize = POLY1305_HASH_LEN, .ctxsize = sizeof(struct poly1305_xform_ctx), - .blocksize = crypto_onetimeauth_poly1305_BYTES, + .blocksize = POLY1305_BLOCK_LEN, .Init = xform_Poly1305_Init, .Setkey = xform_Poly1305_Setkey, .Update = xform_Poly1305_Update,