Test-Vectors

PRESENT 算法的測試向量?

  • June 29, 2021

我正在尋找測試向量來測試我的 PRESENT 實現。我想測試與通常的輸入不同的輸入,其中密鑰和明文是 000..000 或 FFF…FFF。

有許多來源提供了測試向量。

但是您也可以從原始碼實現中提取它,因為opencores.org等提供了它們……

 Plaintext: 0000000000000000

 Key: 00000000000000000000 (80-bit)

 Round key 1: 0000000000000000
 Round key 2: c000000000000000
 Round key 3: 5000180000000001
 Round key 4: 60000a0003000001
 Round key 5: b0000c0001400062
 Round key 6: 900016000180002a
 Round key 7: 0001920002c00033
 Round key 8: a000a0003240005b
 Round key 9: d000d4001400064c
 Round key 10: 30017a001a800284
 Round key 11: e01926002f400355
 Round key 12: f00a1c0324c005ed
 Round key 13: 800d5e014380649e
 Round key 14: 4017b001abc02876
 Round key 15: 71926802f600357f
 Round key 16: 10a1ce324d005ec7
 Round key 17: 20d5e21439c649a8
 Round key 18: c17b041abc428730
 Round key 19: c926b82f60835781
 Round key 20: 6a1cd924d705ec19
 Round key 21: bd5e0d439b249aea
 Round key 22: 07b077abc1a8736e
 Round key 23: 426ba0f60ef5783e
 Round key 24: 41cda84d741ec1d5
 Round key 25: f5e0e839b509ae8f
 Round key 26: 2b075ebc1d0736ad
 Round key 27: 86ba2560ebd783ad
 Round key 28: 8cdab0d744ac1d77
 Round key 29: 1e0eb19b561ae89b
 Round key 30: d075c3c1d6336acd
 Round key 31: 8ba27a0eb8783ac9
 Round key 32: 6dab31744f41d700
 
 Round Output 1: ffffffff00000000
 Round Output 2: 80ff00ffff008000
 Round Output 3: 4036c837b7c88c09
 Round Output 4: 73c2cd26b6192359
 Round Output 5: 41d7be58531e4446
 Round Output 6: 182ef861ad62fd1c
 Round Output 7: 0ea0a5b67effc5a4
 Round Output 8: bba0b848a113e080
 Round Output 9: fa943423a9142338
 Round Output 10: 69f2e22d63684d54
 Round Output 11: 548a4b63c330a59d
 Round Output 12: d75f955fa228e4ca
 Round Output 13: 44255864103841f9
 Round Output 14: e2cc9004363f6c12
 Round Output 15: c36682c5cd375421
 Round Output 16: 597db55cc2a5d9b6
 Round Output 17: e67ce40e71b8b713
 Round Output 18: 751df6d6807b5b59
 Round Output 19: b948414e23332c93
 Round Output 20: 5b75890dcfb3d563
 Round Output 21: 5679203168278f5a
 Round Output 22: 17c377c413fa45a3
 Round Output 23: 262a2de73b5f3ecd
 Round Output 24: d3a053128b4d7bb3
 Round Output 25: 7db29209c28a20fa
 Round Output 26: 62050c9940f400b9
 Round Output 27: 65d50da21fbcc09f
 Round Output 28: 6a50663c540d862f
 Round Output 29: c79b8ff00a48df35
 Round Output 30: 4a38c5e00283fba1
 Round Output 31: 38d2f04c34635345
 
 Ciphertext: 5579c1387b228445

原始論文(第 16 頁)中,可以找到請求的測試向量。

該論文包括您請求的所有四種情況的測試向量(密鑰和明文中的一個或兩個是 $ 00…00 $ 或者 $ FF…FF $ )。

下表顯示了測試向量:

Plaintext         | Key                    | Ciphertext
------------------|------------------------|-----------------
00000000 00000000 | 00000000 00000000 0000 | 5579C138 7B228445
00000000 00000000 | FFFFFFFF FFFFFFFF FFFF | E72C46C0 F5945049
FFFFFFFF FFFFFFFF | 00000000 00000000 0000 | A112FFC7 2F68417B
FFFFFFFF FFFFFFFF | FFFFFFFF FFFFFFFF FFFF | 3333DCD3 213210D2

引用自:https://crypto.stackexchange.com/questions/26037