Re: AES with CTS Mode

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

 



On Tue, Jan 15, 2008 at 08:28:15PM +0000, Kevin Coffman wrote:
> I need to implement AES with CTS mode for NFSv4 (rfc3962 & rfc4121).

I love new algorithm submissions :)

> I have implemented CTS starting with a copy of CBC (crypto/cbc.c),
> since CTS is the same as CBC except for the last two blocks.

I think you're going about this the hard way.  CTS should be done as
a generic wrapper on top of any existing block mode of operations.
In other words, the final result should look like "cts(cbc(aes))".

That means you don't need to implement anything specific to CBC.

> A problem that I'm running into is that the NFS/RPC code needs to call
> the crypt functions in chunks as we currently do for other encryption
> types.  However, I am not seeing a way to inform the crypto code of
> the total length to be encrypted such that it can just do regular CBC
> until the last two blocks (of the last chunk).

If you can put the entire plain text into one SG list then it would
be best.  If not then just do as you described and feed whole blocks
to plain CBC until you reach the last two and give them to CTS.

Thanks,
-- 
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