Grub Development Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Peter <dn.tlp@gmx.net>
To: The development of GRUB 2 <grub-devel@gnu.org>
Cc: Robert Millan <rmh@aybabtu.com>
Subject: Re: Strong Crypto Support for GRUB2
Date: Sun, 2 Sep 2007 22:53:45 +0200	[thread overview]
Message-ID: <20070902225345.81fa084c.dn.tlp@gmx.net> (raw)
In-Reply-To: <20070902194110.GA8231@thorin>

Hi Robert,

thanks for the in-depth look at my patch. My comments below.

> > +#ifndef GET_UINT32_BE
> > +#define GET_UINT32_BE(n,b,i)                            \
> > +{                                                       \
> > +    (n) = ( (uint32) (b)[(i)    ] << 24 )        \
> > +        | ( (uint32) (b)[(i) + 1] << 16 )        \
> > +        | ( (uint32) (b)[(i) + 2] <<  8 )        \
> > +        | ( (uint32) (b)[(i) + 3]       );       \
> > +}
> Doesn't follow GCS indentation style in a number of places.  I would
> suggest using the indent(1) tool on it.

Any specific options that I shall use?

> > +GRUB_MOD_INIT(crypto)
> > +{
> > +  (void)mod;			/* To stop warning. */
> > +  grub_crypto_cipher_register(&grub_cipher_none);
> > +  grub_crypto_cipher_register(&grub_hash_none);
> > +}
> Which warning was that?

Actually, I copied that line verbatim from hello.c, the GRUB hello
world module. :) It seems that warning is long gone.

> > diff -u -r -x CVS -N grub2-orig/crypto/rmd160.c
> > grub2/crypto/rmd160.c --- grub2-orig/crypto/rmd160.c
> > 1970-01-01 01:00:00.000000000 +0100 +++
> > grub2/crypto/rmd160.c	2007-09-02 00:52:57.000000000 +0200 @@
> > -0,0 +1,430 @@ +/*
> > + * 2007-09-01: Modified for GNU GRUB by Simon Peter
> > <dn.tlp@gmx.net>.
> > + */
> > +/********************************************************************
> > \
> > + *
> > + *      FILE:     rmd160.c
> > + *
> > + *      CONTENTS: A sample C-implementation of the RIPEMD-160
> > + *                hash-function.
> > + *      TARGET:   any computer with an ANSI C compiler
> > + *
> > + *      AUTHOR:   Antoon Bosselaers, ESAT-COSIC
> > + *      DATE:     1 March 1996
> > + *      VERSION:  1.0
> > + *
> > + *      Copyright (c) Katholieke Universiteit Leuven
> > + *      1996, All Rights Reserved
> > + *
> > + *  Conditions for use of the RIPEMD-160 Software
> > + *
> > + *  The RIPEMD-160 software is freely available for use under the
> > terms and
> > + *  conditions described hereunder, which shall be deemed to be
> > accepted by
> > + *  any user of the software and applicable on any use of the
> > software:
> > + * 
> > + *  1. K.U.Leuven Department of Electrical Engineering-ESAT/COSIC
> > shall for
> > + *     all purposes be considered the owner of the RIPEMD-160
> > software and of
> > + *     all copyright, trade secret, patent or other intellectual
> > property
> > + *     rights therein.
> > + *  2. The RIPEMD-160 software is provided on an "as is" basis
> > without
> > + *     warranty of any sort, express or implied. K.U.Leuven makes
> > no
> > + *     representation that the use of the software will not
> > infringe any
> > + *     patent or proprietary right of third parties. User will
> > indemnify
> > + *     K.U.Leuven and hold K.U.Leuven harmless from any claims or
> > liabilities
> > + *     which may arise as a result of its use of the software. In
> > no
> > + *     circumstances K.U.Leuven R&D will be held liable for any
> > deficiency,
> > + *     fault or other mishappening with regard to the use or
> > performance of
> > + *     the software.
> > + *  3. User agrees to give due credit to K.U.Leuven in scientific
> > publications 
> > + *     or communications in relation with the use of the
> > RIPEMD-160 software 
> > + *     as follows: RIPEMD-160 software written by Antoon
> > Bosselaers, 
> > + *     available at
> > http://www.esat.kuleuven.be/~cosicart/ps/AB-9601/.
> > + *
> > +
> > \********************************************************************/
> 3) doesn't look GPL-compatible.  As for 1), note the author is
> claiming ownership of any patents that might be covered by this
> code.  GPL compatibility aside, I'm not sure what the consequences of
> accepting the license would be (could it lead to someone
> acknowledging K.U.Leuven as the owner of their own patents?), but it
> looks dangerous.

Interesting, as RIPEMD is known to be one of the most open and
unencumbered hash functions (see http://en.wikipedia.org/wiki/RIPEMD).
There are no patents covering the code. :)

> > +enum grub_cipher_type
> > +  {
> > +    GRUB_CIPHER_TYPE_NONE = 0,
> > +    GRUB_CIPHER_TYPE_CIPHER = 1,
> > +    GRUB_CIPHER_TYPE_HASH = 2
> > +  };
> Wasn't the point of using enum to avoid hardcoding these numbers? :-)

Woops. I thought you guys were doing the same and that's why I did it.
I reverted that (leaving NONE = 0 intact).

I'm going to post another patch with your comments implemented, after I
have your reply (I need to know what to pass to indent(1)).

Simon



  reply	other threads:[~2007-09-02 20:53 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-02 12:17 Strong Crypto Support for GRUB2 Simon Peter
2007-09-02 16:05 ` Robert Millan
2007-09-02 17:25   ` Simon Peter
2007-09-02 19:41     ` Robert Millan
2007-09-02 20:53       ` Simon Peter [this message]
2007-09-02 23:05         ` Robert Millan
2007-09-03 18:51           ` Simon Peter
2007-11-10 17:20             ` Marco Gerards
2007-09-03  9:42       ` Patrick Georgi
  -- strict thread matches above, loose matches on Subject: below --
2007-09-13  9:16 Simon Peter
2007-11-10 17:22 ` Marco Gerards
2008-07-20 23:49 Fw: " Simon Peter
2008-07-21 13:48 ` Colin D Bennett
2008-07-21 20:38   ` Simon Peter
2008-07-22 22:12     ` Robert Millan

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=20070902225345.81fa084c.dn.tlp@gmx.net \
    --to=dn.tlp@gmx.net \
    --cc=grub-devel@gnu.org \
    --cc=rmh@aybabtu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox