All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jarkko Sakkinen" <jarkko@kernel.org>
To: "Jarkko Sakkinen" <jarkko@kernel.org>,
	"Stefan Berger" <stefanb@linux.ibm.com>,
	"Herbert Xu" <herbert@gondor.apana.org.au>
Cc: <linux-crypto@vger.kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] crypto: ecdsa: Fix the public key format description
Date: Tue, 28 May 2024 16:29:03 +0300	[thread overview]
Message-ID: <D1LBARSTFSFC.1DQSHTGGDL0C6@kernel.org> (raw)
In-Reply-To: <D1LB8PVCTP1S.JDCEWNODTGTQ@kernel.org>

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 => sequence containing 69 bytes
> >    02:21: => first coordinate with 0x21 bytes
> >      00:d9 => 0x21 bytes of ASN.1 integer with leading 0 to make the 
> > following 0x20-byte integer a positive number (its most significant bit 
> > is set).
> >    02:20: => 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? 

Actually I use a patch that I made for early version:

https://lore.kernel.org/linux-integrity/20240521152659.26438-3-jarkko@kernel.org/

BR, Jarkko

  reply	other threads:[~2024-05-28 13:29 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-27 20:28 [PATCH] crypto: ecdsa: Fix the public key format description Jarkko Sakkinen
2024-05-27 21:05 ` Jarkko Sakkinen
2024-05-27 21:58   ` Jarkko Sakkinen
2024-05-27 22:18     ` Jarkko Sakkinen
2024-05-27 22:31       ` Jarkko Sakkinen
2024-05-27 22:49         ` Jarkko Sakkinen
2024-05-27 22:59           ` Jarkko Sakkinen
2024-05-28 12:37             ` Stefan Berger
2024-05-28 13:18               ` Jarkko Sakkinen
2024-05-28 13:26               ` Jarkko Sakkinen
2024-05-28 13:29                 ` Jarkko Sakkinen [this message]
2024-05-28 11:18 ` Stefan Berger
2024-05-28 11:43   ` Jarkko Sakkinen
2024-06-07 11:53 ` Herbert Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=D1LBARSTFSFC.1DQSHTGGDL0C6@kernel.org \
    --to=jarkko@kernel.org \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stefanb@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.