CN101527627A - 一种改进的Ri jndael算法 - Google Patents

一种改进的Ri jndael算法 Download PDF

Info

Publication number
CN101527627A
CN101527627A CN200810034309A CN200810034309A CN101527627A CN 101527627 A CN101527627 A CN 101527627A CN 200810034309 A CN200810034309 A CN 200810034309A CN 200810034309 A CN200810034309 A CN 200810034309A CN 101527627 A CN101527627 A CN 101527627A
Authority
CN
China
Prior art keywords
key
algorithm
state
prime
byte
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN200810034309A
Other languages
English (en)
Inventor
邵斌彬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Individual
Original Assignee
Individual
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Individual filed Critical Individual
Priority to CN200810034309A priority Critical patent/CN101527627A/zh
Publication of CN101527627A publication Critical patent/CN101527627A/zh
Pending legal-status Critical Current

Links

Landscapes

  • Storage Device Security (AREA)

Abstract

本发明通过深入分析Rijndael算法,改进了算法的几个有可能产生不安全隐患的步骤,首先是对于最可能被攻击的混列(MixColumns)进行的优化,使该步骤变成简单的查表而不是域乘,增加了非线形安全性;而对于子密钥的生成方面我们引入了随机函数使密钥的生成和选择变成随机性的,而不是原算法简单的线形选择,这样就几乎可以完全抵抗线形密码分析的攻击了。

Description

一种改进的Ri jndael算法
技术领域
本发明专利涉及信息安全技术。尤其是用于保护敏感信息的AES(Advanced Encryption Standard)技术。
背景技术
1997年4月15日美国国家标准技术研究所(NIST)发起征集AES(Advanced Encryption Standard)算法的活动,并专门成立了AES工作组。目的是为了确定一个非保密的、公开披露的、全球免费使用的分组密码算法,用于保护21世纪政府的敏感信息。1997年9月12日在联邦登记处(FR)公布了征集AES候选算法的通告。AES的要求是比三重DES快而且至少和三重DES一样安全,分组长度为128比特,密钥长度为128、192、256比特。后来,NIST从15个算法中筛选出了5个AES候选算法,它们是RC6、Mars、Rijndael、Serpent和Twofish。最终,由比利时设计者Joan Daemen和Vincent Rijmen设计的Rijndael算法胜出。
发明内容
加密解密过程
Rijndael加密算法是分组长度可变、密钥长度也可变的分组密码。分组长度、密钥长度彼此独立地确定为128、192、256比特。
1、字节转换(SubBytes)
字节转换是一个以字节为单位的非线性取代运算,取代表(S-Box)是经过两个运算过程而建立,并且是可逆的。首先找出每个字节在GF(28)中的乘法反元素;接着经过一个仿射(Affine)转换运算,字节取代(SubBytes)运算对State的影响,经过运算后形成的S-box。
字节取代(SubBytes)转换的反运算:计算仿射对应之后的相反运算可得到S-1-Box,以此S-1-Box做字节取代(SubBytes)即可。
2、移行转换(ShiftRows transformation)
在这个转换中,State的每一行以不同的偏移量做环状位移,第0行不动,第一行位移C1个字节,第二行位移C2个字节,第三行位移C3个字节。位移的偏移量C1,C2,C3跟区块的数目(Nb)有关,定义如表1。移行转换(ShiftRows)运算对于State的影响,如图2。移行转换(ShiftRows)的反运算:对第二、第三及第四行做Nb-C1,Nb-C2,Nb-C3个字节的环状位移即可。
3、混列转换(MixColumns transformation)
在这个转换中,把State当作一个存在GF(28)中的多项式。并且对一个固定的多项式c(x)作乘法,如果发生溢位,则再模余x4+1。表示如下:
c(x)=′03′x3+′01′x2+′01′x+′02′
c(x)与x4+1互质,令 b ( x ) = c ( x ) ⊕ a ( x ) .
混列(MixColumns)转换的反运算,则是乘上一个特殊的多项式d(x),
( 03 ′ ′ x 3 + 01 ′ ′ x 2 + 01 ′ ′ x + 02 ′ ′ ) ⊕ d ( x ) = 01 ′ ′ d ( x ) = 0 B ′ ′ x 3 + 0 D ′ ′ x 2 + 09 ′ ′ x + 0 E ′ ′ .
4、轮密钥加(AddRoundKey)
这个运算主要是把每一个回合密钥(Round Key)透过简单的bitwise EXOR加入到每一个State中AddRoundKey的逆是它自身。
5、MixColumns变换的优化技术
针对AES密码最可能成功的攻击来自一个允许时间选择攻击的弱实现[3,5]。攻击者用不同的密钥并精确地测量出加密例程所需的时间。如果加密例程被粗心编码,执行时间便依赖于密钥值,它就有可能推导出有关密钥的信息。在AES中,这种事情最可能发生在MixColumns例程中,因为有域乘。针对这种攻击的最稳妥的安全措施是将域乘实现为一个查询表。
乘法所用的常量系数基于域论的,并且是0x01,0x02或0x03中的任意一个值。如给定某一列c,其替代式如下:
State[0,c]=0x02*State[0,c]+0x03*State
[1,c]+0x01*State[2,c]+0x0 1*State[3,c]
State[1,c]=0x01*State[0,c]+0x02*State
[1,c]+0x03*State[2,c]+0x01*State[3,c]
State[2,c]=0x01*State[0,c]+0x0 1*State
[1,c]+0x02*State[2,c]+0x03*State[3,c]
State[3,c]=0x03*State[0,c]+0x01*State
[1,c]+0x01*State[2,c]+0x02*State[3,c]
由以上公式计算出每一个可能的值,从而形成一张表,然后进行类似于S-box的砖匠置换。所以当做MixColumns变换时只要查表即可,不需要用域乘,这样就增加了差分分析攻击的难度。
6、子密钥生成优化
子密钥是由密钥导出的,这个过程包含了两个组成部分,一个是密钥扩展,另一个是轮子密钥的选取,其基本原理有如下3点[6]
(1)轮子密钥的比特数总和等于分组长度乘以轮的数目加1,即每分组长128比特,轮数等于10时,轮子密钥的比特数总和为128×(10+1)=1408比特。
(2)密钥扩充为扩展密钥(Expanded Key)。
(3)轮子密钥是由这些扩展密钥中取出来的,第1轮子密钥由最先Nb个字组成,第2轮子密钥为其次Nb个字等。
7、密钥的扩充(Key Expansion)
扩充后的密钥是一个4-byte的线性数组,表示为W[Nb×(Nr+1)],前Nk个字组包含了加密密钥(CipherKey)。密钥扩充函式和Nk是息息相关的,分为两种情况运作,一是当Nk小于或等于6,另外则是当Nk大于6,以伪码叙述如下:
当Nk≤6时,
KeyExpansion(byte Key[4×Nk]word W[Nb×(Nr+1)])
{
for(i=0;i<Nk;i++)
W[i]=(Key[4×i],Key[4×i+1],Key[4×i+2],Key[4×i+3]);
for(i=Nk;i<Nb×(Nr+1);i++)
{
temp=W[i-1];
if(i%Nk==0)
temp=SubByte(RotByte(temp))^Rcon[i/Nk];
W[i]=W[i-Nk]^temp;
}
}
在上面的子程序中,SubByte(W)传回一个4-byte的字组,这些字组是输入的字组经过S-box的转换所产生的相对字组。RotByte(W)则是传回经过旋转的字组。
当Nk>6时,
KeyExpansion(byte Key[4×Nk]word W[Nb×(Nr+1)])
{
for(i=0;i<Nk;i++)
W[i]=(key[4×i],key[4×i+1],key[4×i+2],key[4×i+3]);
for(i=Nk;i<Nb×(Nr+1);i++)
{
temp=W[i-1];
if(i%Nk==0)
temp=SubByte(RotByte(temp))^Rcon[i/Nk];
else if(i%Nk==4)
temp=SubByte(temp);
W[i]=W[i-Nk]^temp;
}
}
以上两种情况的相异处在于当Nk≤6时,(i-4)是Nk的倍数时,对于W[i-1]先执行SubByte,再执行EXOR。上述回合常数定义如下:
Rcon[i]=(RC[i],‘00’,‘00’,‘00’),其中RC[0]=’01’,RC[i]=x(RC[i-1])=x(i-1)
由以上分析可得出如下公式:
RC[i]=randrom[](RC[i-1])=x(i-1)
第一次生成RC[I]的时候按照原来的方式利用线性同余法生成伪随机数I,从而选择运算对象rand[I],具体的公式如下:
RC[I]=(RC[I-1])·Random(K)其中k为小于1的任何数
产生Random(K)的函数:
Random(n,m,seed,a,b)
{
  r0=seed;
  for(i=1;i<=n;i++)
  ri=(a*ri-1+b)mod m;
}
其中将种子参数seed设为计算机当前的日期或者时间;m是一个较大数,可以把它取为2w,w是计算机的字长;a可以是0.01w和0.99w之间的任何整数;n等于当前(I-1)。这样就可以方便的产生出随机的参与异或运算的对象rand[I]。密钥生成后把所有的子密钥形成一个表,而在密钥选择阶段同样可以使用随机函数,打乱子密钥选择的规律性,使生成各列子密钥的过程具有完全的随机性。但是由于算法中用到了加密者的本地时间作为seed,而解密者不一定与加密者时间统一,为了解决这个问题,决定用数字时间戳(digital time-stamp)系统,该系统可以让通信双方遵守同样的时间,而算法中只要把取的系统时间加入到密文里的某个只有双方才知道的特殊位置(或者直接加入明文里加密也可)就可以使解密者很容易地对密文进行解密了。当然,以上方法只能应用在网络中,但是它给Rijndael带来的安全性是前所未有的,并且跟通信系统紧密联合在一起。
具体实施方式
可将对齐方案在计算机上实现,构成最终系统。

Claims (1)

1.专利申请中提出的首先是对于最可能被攻击的混列进行的优化,使该步骤变成简单的查表而不是域乘,而对于子密钥的生成方面使用了引入了随机函数使密钥的生成和选择变成随机性的,而不是原算法简单的线形选择。
CN200810034309A 2008-03-06 2008-03-06 一种改进的Ri jndael算法 Pending CN101527627A (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200810034309A CN101527627A (zh) 2008-03-06 2008-03-06 一种改进的Ri jndael算法

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200810034309A CN101527627A (zh) 2008-03-06 2008-03-06 一种改进的Ri jndael算法

Publications (1)

Publication Number Publication Date
CN101527627A true CN101527627A (zh) 2009-09-09

Family

ID=41095338

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200810034309A Pending CN101527627A (zh) 2008-03-06 2008-03-06 一种改进的Ri jndael算法

Country Status (1)

Country Link
CN (1) CN101527627A (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102571330A (zh) * 2012-02-01 2012-07-11 王勇 一种基于随机函数的分组加密算法的构造方法
CN103516513A (zh) * 2013-10-22 2014-01-15 桂林电子科技大学 基于随机函数的抗已知明文密文对攻击的分组加密方法
CN103607276A (zh) * 2013-12-05 2014-02-26 桂林电子科技大学 新型基于随机函数的抗已知明文密文对攻击的分组加密方法

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102571330A (zh) * 2012-02-01 2012-07-11 王勇 一种基于随机函数的分组加密算法的构造方法
CN102571330B (zh) * 2012-02-01 2014-07-30 桂林电子科技大学 一种基于随机函数的分组加密算法的构造方法
CN103516513A (zh) * 2013-10-22 2014-01-15 桂林电子科技大学 基于随机函数的抗已知明文密文对攻击的分组加密方法
CN103607276A (zh) * 2013-12-05 2014-02-26 桂林电子科技大学 新型基于随机函数的抗已知明文密文对攻击的分组加密方法
CN103607276B (zh) * 2013-12-05 2017-06-30 桂林电子科技大学 基于随机函数的抗已知明文密文对攻击的分组加密方法

Similar Documents

Publication Publication Date Title
EP2273472B1 (en) Coder equipped with common key code function and built-in equipment
Karthigaikumar et al. Simulation of image encryption using AES algorithm
CN1819515B (zh) 一种保密型对称密码算法的实现方法
Mohan et al. Performance analysis of AES and MARS encryption algorithms
US20110150225A1 (en) Encryption devices for block having double block length, decryption devices, encryption method, decryption method, and programs thereof
Pradeep et al. Random key and key dependent s-box generation for aes cipher to overcome known attacks
Manjula et al. Improved dynamic S-box generation using hash function for AES and its performance analysis
Wright The advanced encryption standard
Kim et al. DES with any reduced masked rounds is not secure against side-channel attacks
Mersaid et al. The encryption algorithm AES-RFWKIDEA32-1 based on network RFWKIDEA32-1
Ojha et al. An Innovative Approach to Enhance the Security of Data Encryption Scheme
CN101527627A (zh) 一种改进的Ri jndael算法
Rawal Advanced encryption standard (AES) and it’s working
Mohan et al. Revised aes and its modes of operation
Singh et al. Enhancing AES using novel block key generation algorithm and key dependent S-boxes
Wang et al. A one-way coupled chaotic map lattice based self-synchronizing stream cipher
Sulaiman et al. Modified 128-EEA2 Algorithm by Using HISEC Lightweight Block Cipher Algorithm with Improving the Security and Cost Factors
Azzawi Enhancing the encryption process of advanced encryption standard (AES) by using proposed algorithm to generate S-Box
Li et al. Key recovery attacks on reduced-round Joltik-BC in the single-key setting
Mirsaid et al. The encryption algorithm AES-RFWKPES32-4
Salman New method for encryption using mixing advanced encryption standard and blowfish algorithms
Khatri et al. Comparison of power consumption and strict avalanche criteria at encryption/decryption side of different AES standards
Mohan et al. Improving the Diffusion power of AES Rijndael with key multiplication
Kumar Full-round differential attack on DoT block cipher
Hu Progress in the Advanced Encryption Standard

Legal Events

Date Code Title Description
C57 Notification of unclear or unknown address
DD01 Delivery of document by public notice

Addressee: Shao Binbin

Document name: Notification of Passing Preliminary Examination of the Application for Invention

C06 Publication
PB01 Publication
C57 Notification of unclear or unknown address
DD01 Delivery of document by public notice

Addressee: Shao Binbin

Document name: Notification of Publication of the Application for Invention

DD01 Delivery of document by public notice

Addressee: Shao Binbin

Document name: Notification of before Expiration of Request of Examination as to Substance

DD01 Delivery of document by public notice

Addressee: Shao Binbin

Document name: Notification that Application Deemed to be Withdrawn

C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Open date: 20090909