All of lore.kernel.org
 help / color / mirror / Atom feed
* variable iv lengths for aes-gcm
@ 2015-06-18  7:43 Ambarus Tudor-Dan-B38632
  2015-06-18  8:07 ` Herbert Xu
  0 siblings, 1 reply; 4+ messages in thread
From: Ambarus Tudor-Dan-B38632 @ 2015-06-18  7:43 UTC (permalink / raw)
  To: herbert, linux-crypto

Hi Herbert,

I'm trying to find a method to pass IVs of various lengths to an 
algorithm. A particular case would be aes-gcm IV. It can have any number 
of bits between 1 and 2^64.

A possible way to do this is to set the ivlen per request. Are there any 
(better) ways to do this?

Thanks,
ta

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: variable iv lengths for aes-gcm
  2015-06-18  7:43 variable iv lengths for aes-gcm Ambarus Tudor-Dan-B38632
@ 2015-06-18  8:07 ` Herbert Xu
  2015-06-18  9:44   ` Ambarus Tudor-Dan-B38632
  0 siblings, 1 reply; 4+ messages in thread
From: Herbert Xu @ 2015-06-18  8:07 UTC (permalink / raw)
  To: Ambarus Tudor-Dan-B38632; +Cc: linux-crypto

On Thu, Jun 18, 2015 at 10:43:18AM +0300, Ambarus Tudor-Dan-B38632 wrote:
> 
> I'm trying to find a method to pass IVs of various lengths to an
> algorithm. A particular case would be aes-gcm IV. It can have any
> number of bits between 1 and 2^64.
> 
> A possible way to do this is to set the ivlen per request. Are there
> any (better) ways to do this?

Why would you want do this apart from the fact that your hardware
supports it and you want to export this?

Using a long IV is fundamentally insecure because all GCM will do
is hash it and there is nothing that can guarantee uniquenes of the
hash result.

You might as well just pull out a random number and use that as your
IV.

Cheers,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: variable iv lengths for aes-gcm
  2015-06-18  8:07 ` Herbert Xu
@ 2015-06-18  9:44   ` Ambarus Tudor-Dan-B38632
  2015-06-19  0:18     ` Herbert Xu
  0 siblings, 1 reply; 4+ messages in thread
From: Ambarus Tudor-Dan-B38632 @ 2015-06-18  9:44 UTC (permalink / raw)
  To: Herbert Xu; +Cc: linux-crypto



On 6/18/2015 11:07 AM, Herbert Xu wrote:
> On Thu, Jun 18, 2015 at 10:43:18AM +0300, Ambarus Tudor-Dan-B38632 wrote:
>>
>> I'm trying to find a method to pass IVs of various lengths to an
>> algorithm. A particular case would be aes-gcm IV. It can have any
>> number of bits between 1 and 2^64.
>>
>> A possible way to do this is to set the ivlen per request. Are there
>> any (better) ways to do this?
>
> Why would you want do this apart from the fact that your hardware
> supports it and you want to export this?
>

The reason is to cover a wide range of applications. Your question also 
applies to the gcm NIST publication.

Users may want to use a crypto module that meets the requirements of 
FIPS Pub. for various applications that use variable lengths for IV.

ta

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: variable iv lengths for aes-gcm
  2015-06-18  9:44   ` Ambarus Tudor-Dan-B38632
@ 2015-06-19  0:18     ` Herbert Xu
  0 siblings, 0 replies; 4+ messages in thread
From: Herbert Xu @ 2015-06-19  0:18 UTC (permalink / raw)
  To: Ambarus Tudor-Dan-B38632; +Cc: linux-crypto

On Thu, Jun 18, 2015 at 12:44:06PM +0300, Ambarus Tudor-Dan-B38632 wrote:
>
> The reason is to cover a wide range of applications. Your question
> also applies to the gcm NIST publication.
> 
> Users may want to use a crypto module that meets the requirements of
> FIPS Pub. for various applications that use variable lengths for IV.

What are these applications?

Cheers,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-06-19  0:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-18  7:43 variable iv lengths for aes-gcm Ambarus Tudor-Dan-B38632
2015-06-18  8:07 ` Herbert Xu
2015-06-18  9:44   ` Ambarus Tudor-Dan-B38632
2015-06-19  0:18     ` Herbert Xu

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.