没有合适的资源?快使用搜索试试~ 我知道了~
camellia加密算法介绍
![star](https://csdnimg.cn/release/downloadcmsfe/public/img/star.98a08eaa.png)
温馨提示
![preview](https://dl-preview.csdnimg.cn/9399455/0001-b7c2524d4bedac09db803c9364ae2901_thumbnail.jpeg)
![preview-icon](https://csdnimg.cn/release/downloadcmsfe/public/img/scale.ab9e0183.png)
试读
21页
详细介绍了camellia加密算法的操作过程,适合新人阅读。末尾有例子,亲测正确。
资源推荐
资源详情
资源评论
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![gz](https://img-home.csdnimg.cn/images/20210720083447.png)
![crx](https://img-home.csdnimg.cn/images/20210720083646.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![](https://csdnimg.cn/release/download_crawler_static/9399455/bg1.jpg)
Specification of Camellia — a 128-bit Block Cipher
Kazumaro AOKI
†
,TetsuyaICHIKAWA
‡
, Masayuki KANDA
†
,
Mitsuru MATSUI
‡
, Shiho MORIAI
†
, Junko NAKAJIMA
‡
,ToshioTOKITA
‡
†
Nippon Telegraph and Telephone Corporation,
‡
Mitsubishi Electric Corporation
March 10, 2000
Contents
1 Introduction 2
2 Notations and Conventions 2
2.1 Radix............................................ 2
2.2 Notations.......................................... 2
2.3 ListofSymbols....................................... 2
2.4 Bit/ByteOrdering ..................................... 2
3 Structure of Camellia 4
3.1 ListofFunctionsandVariables.............................. 4
3.2 EncryptionProcedure ................................... 4
3.2.1 128-bit key . . . . . . . . . ............................ 4
3.2.2 192-bit and 256-bit key . . . ............................ 5
3.3 DecryptionProcedure ................................... 5
3.3.1 128-bit key . . . . . . . . . ............................ 5
3.3.2 192-bit and 256-bit key . . . ............................ 6
3.4 KeySchedule........................................ 7
4ComponentsofC amellia 9
4.1 F-function.......................................... 9
4.2 FL-function ........................................ 9
4.3 FL
−1
-function....................................... 9
4.4 S-function......................................... 9
4.5 s-boxes ........................................... 10
4.6 P -function.......................................... 14
AFiguresoftheCamellia Algorithm 15
BTestData 21
1
![](https://csdnimg.cn/release/download_crawler_static/9399455/bg2.jpg)
Copyrigh t NTT and Mitsubishi Electric Corporation 2
1 Introduction
This document shows a complete description of the encryption algorithm Camellia, which is a secret
key cipher with 128-bit data block and 128/192/256-bit secret key.
2 Notations and Conventions
2.1 Radix
We use the prefix 0x to indicate hexadecimal numbers.
2.2 Notations
Throughout this document, the following notations are used.
• B denotes a vector space of 8-bit (byte) elements; that is, B := GF(2)
8
.
• W denotes a vector space of 32-bit (word) elements; that is, W := B
4
.
• L denotes a vector space of 64-bit (double word) elements; that is, L := B
8
.
• Q denotes a vector space of 128-bit (quad word) elements; that is, Q := B
16
.
• An element with the suffix
(n)
(e.g. x
(n)
) shows that the element is n-bit long.
• An element with the suffix
L
(e.g. x
L
) denotes left-half part of x.
• An element with the suffix
R
(e.g. x
R
) denotes right-half part of x.
The suffix
(n)
will be omitted if no ambiguity is expected. See section 2.4 for numerical examples
of “left” and “right”.
2.3 List of Symbols
⊕ The bitwise exclusive-OR operation.
|| The concatenation of the two operands.
<<<
n
The left circular rotation of the operand by n bits.
∩ The bitwise AND operation.
∪ The bitwise OR operation.
x The bitwise complement of x.
2.4 Bit/Byte Ordering
We adopt big endian ordering. The following example shows how to compose a 128-bit value Q
(128)
of two 64-bit values L
i(64)
(i =1, 2), four 32-bit values W
i(32)
(i =1, 2, 3, 4), sixteen 8-bit values
B
i(8)
(i =1, 2,...,16), or 128 1-bit values E
i(1)
(i =1, 2,...,128), respectively.
![](https://csdnimg.cn/release/download_crawler_static/9399455/bg3.jpg)
Copyrigh t NTT and Mitsubishi Electric Corporation 3
Q
(128)
= L
1(64)
||L
2(64)
= W
1(32)
||W
2(32)
||W
3(32)
||W
4(32)
= B
1(8)
||B
2(8)
||B
3(8)
||B
4(8)
|| ......||B
13(8)
||B
14(8)
||B
15(8)
||B
16(8)
= E
1(1)
||E
2(1)
||E
3(1)
||E
4(1)
|| ..................||E
125(1)
||E
126(1)
||E
127(1)
||E
128(1)
Numerical examples:
Q
(128)
= 0x0123456789ABCDEF0011223344556677
(128)
L
1(64)
= Q
L(64)
= 0x0123456789ABCDEF
(64)
L
2(64)
= Q
R(64)
= 0x0011223344556677
(64)
W
1(32)
= L
1L(32)
= 0x01234567
(32)
W
2(32)
= L
1R(32)
= 0x89ABCDEF
(32)
W
3(32)
= L
2L(32)
= 0x00112233
(32)
W
4(32)
= L
2R(32)
= 0x44556677
(32)
B
1(8)
= 0x01
(8)
,B
2(8)
= 0x23
(8)
,B
3(8)
= 0x45
(8)
,B
4(8)
= 0x67
(8)
,
B
5(8)
= 0x89
(8)
,B
6(8)
= 0xAB
(8)
,B
7(8)
= 0xCD
(8)
,B
8(8)
= 0xEF
(8)
,
B
9(8)
= 0x00
(8)
,B
10(8)
= 0x11
(8)
,B
11(8)
= 0x22
(8)
,B
12(8)
= 0x33
(8)
,
B
13(8)
= 0x44
(8)
,B
14(8)
= 0x55
(8)
,B
15(8)
= 0x66
(8)
,B
16(8)
= 0x77
(8)
,
E
1(1)
= 0
(1)
,E
2(1)
= 0
(1)
,E
3(1)
= 0
(1)
,E
4(1)
= 0
(1)
,
E
5(1)
= 0
(1)
,E
6(1)
= 0
(1)
,E
7(1)
= 0
(1)
,E
8(1)
= 1
(1)
,
.
.
.
E
121(1)
= 0
(1)
,E
122(1)
= 1
(1)
,E
123(1)
= 1
(1)
,E
124(1)
= 1
(1)
,
E
125(1)
= 0
(1)
,E
126(1)
= 1
(1)
,E
127(1)
= 1
(1)
,E
128(1)
= 1
(1)
.
Q
(128)
<<<
1
= E
2(1)
||E
3(1)
||E
4(1)
||E
5(1)
|| ..................||E
125(1)
||E
126(1)
||E
127(1)
||E
128(1)
||E
1(1)
= 0x02468ACF13579BDE0022446688AACCEE
(128)
![](https://csdnimg.cn/release/download_crawler_static/9399455/bg4.jpg)
Copyrigh t NTT and Mitsubishi Electric Corporation 4
3 Structure of Camellia
3.1 List of Functions and Variables
M
(128)
The plaintext block.
C
(128)
The ciphertext block.
K The secret key, whose length is 128, 192, or 256 bits.
kw
t(64)
,k
u(64)
,kl
v(64)
The subkeys.
(t =1, 2, 3, 4) (u =1, 2,...,18) (v =1, 2, 3, 4)
for 128-bit secret key.
(t =1, 2, 3, 4) (u =1, 2,...,24) (v =1, 2,...,6)
for 192-bit and 256-bit secret key.
Y
(64)
= F (X
(64)
, k
(64)
)TheF -function that transforms a 64-bit input X
(64)
to a
64-bit output Y
(64)
using a 64-bit subkey k
(64)
.
Y
(64)
= FL(X
(64)
,k
(64)
)TheFL-function that transforms a 64-bit input X
(64)
to a
64-bit output Y
(64)
using a 64-bit subkey k
(64)
.
Y
(64)
= FL
−1
(X
(64)
,k
(64)
)TheFL
−1
-function that transforms a 64-bit input X
(64)
to
a 64-bit output Y
(64)
using a 64-bit subkey k
(64)
.
Y
(64)
= S(X
(64)
)TheS-function that transforms a 64-bit input X
(64)
to a
64-bit output Y
(64)
.
Y
(64)
= P (X
(64)
)TheP -function that transforms a 64-bit input X
(64)
to a
64-bit output Y
(64)
.
y
(8)
= s
i
(x
(8)
)Thes-boxes that transform an 8-bit input to an 8-bit output
(i =1, 2, 3, 4).
3.2 Encryption Procedure
3.2.1 128-bit key
Figure 1 shows the encryption procedure for a 128-bit key. The data randomizing part has an
18-round Feistel structure with two FL/FL
−1
-function layers after the 6-th and 12-th rounds, and
128-bit XOR operations before the first round and after the last round. The key schedule part
generates subkeys kw
t(64)
(t =1, 2, 3, 4), k
u(64)
(u =1, 2,...,18) and kl
v(64)
(v =1, 2, 3, 4) from the
secret key K; see section 3.4 for details of the key schedule part.
In the data randomizing part, first the plaintext M
(128)
is XORed with kw
1(64)
||kw
2(64)
and
separated into L
0(64)
and R
0(64)
of equal length, i.e., M
(128)
⊕ (kw
1(64)
||kw
2(64)
)=L
0(64)
||R
0(64)
.
Then, the following operations are perfomed from r = 1 to 18, except for r = 6 and 12;
L
r
= R
r−1
⊕ F (L
r−1
,k
r
),
R
r
= L
r−1
.
![](https://csdnimg.cn/release/download_crawler_static/9399455/bg5.jpg)
Copyrigh t NTT and Mitsubishi Electric Corporation 5
For r = 6 and 12, the following is carried out;
L
r
= R
r−1
⊕ F (L
r−1
,k
r
),
R
r
= L
r−1
,
L
r
= FL(L
r
,kl
2r/6−1
),
R
r
= FL
−1
(R
r
,kl
2r/6
).
Lastly, R
18(64)
and L
18(64)
are concatenated and XORed with kw
3(64)
||kw
4(64)
.Theresultant
value is the ciphertext, i.e., C
(128)
=(R
18(64)
||L
18(64)
) ⊕ (kw
3(64)
||kw
4(64)
).
3.2.2 192-bit and 256-bit key
Figure 2 shows the encryption procedure for a 192-bit or 256-bit key. The data randomizing part
has a 24-round Feistel structure with three FL/FL
−1
-function layers after the 6-th, 12-th, and
18-th rounds, and 128-bit XOR operations before the first round and after the last round. The
key schedule part generates subkeys kw
t(64)
(t =1, 2, 3, 4), k
u(64)
(u =1, 2,...,24), and kl
v(64)
(v =1, 2,...,6) from the secret key K.
In the data randomizing part, first the plaintext M
(128)
is XORed with kw
1(64)
||kw
2(64)
and
separated into L
0(64)
and R
0(64)
of equal length, i.e., M
(128)
⊕ (kw
1(64)
||kw
2(64)
)=L
0(64)
||R
0(64)
.
Then, perform the following operations from r = 1 to 24, except for r = 6, 12, and 18;
L
r
= R
r−1
⊕ F (L
r−1
,k
r
),
R
r
= L
r−1
.
For r = 6, 12, and 18, perform the following;
L
r
= R
r−1
⊕ F (L
r−1
,k
r
),
R
r
= L
r−1
,
L
r
= FL(L
r
,kl
2r/6−1
),
R
r
= FL
−1
(R
r
,kl
2r/6
).
Lastly, R
24(64)
and L
24(64)
are concatenated and XORed with kw
3(64)
||kw
4(64)
.Theresultant
value is the ciphertext, i.e., C
(128)
=(R
24(64)
||L
24(64)
) ⊕ (kw
3(64)
||kw
4(64)
).
See section 4 for details of the F -function and FL/FL
−1
-functions.
3.3 Decryption P rocedure
3.3.1 128-bit key
The decryption procedure of Camellia can be done in the same way as the encryption procedure
by reversing the order of the subkeys.
剩余20页未读,继续阅读
资源评论
![avatar-default](https://csdnimg.cn/release/downloadcmsfe/public/img/lazyLogo2.1882d7f4.png)
- 徐孟奇2020-03-23全英文详解,挺详细
- lazychen10182017-02-22正在编写该算法的程序,该文档后面的例子正好用来验证程序写的是否正确。谢谢。
![avatar](https://profile-avatar.csdnimg.cn/dc89039848a04d62b261fea197794b12_sinat_22486933.jpg!1)
sinat_22486933
- 粉丝: 1
- 资源: 3
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助
![voice](https://csdnimg.cn/release/downloadcmsfe/public/img/voice.245cc511.png)
![center-task](https://csdnimg.cn/release/downloadcmsfe/public/img/center-task.c2eda91a.png)
最新资源
- 数据库课程设计on-model-for-netwo开发笔记
- linux常用命令大全mage-processing-m开发笔记
- mysql安装配置教程droid-m开发笔记
- PWMmodel-for-network-ids-ma开发笔记
- apache-doris-build-env-for-2.0.c
- apache-doris-build-env-for-2.0.b
- apache-doris-build-env-for-2.0.a
- 1719422999141832_lls-release_cqfw.mobileconfig
- 数据库课程设计processing-m开发笔记
- pycharm安装教程ention-model-for-开发笔记
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
![feedback](https://img-home.csdnimg.cn/images/20220527035711.png)
![feedback](https://img-home.csdnimg.cn/images/20220527035711.png)
![feedback-tip](https://img-home.csdnimg.cn/images/20220527035111.png)
安全验证
文档复制为VIP权益,开通VIP直接复制
![dialog-icon](https://csdnimg.cn/release/downloadcmsfe/public/img/green-success.6a4acb44.png)