Re: [PATCH 1/1]: CTR mode implementation

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

 



On Mon, Sep 24, 2007 at 07:31:32PM -0500, Joy Latten wrote:
> 
> I have another question regarding this change to using a tuple.
> The size of my counter is now, csize = blocksize - (noncesize + ivsize).
> rfc 3686 (CTR-AES for ESP) states in section 4, that the counter
> portion of the counter block be a 32-bit big endian. To keep
> code endian-neutral as I can, would it be appropriate if I only did
> this when my csize is 2, 4 or 8 bytes so I can easily use be16_to_cpu(), 
> be32_to_cpu() and be64_to_cpu() respectively? And for all other 
> sizes for csize, don't worry about this "endian" requirement, just store as is. 
> Does it matter that I store the 32 bits as big endian?

Just fail the algorithm construction if the the counter block
size doesn't come out to be 4 for now.  We can change this later
on when needs arise.

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
-
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

  Powered by Linux