All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Zidlicky <rz@linux-m68k.org>
To: Max Vozeler <max@hinterhof.net>
Cc: Milan Broz <mbroz@redhat.com>,
	linux-crypto@vger.kernel.org, linux-crypto@nl.linux.org,
	Jari Ruusu <jariruusu@users.sourceforge.net>,
	Alasdair G Kergon <agk@redhat.com>
Subject: Re: [PATCH 1/4] dm-crypt: clarify cipher vs. cipher mode
Date: Mon, 18 Jan 2010 20:51:22 +0100	[thread overview]
Message-ID: <20100118195122.GA11762@linux-m68k.org> (raw)
In-Reply-To: <20100118170858.GE3964@quark.vpn.nusquama.org>

Hi,

> > ivseed = key_table[64] is nowhere declared. 
> 
> This is an implementation detail of Loop-AES, so I don't consider it 
> belonging to the description of the modes here. 

difficult to draw the line, but as it is something supplied as "external 
parameter" to the dm-crypt layer I think it is certainly worth mentioning 
where it comes from.

> > > +  The input IV supplied to lmk2 or lmk3 is expected to be the
> > > +  sector number in 64-bit little endian as supplied by the
> > > +  plain64 dm-crypt IV generator. It gets truncated to 56 bits
> > > +  with the most significant byte set to 0x80:
> > 
> > I believe preceding paragraoh can be completely omitted, is not easier to 
> > understand than the pseudocode.
> 
> OK. I'll drop the last sentence, the first one describing where the
> IV is expected to come from seems relevant.

actually the first sentence does not make any sense to me as it is now.
 
> > > +Mode multi-key-v2 (lmk2-plain64-multi:64):
> > > +
> > > +  key = keys[sectornum % 64]
> > > +
> > > +  encrypt:
> > > +    IV = MD5(plaintext[16..511] ||
> > > +             le64(truncated-sector-number) ||
> > > +             le32(format-magic))
> > 
> > no need to repeat the IV description here, could use the v2/v3IV in the pseudocode
> > bellow. 
> 
> I think repeating it makes it clearer which parts happen at 
> which time, so I'd leave this as is.

at the very least I would use v2IV etc like in the earlier description. But I think
the duplication can be avoided.

Richard

  reply	other threads:[~2010-01-18 19:50 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-28 18:59 [RFC PATCH] crypto: loop-AES support Max Vozeler
2009-12-28 18:59 ` [PATCH 1/4] dm-crypt: clarify cipher vs. cipher mode Max Vozeler
2009-12-28 19:37   ` Milan Broz
2009-12-29  1:46     ` Max Vozeler
2010-01-04 15:25       ` Max Vozeler
2010-01-11 21:28         ` Richard Zidlicky
2010-01-13 17:27           ` Max Vozeler
2010-01-17 22:02             ` Richard Zidlicky
2010-01-18 17:08               ` Max Vozeler
2010-01-18 19:51                 ` Richard Zidlicky [this message]
2009-12-29  9:21     ` Richard Zidlicky
2009-12-29 11:38       ` Milan Broz
2009-12-29 17:37         ` Richard Zidlicky
2009-12-28 18:59 ` [PATCH 2/4] dm-crypt: multi tfm mode Max Vozeler
2009-12-28 18:59 ` [PATCH 3/4] crypto: md5 - Add export support Max Vozeler
2010-01-13  9:52   ` Herbert Xu
2010-01-13 17:37     ` Max Vozeler
2010-01-17 10:55       ` Herbert Xu
2009-12-28 18:59 ` [PATCH 4/4] crypto: lmk2/lmk3 cipher block modes Max Vozeler
2009-12-29  1:18   ` Richard Zidlicky
2009-12-29  1:56     ` Max Vozeler
2010-01-17 11:03   ` Herbert Xu
2010-01-18 16:52     ` Max Vozeler
2010-01-19  8:00       ` Herbert Xu
2010-02-01 10:32         ` Max Vozeler
2010-02-01 10:44           ` 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=20100118195122.GA11762@linux-m68k.org \
    --to=rz@linux-m68k.org \
    --cc=agk@redhat.com \
    --cc=jariruusu@users.sourceforge.net \
    --cc=linux-crypto@nl.linux.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=max@hinterhof.net \
    --cc=mbroz@redhat.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.