Re: [PATCH 4/7] crypto: testmgr - Added testvectors for the ofb(sm4) & cfb(sm4) skciphers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Sep 11, 2019 at 07:34:31PM +0000, Pascal Van Leeuwen wrote:
> > -----Original Message-----
> > From: Eric Biggers <ebiggers@xxxxxxxxxx>
> > Sent: Wednesday, September 11, 2019 6:06 PM
> > To: Pascal van Leeuwen <pascalvanl@xxxxxxxxx>
> > Cc: linux-crypto@xxxxxxxxxxxxxxx; antoine.tenart@xxxxxxxxxxx; herbert@xxxxxxxxxxxxxxxxxxx;
> > davem@xxxxxxxxxxxxx; Pascal Van Leeuwen <pvanleeuwen@xxxxxxxxxxxxxx>
> > Subject: Re: [PATCH 4/7] crypto: testmgr - Added testvectors for the ofb(sm4) & cfb(sm4)
> > skciphers
> > 
> > On Wed, Sep 11, 2019 at 12:38:21PM +0200, Pascal van Leeuwen wrote:
> > > Added testvectors for the ofb(sm4) and cfb(sm4) skcipher algorithms
> > >
> > 
> > What is the use case for these algorithms?  Who/what is going to use them?
> > 
> > - Eric
> >
> SM4 is a Chinese replacement for 128 bit AES, which is mandatory to be used for many
> Chinese use cases. So they would use these whereever you would normally use ofb(aes)
> or cfb(aes). Frankly, I'm not aware of any practicle use cases for these feedback
> modes, but we've been supporting them for decades and apparently the Crypto API
> supports them for AES as well. So they must be useful for something ...
> 
> The obvious advantage over CBC mode was that they only require the encrypt part of
> the cipher, but that holds for the (newer) CTR mode as well. So, my guess would be
> some legacy uses cases from before the time CTR mode and AEAD's became popular.
> 
> Maybe someone remembers why these were added for AES in the first place?
> 

So if you have no idea why they should be added, why are you adding them?

- Eric



[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux