<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
	xmlns:media="http://search.yahoo.com/mrss/"
>

<channel>
	<title>Raullen &#187; Cryptography</title>
	<atom:link href="http://www.raullen.net/category/cryptography/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.raullen.net</link>
	<description>上善若水</description>
	<lastBuildDate>Tue, 20 Jul 2010 17:43:15 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<!-- podcast_generator="podPress/8.8" - maintenance_release="8.8.4" -->
		<copyright>Copyright &#xA9; 2010 Raullen </copyright>
		<managingEditor>admin@raullen.net ()</managingEditor>
		<webMaster>admin@raullen.net ()</webMaster>
		<category>posts</category>
		<itunes:keywords></itunes:keywords>
		<itunes:subtitle></itunes:subtitle>
		<itunes:summary>On the way...</itunes:summary>
		<itunes:author></itunes:author>
		<itunes:category text="Society &amp; Culture"/>
		<itunes:owner>
			<itunes:name></itunes:name>
			<itunes:email>admin@raullen.net</itunes:email>
		</itunes:owner>
		<itunes:block>No</itunes:block>
		<itunes:explicit>no</itunes:explicit>
		<itunes:image href="http://www.raullen.net/wp-content/plugins/podpress/images/powered_by_podpress_large.jpg" />
		<image>
			<url>http://www.raullen.net/wp-content/plugins/podpress/images/powered_by_podpress.jpg</url>
			<title>Raullen</title>
			<link>http://www.raullen.net</link>
			<width>144</width>
			<height>144</height>
		</image>
		<item>
		<title>Shabal Cryptographic Hash Algorithm之前世今生（1）</title>
		<link>http://www.raullen.net/2009/12/08/shabal-cryptographic-hash-algorithm%e4%b9%8b%e5%89%8d%e4%b8%96%e4%bb%8a%e7%94%9f%ef%bc%881%ef%bc%89/#utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=shabal-cryptographic-hash-algorithm%25e4%25b9%258b%25e5%2589%258d%25e4%25b8%2596%25e4%25bb%258a%25e7%2594%259f%25ef%25bc%25881%25ef%25bc%2589</link>
		<comments>http://www.raullen.net/2009/12/08/shabal-cryptographic-hash-algorithm%e4%b9%8b%e5%89%8d%e4%b8%96%e4%bb%8a%e7%94%9f%ef%bc%881%ef%bc%89/#comments</comments>
		<pubDate>Tue, 08 Dec 2009 04:26:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Cryptography]]></category>
		<category><![CDATA[Hash]]></category>

		<guid isPermaLink="false">http://www.raullen.net/1237.html</guid>
		<description><![CDATA[今天看了罗岚师姐的一篇关于SHA3算法第二轮点评的文章，其中对于Shabal赞赏有佳。Check了一下NIST他们自己的第二阶段总结报告，看来对于Shabal的总评价都是“大家手笔、设计优雅、创意出众、教科书般的可证明安全”。正好最近在搞一个轻量级one-way function的设计，就花些时间看看吧。
值得一提的是，Shabal提交的设计文档那就是与众不同，沉甸甸的300多页啊~~~ 不愧是背后有法国众多财团支持的设计。研究这玩意儿就是这样，只有让researcher们吃饱了喝足了他们才能干出好的活儿来。
书归正传。这份设计文档写的非常不错，第一章基本可以作为hash设计的一个survey了，非常适合我这种没有怎么搞过hash设计的人学习、思考。这里总结如下：他们首先提了一个通用的“iterative hash function construction”。这个提纲挈领的图（列在下面，源自Shabal提交的设计文档，下同）做了一个非常到位的总结，基本上概括了现在所有已知hash function的设计方法。剩下的工作不外乎是如何把R、F、T这三个函数优化优化，提高hash的吞吐量而已。
 
&#160;
比如说，很有名的Damgard Merkle结构（下图）其实就是这个通用框架的简化版（但不安全，已经不能用了）。后续有一些工作就是improve DM框架的，思路不外乎三个输入、中间环节和输出。对于输入，我们不能全部padding “0”了， 那样太不安全；对于中间环节，加个counter计数（像block cipher的counter mode），再有就是最后几轮迭代用不同的函数来产生“Discontinuity”的性质；对于输出，能truncated的就一定要truncated。

顺便搜了一下才发现Merkel有多牛。我们经常使用他发明的Merkel Tree, Merkel’s Puzzles, Damgard Merkel Construciton, 但搞了半天这哥们儿竟然是做纳米材料的或者说现在转行做纳米材料了~~~。还有关于Merkel的一个有趣的小故事（引自）：
关于背包算法，Tanenbaum的《Computer Networks》（4th）中讲述了一个有趣的故事：背包算法设计这Merkle曾悬赏100美金破解该算法，RSA组合中的S，即Shamir迅速破解算法并领走奖金。Merkle于是增强了算法，再次悬赏破解，奖金加到1000美金。RSA组合中的R，即Rivest又迅速破解领走奖金。此后Merkle就没再悬赏了，因此RSA组合中的另外一个人A，即Adleman也就没能拿到预期的10000美金了。从这个故事可以看出RSA这个信息安全领域的黄金组合的确超级牛叉！

除了DM结构，欧米会上有几个老外提出来了“密码学海绵函数（Cryptographic Sponges）”的概念~~~ 说这个函数有两个过程“吸收”和“挤出”跟海绵似的。本质上所有hash function都是有这两个阶段的，前面若干轮都是通过自反馈提高Linear Span，最后几轮才输出。这些老外还真是会包装自己、炒作概念啊！！ 
Cryptographic Sponges 结构如下图。其实我们不难看出它实际上也被包括在那个general construction里面，而且也其实是DM结构的一种变形。他用T去模仿压缩函数。实际应用中可用作hash校验、MAC、流密码。然后他们证明了一下“Indifferentiability”。 具体的可以看看他们的网页，图和slides做的不错：http://sponge.noekeon.org/。 SHA3征集的算法里面，我大致浏览了一下，也有4、5个采用了这种设计思想。
Share on Facebook


分享到


















]]></description>
		<wfw:commentRss>http://www.raullen.net/2009/12/08/shabal-cryptographic-hash-algorithm%e4%b9%8b%e5%89%8d%e4%b8%96%e4%bb%8a%e7%94%9f%ef%bc%881%ef%bc%89/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>2.9米，密码学难以逾越的天堑！浅谈Paypass的安全模块</title>
		<link>http://www.raullen.net/2009/12/04/%e8%b0%88%e8%b0%88paypass%e4%b8%ad%e7%9a%84%e5%af%86%e7%a0%81%e5%ad%a6/#utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=%25e8%25b0%2588%25e8%25b0%2588paypass%25e4%25b8%25ad%25e7%259a%2584%25e5%25af%2586%25e7%25a0%2581%25e5%25ad%25a6</link>
		<comments>http://www.raullen.net/2009/12/04/%e8%b0%88%e8%b0%88paypass%e4%b8%ad%e7%9a%84%e5%af%86%e7%a0%81%e5%ad%a6/#comments</comments>
		<pubDate>Thu, 03 Dec 2009 23:34:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Cryptography]]></category>
		<category><![CDATA[Paypass]]></category>

		<guid isPermaLink="false">http://www.raullen.net/1222.html</guid>
		<description><![CDATA[偷得浮生半日闲，今天下午查了查PayPass技术以及在之上可以做的研究方向和可行性。就懒得写报告了，简单写个博文吧~~~
PayPass 是MasterCard（万事达卡）国际组织2003 年推出的一种无线支付技术，从2004 年开始在全球开始推广。持卡人只要将银行卡在专用非接触式读卡器前挥动，即可完成传统形式的银行交易，而不用像以前一样，需要将卡片从读卡器插槽中划过。
Paypass 卡与传统银行卡的特点对比如下：

&#160;
以下摘自新闻：恩智浦SmartMX IC获得MasterCard PayPass认证
恩智浦半导体（NXP Semiconductors，由飞利浦创建的独立半导体公司）日前宣布其非接触银行芯片——SmartMX P5CD012应用到奥地利卡公司的银行卡中（半天线尺寸），该芯片具有行业标竿385毫秒的交易速度，并已得到MasterCard（以下简称万事达卡）PayPass认证。这项解决方案将确保发卡商和银行机构为消费者提供快速、安全的支付卡并让消费者享受最佳的非接触支付体验——取代现金并减少排队等待。为实现更短的支付处理时间，恩智浦采用了最新的双界面SmartMX P5CD016产品线，其处理非接触交易的时间比市场同类产品快35%。
&#160;
接下来查了一下这款看似技术处于行业内领先地位的芯片family，它的全名叫做：
P5Cx012/02x/40/73/80/144 family &#8211; Secure dual interface and contact PKI smart card controller&#160;
以下慢慢解释他为什么叫这个NB的名字

-&#160;&#160;&#160; 支持两种接口contact和contactless，前者是用的ISO/IEC 7816标准 后者是扩展性非常强的ISO/IEC 14443 A的标准，顾名思义 Dual Interface~~
-&#160;&#160;&#160; 更为NB的是这个芯片有超强的密码学功能，怪不得叫做&#160;&#160; Secure XXXXXXX PKI XXXXXXXXXX智能卡控制器，这些密码学功能是通过三个协处理器做到的：
-&#160;&#160;&#160; 第一个叫做Triple-DES coprocessor，用来做3DES加解密的，速度号称在40 us之内，密钥长度应该是64位
-&#160;&#160;&#160; 第二个叫做AES coprocessor，用来做AES的，supports key lengths of 128-bit, 192-bit, and      256-bit with performance levels comparable to [...]]]></description>
		<wfw:commentRss>http://www.raullen.net/2009/12/04/%e8%b0%88%e8%b0%88paypass%e4%b8%ad%e7%9a%84%e5%af%86%e7%a0%81%e5%ad%a6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>用NTL在扩域上做运算</title>
		<link>http://www.raullen.net/2009/11/25/%e7%94%a8ntl%e5%9c%a8%e6%89%a9%e5%9f%9f%e4%b8%8a%e5%81%9a%e8%bf%90%e7%ae%97-2/#utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=%25e7%2594%25a8ntl%25e5%259c%25a8%25e6%2589%25a9%25e5%259f%259f%25e4%25b8%258a%25e5%2581%259a%25e8%25bf%2590%25e7%25ae%2597-2</link>
		<comments>http://www.raullen.net/2009/11/25/%e7%94%a8ntl%e5%9c%a8%e6%89%a9%e5%9f%9f%e4%b8%8a%e5%81%9a%e8%bf%90%e7%ae%97-2/#comments</comments>
		<pubDate>Wed, 25 Nov 2009 02:09:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Cryptography]]></category>
		<category><![CDATA[NTL]]></category>

		<guid isPermaLink="false">http://www.raullen.net/1210.html</guid>
		<description><![CDATA[NTL （http://www.shoup.net/ntl/）是 Victor Shoup 写的一个高效率的基于C++的大数高精度运算库，
可惜的是已经停止开发。这个库对密码学所需要的数论运算、有限域运算有很好的支持。
这个库很不错 美中不足的是手册太简要了，尤其是例子比较缺乏。
另外对每个接口函数的描述也不够清晰（毕竟不是搞软件的人啊~~呵呵）。
下面记录下在implement自己论文的scheme同时，学习NTL（有限域部分）的一点体会。 
查了一些资料（谢谢数缘社区的朋友们 ）
&#160;
#include &#60;fstream&#62;
#include &#60;NTL/GF2E.h&#62;
#include &#60;NTL/GF2EX.h&#62;

#pragma comment(lib,&#34;NTLLIB.lib&#34;) //使用NTL静态库

NTL_CLIENT

int main()
{

	/*例子1：GF2X上的多项式加法
	GF2X a = GF2X(10, 1);
	SetCoeff(a, 3, 1);
	GF2X b, c;
	random(b,10);
	c = a + b;
	cout &#60;&#60; &#34;a=&#34; &#60;&#60; a &#60;&#60; &#34;\nb=&#34; &#60;&#60; b &#60;&#60; &#34;\nc=&#34; &#60;&#60; c &#60;&#60; &#34;\n&#34;;*/

	//例子2：GF(2^8)上面的加法
	GF2X f;
	//BuildIrred(p, 4);定义一个不可约多项式 也可以让系统帮你随一个
	SetCoeff(f,8,1);
	SetCoeff(f,7,1);
	SetCoeff(f,6,1);
	SetCoeff(f,3,1);
	SetCoeff(f,2,1);
	SetCoeff(f,1,1);
	SetCoeff(f,0,1);
	GF2E::init(f);
	GF2EX A, B;
	//random(A, 2);
	//random(B, 2); 可以random 
	//也可以从文件里面读入 读入格式是
	//[[] [1]]
	//[[1 1 0 1 1 [...]]]></description>
		<wfw:commentRss>http://www.raullen.net/2009/11/25/%e7%94%a8ntl%e5%9c%a8%e6%89%a9%e5%9f%9f%e4%b8%8a%e5%81%9a%e8%bf%90%e7%ae%97-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Lightweight Crypto</title>
		<link>http://www.raullen.net/2009/07/10/lightweight-crypto/#utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=lightweight-crypto</link>
		<comments>http://www.raullen.net/2009/07/10/lightweight-crypto/#comments</comments>
		<pubDate>Fri, 10 Jul 2009 01:01:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Cryptography]]></category>

		<guid isPermaLink="false">http://www.raullen.net/790.html</guid>
		<description><![CDATA[ 

Share on Facebook


分享到


















]]></description>
		<wfw:commentRss>http://www.raullen.net/2009/07/10/lightweight-crypto/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
