Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp2644132lqb; Tue, 28 May 2024 06:29:13 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWKL3QvgUDbAoRDMBBJoklVT1ZpwS8oi0cLvS0h34K4o3ZzL/vp10IKbxaHrtiLnKWu/Quxust10o5TJXhZN0ZVqETpOP93KJxPvSC3JA== X-Google-Smtp-Source: AGHT+IEunLMVsunetZ95MP67z5Sg/ntd+tp3o4wGmkJL1gDkGj6EoTJWRvPVIIDM6sQli5LLlt/u X-Received: by 2002:a05:620a:2902:b0:790:77d4:5e7a with SMTP id af79cd13be357-794a0963a11mr2609545285a.20.1716902953253; Tue, 28 May 2024 06:29:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716902953; cv=pass; d=google.com; s=arc-20160816; b=z3Hc8xSvDWJe0CtYvNqihxqYaWkRhICKZEYjTw0JP54wewFLs0KS6oSrNqshGRenfP 55n3tFFbMPipfgnsqAEi7GzilaCiXBioIRTPJKfxOXeOTduCYxpr9l6GrXw3mOo0iZNC +pX38Rzvndiy6+mmnyimyCPWeYR8ZGi2du/nmxkdgT8EQ0vyOh0gm7G87ru/BEdLpHuQ 8Uz7Sr0EKmKY6WwyawX7mI/xczs0xlWCywUGSFa7ugg4YoMQhrCpOnnAUY2gy5xYMWvu Bad1fy4sVBJ2/H5vV1fFWGVNuQPI8Xdg9gz6prehMfyFhppRJXGFyJR6MGcwdHpO+5Y4 oXrA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:references:to:from:subject:cc:message-id:date :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:dkim-signature; bh=RU9wwVaA1p4/xrrdnFocE58fMaOQl2BQqRMTlrePJJc=; fh=Rh65L1938T5aJQjoL/vrEo4eiLHgYx3Fmq9C0Z6d5F4=; b=B5ZW/a2yzQTLQkdfQQ0U+OYWp/YMXrIkdTVr4i0jQtcGzATdoLm7FNt+UTgx8awaS8 OuYwsYw0psM1R65tRU0GpMQETj5nPHOfgY7o8Tygui68c4eXc2p0u/CibXKDIjTzmfzi 2dpwaRM7vNRuw1sDKKapb1Z5NCv4Z4QMKH3YvdNjDNBHRny8OsJ+tGA0x+uGpvCWuiMQ msqzy2/dv1RsVLlB2IFEPDURIhGfZ74SzlVQk2iPGWoa5TTtikXT2LgdGbTDiYZCobtM fDP1eiNqhrbgG2jHwB5xuzppWcfRtdp/i14twYEaMX1aH+V1dXGMdkVD2u99IDboKcH7 ObiQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=H3IC5dJR; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-crypto+bounces-4454-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-crypto+bounces-4454-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id af79cd13be357-794abd5fcd9si1076593885a.715.2024.05.28.06.29.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 May 2024 06:29:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto+bounces-4454-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=H3IC5dJR; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-crypto+bounces-4454-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-crypto+bounces-4454-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id EC00A1C20B26 for ; Tue, 28 May 2024 13:29:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 82D5216F0DE; Tue, 28 May 2024 13:29:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="H3IC5dJR" X-Original-To: linux-crypto@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3EE4E1DFDE; Tue, 28 May 2024 13:29:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716902947; cv=none; b=dFbU/CsdpgVsDjezpXmc85V8NEjr2El3yEczfuhpCpQWPUb2mkvETSN4oUbvZBoKMtuYlG4PkNkRsi2dkDoTcmJ+NOGIG304SrV23Lo9dg+rmdUwyK31pUjTvC7dQx+/dlFefQ8dUBCTWyeHogBzoGsL8ll2Qf72W+oEU/HUpjw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716902947; c=relaxed/simple; bh=xyyTmTzN9d8hqo9iRE/ESmgFIUN4LB9umMa2nCS2waI=; h=Mime-Version:Content-Type:Date:Message-Id:Cc:Subject:From:To: References:In-Reply-To; b=F2PNTq0e9jfrXsytJRrAF8iN/7bX8xFfCZ8RNvFSeIpUmD3ymm1TaqvZ0B+URJ9kW2jQdYgFjPh2sgIprXRibTtUdiM8yAXZ47s7MxoKhR09QlrWiezPvZ2UI7UHb3xVOU8n1z/dULyAnPyb9M0dv301nrzVG7OvTcWQGMRgEyg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=H3IC5dJR; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7143BC3277B; Tue, 28 May 2024 13:29:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716902946; bh=xyyTmTzN9d8hqo9iRE/ESmgFIUN4LB9umMa2nCS2waI=; h=Date:Cc:Subject:From:To:References:In-Reply-To:From; b=H3IC5dJRl7xG89iDpASrt8tZba/beNU9g20FeAZl2g/h0uH/mKw9uPEYDp37YBLQ8 uHU9vl7Ou4ioTe0i2hq1xTz2WZ3rRXbyelwyvS9HxMftlXDkpwaM6Zwa3segTW6IU2 YQ8m4cBvkljr5eFAVfeEuA0y4CKrdma+12FNxhFSAjldN5HnM3mOhYecpZwHCAZiJ9 cN/5JZsLtPVDyT9p5vZaxAX3C/9ryOZUsqyG4ksR57pFiBtyhtK1byVx0eAdSG8VZQ 9hXPyYtz0YO9uQO4fWwVXB5xA6KHbq/OUOpnKv4AVm/rIj0UEVBlbYUHxEJZgsTbSX HnmVMh5IiRMNQ== Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Tue, 28 May 2024 16:29:03 +0300 Message-Id: Cc: , "David S. Miller" , Subject: Re: [PATCH] crypto: ecdsa: Fix the public key format description From: "Jarkko Sakkinen" To: "Jarkko Sakkinen" , "Stefan Berger" , "Herbert Xu" X-Mailer: aerc 0.17.0 References: <20240527202840.4818-1-jarkko@kernel.org> In-Reply-To: On Tue May 28, 2024 at 4:26 PM EEST, Jarkko Sakkinen wrote: > On Tue May 28, 2024 at 3:37 PM EEST, Stefan Berger wrote: > > Signature Value: > > 30:45:02:21:00:d9:d7:64:ba:5d:03:07:ee:20:a0:12:16:46: > > 31:e6:8e:66:0c:17:0d:74:07:87:58:5a:13:fc:14:62:98:9a: > > 99:02:20:59:ff:29:9c:52:b9:0a:35:3c:4b:03:bb:47:0e:c8: > > 3e:2d:cb:3e:1c:d3:51:88:91:b1:40:e3:03:86:1b:2a:e8 > > > > 30:45 =3D> sequence containing 69 bytes > > 02:21: =3D> first coordinate with 0x21 bytes > > 00:d9 =3D> 0x21 bytes of ASN.1 integer with leading 0 to make the= =20 > > following 0x20-byte integer a positive number (its most significant bit= =20 > > is set). > > 02:20: =3D> int with 0x20 bytes > > ... > > This actually helped me located the bug in my code: I had 32 bytes for > the first one, with no leading zero. I.e. total length was off-by-one. > > So I'll just extend either or both based on msb?=20 Actually I use a patch that I made for early version: https://lore.kernel.org/linux-integrity/20240521152659.26438-3-jarkko@kerne= l.org/ BR, Jarkko