[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1553718067.4608.43.camel@linux.ibm.com>
Date: Wed, 27 Mar 2019 16:21:07 -0400
From: Mimi Zohar <zohar@...ux.ibm.com>
To: Vitaly Chikunov <vt@...linux.org>
Cc: Herbert Xu <herbert@...dor.apana.org.au>,
David Howells <dhowells@...hat.com>,
Dmitry Kasatkin <dmitry.kasatkin@...il.com>,
linux-integrity@...r.kernel.org, keyrings@...r.kernel.org,
linux-crypto@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v8 10/10] integrity: support EC-RDSA signatures for
asymmetric_verify
> > diff --git a/security/integrity/digsig_asymmetric.c
b/security/integrity/digsig_asymmetric.c
> > > index d775e03fbbcc..99080871eb9f 100644
> > > --- a/security/integrity/digsig_asymmetric.c
> > > +++ b/security/integrity/digsig_asymmetric.c
> > > @@ -104,9 +104,16 @@ int asymmetric_verify(struct key *keyring, const char *sig,
> > >
> > > memset(&pks, 0, sizeof(pks));
> > >
> > > - pks.pkey_algo = "rsa";
> > > pks.hash_algo = hash_algo_name[hdr->hash_algo];
> > > - pks.encoding = "pkcs1";
> > > + if (hdr->hash_algo == HASH_ALGO_STREEBOG_256 ||
> > > + hdr->hash_algo == HASH_ALGO_STREEBOG_512) {
> > > + /* EC-RDSA and Streebog should go together. */
> > > + pks.pkey_algo = "ecrdsa";
> > > + pks.encoding = "raw";
> >
> > IMA signatures are stored as xattrs, making them persistent. Support
> > for streebog was upstreamed in linux-5.0. This change would break
> > existing systems using streebog. As long as this is not yet a concern
>
> In what sense it would break systems?
For example, if executable files are currently labeled with
rsa/streebog signatures, then enforcing file data integrity I assume
would break if the kernel uses ecrdsa/streebog.
Mimi
>
> Unless kernel crashes or signature is recognized as valid, I think, it should
> not be called a break.
>
> > Reviewed-by: Mimi Zohar <zohar@...ux.ibm.com>
>
> Thanks!
>
> >
> > > + } else {
> > > + pks.pkey_algo = "rsa";
> > > + pks.encoding = "pkcs1";
> > > + }
> > > pks.digest = (u8 *)data;
> > > pks.digest_size = datalen;
> > > pks.s = hdr->sig;
>
Powered by blists - more mailing lists