<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: 21.11.2009 More secure than AES &#8211; mode FMC</title>
	<atom:link href="http://blogs.gnome.org/stw/2009/11/21/21-11-2009-more-secure-than-aes-mode-fmc/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.gnome.org/stw/2009/11/21/21-11-2009-more-secure-than-aes-mode-fmc/</link>
	<description>Just another GNOME Blogs weblog</description>
	<lastBuildDate>Sat, 04 Feb 2012 00:04:06 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Mathias Hasselmann</title>
		<link>http://blogs.gnome.org/stw/2009/11/21/21-11-2009-more-secure-than-aes-mode-fmc/comment-page-1/#comment-50</link>
		<dc:creator>Mathias Hasselmann</dc:creator>
		<pubDate>Tue, 24 Nov 2009 23:30:24 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.gnome.org/stw/2009/11/21/21-11-2009-more-secure-than-aes-mode-fmc/#comment-50</guid>
		<description>@stw: Thanks for explanation.</description>
		<content:encoded><![CDATA[<p>@<a href="http://blogs.gnome.org/stw/2009/11/21/21-11-2009-more-secure-than-aes-mode-fmc/#comment-49">stw</a>: Thanks for explanation.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stw</title>
		<link>http://blogs.gnome.org/stw/2009/11/21/21-11-2009-more-secure-than-aes-mode-fmc/comment-page-1/#comment-49</link>
		<dc:creator>stw</dc:creator>
		<pubDate>Tue, 24 Nov 2009 18:40:49 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.gnome.org/stw/2009/11/21/21-11-2009-more-secure-than-aes-mode-fmc/#comment-49</guid>
		<description>@Simon: As I said, I am not aware of any AEAD scheme that is as careful about guaranteeing privacy (by for instance specifying two AES-256 encryptions per 128-bit block), as mode FMC is. Most schemes optimize for speed and size, both of which are irrelevant for my application.

About your tips:

1) The FMC spec explicitely requires a master key with 256-bit. Then keys K and S are derived from that master key using

K = SHA-256 (master_key &#124;&#124; &quot;key encryption key&quot;)
S = SHA-256 (master_key &#124;&#124; &quot;secret key&quot;)

There is no mention of where the 256-bit master_key comes from, but for dpim, it will be generated from &quot;/dev/random&quot;, and stored on disk on the client. To guarantee for the security of  the master_key file, a password-derived key will be used to encrypt the file.

What is important is that the actual secret data, which will be sent over the net, is encrypted with the master-key, which should be equally likely any 256-bit value. If you password-derive the master-key, and then send data encrypted by a password-derived master-key over the net, people can do dictionary attacks on it. And some users /will/ choose weak passwords like &quot;password&quot; or so...

To make it short: the FMC spec doesn&#039;t include anything about password-derived keys, but instead specifies the master_key to be 256-bit, so your tip does not apply to the FMC spec.

2) Right - that makes sense. There is an information leak here, although in practice its not so bad, because if you have ten entries in the database, with ten different site/username/password combinations, there it gets very hard to know which entry belongs to which site, because the data is encrypted. Also, the data is padded to 16-byte boundaries, so suppose you knew which entry belongs to which site, you would only get to know that the password is between 6 and 22 characters long or some other 16-char range.

I don&#039;t like padding to 1024 bytes very much, because it slows down the transfer a lot. I think one might add an extra field containing a random amount of random data (say between 0 and 64 bytes long); but I haven&#039;t quite decided what would be the best solution.</description>
		<content:encoded><![CDATA[<p>@Simon: As I said, I am not aware of any AEAD scheme that is as careful about guaranteeing privacy (by for instance specifying two AES-256 encryptions per 128-bit block), as mode FMC is. Most schemes optimize for speed and size, both of which are irrelevant for my application.</p>
<p>About your tips:</p>
<p>1) The FMC spec explicitely requires a master key with 256-bit. Then keys K and S are derived from that master key using</p>
<p>K = SHA-256 (master_key || &#8220;key encryption key&#8221;)<br />
S = SHA-256 (master_key || &#8220;secret key&#8221;)</p>
<p>There is no mention of where the 256-bit master_key comes from, but for dpim, it will be generated from &#8220;/dev/random&#8221;, and stored on disk on the client. To guarantee for the security of  the master_key file, a password-derived key will be used to encrypt the file.</p>
<p>What is important is that the actual secret data, which will be sent over the net, is encrypted with the master-key, which should be equally likely any 256-bit value. If you password-derive the master-key, and then send data encrypted by a password-derived master-key over the net, people can do dictionary attacks on it. And some users /will/ choose weak passwords like &#8220;password&#8221; or so&#8230;</p>
<p>To make it short: the FMC spec doesn&#8217;t include anything about password-derived keys, but instead specifies the master_key to be 256-bit, so your tip does not apply to the FMC spec.</p>
<p>2) Right &#8211; that makes sense. There is an information leak here, although in practice its not so bad, because if you have ten entries in the database, with ten different site/username/password combinations, there it gets very hard to know which entry belongs to which site, because the data is encrypted. Also, the data is padded to 16-byte boundaries, so suppose you knew which entry belongs to which site, you would only get to know that the password is between 6 and 22 characters long or some other 16-char range.</p>
<p>I don&#8217;t like padding to 1024 bytes very much, because it slows down the transfer a lot. I think one might add an extra field containing a random amount of random data (say between 0 and 64 bytes long); but I haven&#8217;t quite decided what would be the best solution.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Simon Josefsson</title>
		<link>http://blogs.gnome.org/stw/2009/11/21/21-11-2009-more-secure-than-aes-mode-fmc/comment-page-1/#comment-48</link>
		<dc:creator>Simon Josefsson</dc:creator>
		<pubDate>Tue, 24 Nov 2009 08:47:44 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.gnome.org/stw/2009/11/21/21-11-2009-more-secure-than-aes-mode-fmc/#comment-48</guid>
		<description>I read your paper with interest, but agrees with other posters that it is really a good idea to find some standard solution here instead of inventing something new.  I&#039;m not sure what a good pointer is, though, but there are AEAD ciphers out there with good security properties, although perhaps not exactly the properties you are looking for.

Anyway, two tips on your techniques that could be improved:

1) Key derivation from password could be strengthened by adding a salt and an iteration count.  I would recommend to use the PKCS#5 PBKDF2 from RFC 2898 instead.

2) The length of the password appears to be possible to infer from your protocol (or I missed something).  I think you want to pad the values so that all records are 1024 bytes or similar.  This has a downside of creating a fixed upper limit on password/domain/username lengths, but if you use a high enough limit it may not be a problem in practice.  Padding the data with either 0 or random data has some different properties, so be sure to use a good padding scheme.

/Simon</description>
		<content:encoded><![CDATA[<p>I read your paper with interest, but agrees with other posters that it is really a good idea to find some standard solution here instead of inventing something new.  I&#8217;m not sure what a good pointer is, though, but there are AEAD ciphers out there with good security properties, although perhaps not exactly the properties you are looking for.</p>
<p>Anyway, two tips on your techniques that could be improved:</p>
<p>1) Key derivation from password could be strengthened by adding a salt and an iteration count.  I would recommend to use the PKCS#5 PBKDF2 from RFC 2898 instead.</p>
<p>2) The length of the password appears to be possible to infer from your protocol (or I missed something).  I think you want to pad the values so that all records are 1024 bytes or similar.  This has a downside of creating a fixed upper limit on password/domain/username lengths, but if you use a high enough limit it may not be a problem in practice.  Padding the data with either 0 or random data has some different properties, so be sure to use a good padding scheme.</p>
<p>/Simon</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stw</title>
		<link>http://blogs.gnome.org/stw/2009/11/21/21-11-2009-more-secure-than-aes-mode-fmc/comment-page-1/#comment-47</link>
		<dc:creator>stw</dc:creator>
		<pubDate>Mon, 23 Nov 2009 10:17:42 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.gnome.org/stw/2009/11/21/21-11-2009-more-secure-than-aes-mode-fmc/#comment-47</guid>
		<description>@Mathias: if AES is secure, then a few well-known bytes introduced by bzip should not be a problem. This kind of attack would be a known plaintext attack. There is a stronger class of attack - choosen plaintext - where the attacker does not only knows but gets to choose the plaintext that is being encrypted.

I think the best choosen plaintext attack is against a reduced round AES (with 8 instead of 14 rounds), requiring 2^204 time and about 2^128 choosen plaintexts. (Improved Cryptanalysis of Rijndael, N. Ferguson et al).

However, I used bzip only as example, in order to say that if AES is secure, then any encoding should be okay. But you are right, some encodings may be better than others. An bzip encoding has the advantage that the data is more evenly distributed than the input data, if the input data is ascii text. But it has the disadvantage of having well-known bytes.

The particular encoding defined in mode FMC is designed in a way that it should be absolutely impossible to know what is the input of the outer layer of encryption, even if one knows or chooses all the plaintext. So the FMC encoding should produce something equivalent to white noise as output, without having fixed output bytes like for instance bzip.</description>
		<content:encoded><![CDATA[<p>@Mathias: if AES is secure, then a few well-known bytes introduced by bzip should not be a problem. This kind of attack would be a known plaintext attack. There is a stronger class of attack &#8211; choosen plaintext &#8211; where the attacker does not only knows but gets to choose the plaintext that is being encrypted.</p>
<p>I think the best choosen plaintext attack is against a reduced round AES (with 8 instead of 14 rounds), requiring 2^204 time and about 2^128 choosen plaintexts. (Improved Cryptanalysis of Rijndael, N. Ferguson et al).</p>
<p>However, I used bzip only as example, in order to say that if AES is secure, then any encoding should be okay. But you are right, some encodings may be better than others. An bzip encoding has the advantage that the data is more evenly distributed than the input data, if the input data is ascii text. But it has the disadvantage of having well-known bytes.</p>
<p>The particular encoding defined in mode FMC is designed in a way that it should be absolutely impossible to know what is the input of the outer layer of encryption, even if one knows or chooses all the plaintext. So the FMC encoding should produce something equivalent to white noise as output, without having fixed output bytes like for instance bzip.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mathias Hasselmann</title>
		<link>http://blogs.gnome.org/stw/2009/11/21/21-11-2009-more-secure-than-aes-mode-fmc/comment-page-1/#comment-45</link>
		<dc:creator>Mathias Hasselmann</dc:creator>
		<pubDate>Sun, 22 Nov 2009 19:59:35 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.gnome.org/stw/2009/11/21/21-11-2009-more-secure-than-aes-mode-fmc/#comment-45</guid>
		<description>I am no security researcher, but Dan seems to be right: If C = E_S (encode (P)) means &quot;first encode data and then encrypt with AES&quot;, and if compression methods like bzip2 are your encode step, then you actually weaking AES because the compression algorithm places well known tokens at well known positions. Therefore your approach would allow well known secret attacks.

This kind of attack is famous for breaking the quite secure Enigma machine in WWII: Quite some die hard Nazis ignored the explict command to not sign messages and finished each message with &quot;Heil Hitler&quot;. His majesty&#039;s cryptographers where quite amused.

Well, but maybe I just misunderstand everything. I am no crypto researcher.</description>
		<content:encoded><![CDATA[<p>I am no security researcher, but Dan seems to be right: If C = E_S (encode (P)) means &#8220;first encode data and then encrypt with AES&#8221;, and if compression methods like bzip2 are your encode step, then you actually weaking AES because the compression algorithm places well known tokens at well known positions. Therefore your approach would allow well known secret attacks.</p>
<p>This kind of attack is famous for breaking the quite secure Enigma machine in WWII: Quite some die hard Nazis ignored the explict command to not sign messages and finished each message with &#8220;Heil Hitler&#8221;. His majesty&#8217;s cryptographers where quite amused.</p>
<p>Well, but maybe I just misunderstand everything. I am no crypto researcher.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stw</title>
		<link>http://blogs.gnome.org/stw/2009/11/21/21-11-2009-more-secure-than-aes-mode-fmc/comment-page-1/#comment-44</link>
		<dc:creator>stw</dc:creator>
		<pubDate>Sun, 22 Nov 2009 17:58:48 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.gnome.org/stw/2009/11/21/21-11-2009-more-secure-than-aes-mode-fmc/#comment-44</guid>
		<description>@xurfa: well, I&#039;ve just looked at some of the papers listed there, and I think one major difference is that they all assume that AES-encryption is perfectly secure. So in EAX, CCM, CWC, CS and GCM mode (and probably also some of the others), one AES (often CTR-mode) encryption is used to assure privacy, and some mechanism for authentication is added.

Mode FMC is designed with the thought that some cryptographic technique for (partially) breaking AES may become known, maybe in 30 years or so. So FMC encryption uses two AES-encryptions and some extra encoding passes of the data, to strengthen the cipher against future discoveries.

Certainly this means that in comparision the the other modes, mode FMC is neither very fast nor for instance does it allow parallel processing (for encrypting your 10 gigabit network); but on the other hand, if AES is not as strong as we thought, then any of the other modes might be vulnerable, wheras mode FMC might remain secure.</description>
		<content:encoded><![CDATA[<p>@<a href="http://blogs.gnome.org/stw/2009/11/21/21-11-2009-more-secure-than-aes-mode-fmc/#comment-42">xurfa</a>: well, I&#8217;ve just looked at some of the papers listed there, and I think one major difference is that they all assume that AES-encryption is perfectly secure. So in EAX, CCM, CWC, CS and GCM mode (and probably also some of the others), one AES (often CTR-mode) encryption is used to assure privacy, and some mechanism for authentication is added.</p>
<p>Mode FMC is designed with the thought that some cryptographic technique for (partially) breaking AES may become known, maybe in 30 years or so. So FMC encryption uses two AES-encryptions and some extra encoding passes of the data, to strengthen the cipher against future discoveries.</p>
<p>Certainly this means that in comparision the the other modes, mode FMC is neither very fast nor for instance does it allow parallel processing (for encrypting your 10 gigabit network); but on the other hand, if AES is not as strong as we thought, then any of the other modes might be vulnerable, wheras mode FMC might remain secure.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: xurfa</title>
		<link>http://blogs.gnome.org/stw/2009/11/21/21-11-2009-more-secure-than-aes-mode-fmc/comment-page-1/#comment-42</link>
		<dc:creator>xurfa</dc:creator>
		<pubDate>Sun, 22 Nov 2009 12:34:56 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.gnome.org/stw/2009/11/21/21-11-2009-more-secure-than-aes-mode-fmc/#comment-42</guid>
		<description>Hi, have you compared other proposed AES modes? See http://csrc.nist.gov/groups/ST/toolkit/BCM/modes_development.html</description>
		<content:encoded><![CDATA[<p>Hi, have you compared other proposed AES modes? See <a href="http://csrc.nist.gov/groups/ST/toolkit/BCM/modes_development.html" rel="nofollow">http://csrc.nist.gov/groups/ST/toolkit/BCM/modes_development.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stw</title>
		<link>http://blogs.gnome.org/stw/2009/11/21/21-11-2009-more-secure-than-aes-mode-fmc/comment-page-1/#comment-41</link>
		<dc:creator>stw</dc:creator>
		<pubDate>Sun, 22 Nov 2009 08:27:58 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.gnome.org/stw/2009/11/21/21-11-2009-more-secure-than-aes-mode-fmc/#comment-41</guid>
		<description>@Dan: I admit that I am not an experienced cryptographer, but I still believe the proposal is good. I can not do anything about the fact that so far you didn&#039;t read the proposal, but I can try to illustrate why it certainly is not easier to break than plain AES.

Suppose you have a pair of algorithms: encode and decode, and you encrypt/decrypt using AES-CBC like this:

C = E_S (encode (P))
P = decode (D_S (C))

Then if encode and decode do not depend on the secret key S, and AES is secure, the resulting algorithm should also be secure.

Examples of encode and decode are:
1. encode (P) = bzip2 compress P
2. encode (P) = P &#124;&#124; SHA-256 (P)
3. encode (P) = store first letter and then only diffs to last letter
4. all &quot;inner&quot; steps used in FMC mode</description>
		<content:encoded><![CDATA[<p>@<a href="http://blogs.gnome.org/stw/2009/11/21/21-11-2009-more-secure-than-aes-mode-fmc/#comment-38">Dan</a>: I admit that I am not an experienced cryptographer, but I still believe the proposal is good. I can not do anything about the fact that so far you didn&#8217;t read the proposal, but I can try to illustrate why it certainly is not easier to break than plain AES.</p>
<p>Suppose you have a pair of algorithms: encode and decode, and you encrypt/decrypt using AES-CBC like this:</p>
<p>C = E_S (encode (P))<br />
P = decode (D_S (C))</p>
<p>Then if encode and decode do not depend on the secret key S, and AES is secure, the resulting algorithm should also be secure.</p>
<p>Examples of encode and decode are:<br />
1. encode (P) = bzip2 compress P<br />
2. encode (P) = P || SHA-256 (P)<br />
3. encode (P) = store first letter and then only diffs to last letter<br />
4. all &#8220;inner&#8221; steps used in FMC mode</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan</title>
		<link>http://blogs.gnome.org/stw/2009/11/21/21-11-2009-more-secure-than-aes-mode-fmc/comment-page-1/#comment-38</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Sat, 21 Nov 2009 21:50:16 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.gnome.org/stw/2009/11/21/21-11-2009-more-secure-than-aes-mode-fmc/#comment-38</guid>
		<description>Cryptography is hard. Googling for your name doesn&#039;t turn up any evidence that you&#039;re an experienced cryptosystem designer, so I&#039;m going to guess (without reading it) that your proposal is actually easier to break than plain AES.

http://www.schneier.com/blog/archives/2009/09/the_cult_of_sch.html</description>
		<content:encoded><![CDATA[<p>Cryptography is hard. Googling for your name doesn&#8217;t turn up any evidence that you&#8217;re an experienced cryptosystem designer, so I&#8217;m going to guess (without reading it) that your proposal is actually easier to break than plain AES.</p>
<p><a href="http://www.schneier.com/blog/archives/2009/09/the_cult_of_sch.html" rel="nofollow">http://www.schneier.com/blog/archives/2009/09/the_cult_of_sch.html</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>
<!-- This Quick Cache file was built for (  blogs.gnome.org/stw/2009/11/21/21-11-2009-more-secure-than-aes-mode-fmc/feed/ ) in 1.22425 seconds, on Feb 11th, 2012 at 4:38 am UTC. -->
<!-- This Quick Cache file will automatically expire ( and be re-built automatically ) on Feb 11th, 2012 at 5:38 am UTC -->
