All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mimi Zohar <zohar@linux.ibm.com>
To: Vitaly Chikunov <vt@altlinux.org>
Cc: Dmitry Kasatkin <dmitry.kasatkin@gmail.com>,
	linux-integrity@vger.kernel.org
Subject: Re: [PATCH 3/3] ima-evm-utils: Allow to use Streebog hash function
Date: Tue, 27 Nov 2018 08:33:03 -0500	[thread overview]
Message-ID: <1543325583.3902.170.camel@linux.ibm.com> (raw)
In-Reply-To: <20181127130812.ad3t3uflxkagttuf@sole.flsd.net>

On Tue, 2018-11-27 at 16:08 +0300, Vitaly Chikunov wrote:

> > hash_info.h is now included in kernel-headers package.
> 
> I think, first it should not be coincided with the new algo adding and
> being follow-up patch (if any).
> 
> > Anyone using the hash_algo enumeration defined in hash_info.h, will
> > probably also want to use an associated algorithm name.  It would make
> > more sense to keep the hash_algo enumeration, hash_algo_name[], and
> > perhaps the hash_digest_size[] together.  Maybe using macros to keep
> > them in sync (eg. kernel_read_file_id/kernel_read_file_str).
> 
> On the first sight this sounds good, but...
> 
> It sounds like it will require patching kernel's hash_info.h, so it will
> be not possible to transfer smoothly on the new scheme without breaking
> some compatibility (of the newer ima-evm-utils with older kernels).  Also,
> it is possible that ima-evm-utils is used on the older stable box (where some
> reliable and stable build system run) which does not have such modification
> and/or new algorithms in the kernel but willing to generate signatures.
> 
> So, I think code duplication between projects is good in this case.

The sooner the kernel's hash_info.h is updated, the better.  For the
time being, ima-evm-utils could define these definitions in a separate
file that is/isn't included based on autotools/buildtime option.

> 
> Some hash algorithms may be wished to be compatible with rsa pkcs1
> signature scheme, which is also defined in kernel in
> crypto/rsa-pkcs1pad.c and in ima-evm-utils in src/libimaevm.c so code
> duplication and adding algorithms in both sources will happen anyway.
> 
> Thanks,

There might be multiple problems, but fixing one is better than not
fixing either.

Mimi


  reply	other threads:[~2018-11-27 13:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-26  4:39 [PATCH 1/3] ima-avm-utils: Fix hash buffer overflow in verify_evm Vitaly Chikunov
2018-11-26  4:39 ` [PATCH 2/3] ima-evm-utils: Add --xattr-user option for testing Vitaly Chikunov
2018-11-27 11:55   ` Mimi Zohar
2018-11-26  4:39 ` [PATCH 3/3] ima-evm-utils: Allow to use Streebog hash function Vitaly Chikunov
2018-11-27 11:56   ` Mimi Zohar
2018-11-27 13:08     ` Vitaly Chikunov
2018-11-27 13:33       ` Mimi Zohar [this message]
2018-11-26 13:45 ` [PATCH 1/3] ima-avm-utils: Fix hash buffer overflow in verify_evm Vitaly Chikunov
2018-11-27 11:52 ` Mimi Zohar

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=1543325583.3902.170.camel@linux.ibm.com \
    --to=zohar@linux.ibm.com \
    --cc=dmitry.kasatkin@gmail.com \
    --cc=linux-integrity@vger.kernel.org \
    --cc=vt@altlinux.org \
    /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.