Speck

Speck
3 rounds of Speck with 2-word key schedule
概述
设计者Ray Beaulieu, Douglas Shors, Jason Smith, Stefan Treatman-Clark, Bryan Weeks, Louis Wingers NSA
首次发布2013
相关算法Simon英语Simon (cipher)Threefish英语Threefish
密码细节
密钥长度64, 72, 96, 128, 144, 192 or 256 bits
分组长度32, 48, 64, 96 or 128 bits
结构ARX
重复回数22–34 (depending on block and key size)
速度2.6 cpb (5.7 without SSE) on Intel Xeon 5640 (Speck128/128)
最佳公开破解
差分密码分析[1]

Speck是一类轻量级的分组密码,最早由美国国家安全局(NSA)于2013年6月提出[2]。如今Speck码较多应用于软件实现,而其姊妹算法Simon英语Simon (cipher)则多用于硬件实现。

编码描述

Speck支持多种分组密文长度。单个分组总是包含两个单字,每个单字可以由16位、24位、32位、48位或64位比特组成。相关密文由2、3或4个词汇组成。编码的循环函数包含两次反转计算:将右单字添加到左单字,异或密文与左单字;之后异或左单字与右单字。循环的次数取决于参数的选择如下[2]

块大小(bits) 秘钥大小(bits) 循环次数
2×16=32 4×16=64 22
2×24=48 3×24=72 22
4×24=96 23
2×32=64 3×32=96 26
4×32=128 27
2×48=96 2×48=96 28
3×48=144 29
2×64=128 2×64=128 32
3×64=192 33
4×64=256 34

密码次序表与主块密码使用相同的循环函数。

参考代码

以下是编码算法实现的设计参考,使用C语言编写,其具有128比特的分组大小与密文。

#include <stdint.h>

#define ROR(x, r) ((x >> r) | (x << (64 - r)))
#define ROL(x, r) ((x << r) | (x >> (64 - r)))
#define R(x, y, k) (x = ROR(x, 8), x += y, x ^= k, y = ROL(y, 3), y ^= x)
#define ROUNDS 32

void encrypt(uint64_t ct[2],
             uint64_t const pt[2],            
             uint64_t const K[2])
{
   uint64_t y = pt[0], x = pt[1], b = K[0], a = K[1];

   R(x, y, b);
   for (int i = 0; i < ROUNDS - 1; i++) {
      R(a, b, i);
      R(x, y, b);
   }

   ct[0] = y;
   ct[1] = x;
}

参考文献

  1. ^ Ling, Song; Huang, Zhangjie; Yang, Qianqian. Automatic Differential Analysis of ARX Block Ciphers with Application to SPECK and LEA (PDF). 2016-06-30 [2018-05-06]. (原始内容存档 (PDF)于2017-07-16). 
  2. ^ 2.0 2.1 Beaulieu, Ray; Shors, Douglas; Smith, Jason; Treatman-Clark, Stefan; Weeks, Bryan; Wingers, Louis. The SIMON and SPECK Families of Lightweight Block Ciphers (404). 2013 [2018-05-09]. (原始内容存档于2013-09-03). 
 
常见加密算法
次常见加密算法
  • Camellia
  • CAST-128英语CAST-128
  • IDEA
  • RC2英语RC2
  • RC5
  • SEED英语SEED
  • Skipjack英语Skipjack
  • TEA
  • XTEA
其他加密算法
  • 3-Way英语3-Way
  • ABC英语ABC (cipher)
  • Akelarre英语Akelarre (cipher)
  • Anubis英语Anubis (cipher)
  • ARIA英语ARIA (cipher)
  • BaseKing英语BaseKing
  • BassOmatic英语BassOmatic
  • BATON英语BATON
  • BEAR and LION英语BEAR and LION ciphers
  • CAST-256英语CAST-256
  • CIKS-1英语CIKS-1
  • CIPHERUNICORN-A英语CIPHERUNICORN-A
  • CIPHERUNICORN-E英语CIPHERUNICORN-E
  • CLEFIA英语CLEFIA
  • CMEA英语Cellular Message Encryption Algorithm
  • Cobra英语Cobra ciphers
  • COCONUT98英语COCONUT98
  • Crab英语Crab (cipher)
  • Cryptomeria/C2英语Cryptomeria cipher
  • CRYPTON英语CRYPTON (cipher)
  • CS-Cipher英语CS-Cipher
  • DEAL英语DEAL
  • DES-X英语DES-X
  • DFC英语DFC (cipher)
  • E2英语E2 (cipher)
  • FEAL英语FEAL
  • FEA-M英语FEA-M
  • FROG英语FROG
  • G-DES英语GDES
  • GOST英语GOST (block cipher)
  • Grand Cru英语Grand Cru (cipher)
  • Hasty Pudding cipher英语Hasty Pudding cipher
  • Hierocrypt英语Hierocrypt
  • ICE英语ICE (cipher)
  • IDEA NXT英语Idea NXT
  • Intel Cascade Cipher英语Intel Cascade Cipher
  • Iraqi英语Iraqi block cipher
  • KASUMI英语KASUMI (block cipher)
  • KeeLoq英语KeeLoq
  • KHAZAD英语KHAZAD
  • Khufu and Khafre英语Khufu and Khafre
  • KN-Cipher英语KN-Cipher
  • Ladder-DES英语Ladder-DES
  • Libelle英语Libelle (cipher)
  • LOKI97英语LOKI97
  • LOKI89/91英语LOKI
  • Lucifer英语Lucifer (cipher)
  • M6英语M6 (cipher)
  • M8英语M8 (cipher)
  • MacGuffin英语MacGuffin (cipher)
  • Madryga英语Madryga
  • MAGENTA英语MAGENTA
  • MARS英语MARS (cipher)
  • Mercy英语Mercy (cipher)
  • MESH英语MESH (cipher)
  • MISTY1英语MISTY1
  • MMB英语MMB
  • MULTI2英语MULTI2
  • MultiSwap英语MultiSwap
  • New Data Seal英语New Data Seal
  • NewDES英语NewDES
  • Nimbus英语Nimbus (cipher)
  • NOEKEON英语NOEKEON
  • NUSH英语NUSH
  • Q英语Q (cipher)
  • RC6
  • REDOC英语REDOC
  • Red Pike英语Red Pike (cipher)
  • S-1英语S-1 block cipher
  • SAFER英语SAFER
  • SAVILLE英语SAVILLE
  • SC2000英语SC2000
  • SHACAL英语SHACAL
  • SHARK
  • SM4
  • Speck
  • Spectr-H64英语Spectr-H64
  • Square英语Square (cipher)
  • SXAL/MBAL英语SXAL/MBAL
  • Threefish英语Threefish
  • Treyfer英语Treyfer
  • UES英语UES (cipher)
  • Xenon英语Xenon (cipher)
  • xmx英语xmx
  • XXTEA
  • Zodiac英语Zodiac (cipher)
密码设计
攻击(密码分析
  • 穷举攻击/蛮力攻击EFF DES破解机
  • 中途相遇攻击Biclique攻击英语Biclique attack · 三子集中途相遇攻击英语Biclique attack
  • 线性密码分析英语Linear cryptanalysis堆积引理英语Piling-up lemma
  • 差分密码分析不可能差分密码分析英语Impossible differential cryptanalysis
  • 截断差分分析英语Truncated differential cryptanalysis
  • 高阶差分分析英语Higher-order differential cryptanalysis
  • 差分-线性攻击英语Differential-linear
  • 区分攻击英语Distinguishing attack已知密钥区分攻击英语Known-key distinguishing attack
  • 积分密码分析英语Integral cryptanalysis
  • 回力镖攻击英语Boomerang attack
  • n密码分析英语Mod n cryptanalysis
  • 相关密钥攻击英语Related-key attack
  • 滑动攻击英语Slide attack
  • 回旋密码分析英语Rotational cryptanalysis
  • 計時攻擊英语Timing attack
  • XSL攻击英语XSL attack
  • 插值攻擊
  • Partitioning英语Partitioning cryptanalysis
  • 戴维斯攻击英语Davies' attack
  • 回弹攻击英语Rebound attack
  • 弱密钥英语Weak key
  • 肯德尔等级相关系数英语Kendall tau rank correlation coefficient
  • 卡方检验
  • 时间、内存、数据取舍攻击英语Time/memory/data tradeoff attack
密码标准
工作方式
  • 分类 分类
  • 主题 主题
  • 专题 专题