3

I'm looking for Test Vectors to test my implementation of PRESENT. I would like to test a different input from the usual where the key and the plaintext are either 000..000 or FFF...FFF.

Ilmari Karonen
  • 46,700
  • 5
  • 112
  • 189
Henrique
  • 31
  • 1
  • 2

3 Answers3

3

There are many sources presenting the test vectors.

But you can also extract it from sourcecode implementations as opencores.org et al offer them…

 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

2

In the original paper (pp. 16) one can find the requested test-vectors.
The paper includes test vectors for all four cases you request (one or both of key and plaintext are $00...00$ or $FF...FF$).
The following table shows the test vectors:

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
j02
  • 5
  • 3
SEJPM
  • 46,697
  • 9
  • 103
  • 214
1
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

I was not able to get the round keys that are mentioned above. I got the below round keys and in the end, got the expected result.

For the first test case the round keys (PRESENT-80) are as follows:

Round Key 1:C0000000000000008000
Round Key 2:50001800000000010000
Round Key 3:60000A00030000018000
Round Key 4:B0000C00014000620000
Round Key 5:900016000180002A800C
Round Key 6:0001920002C000330005
Round Key 7:A000A0003240005B8006
Round Key 8:D000D4001400064C000B
Round Key 9:30017A001A80028480C9
Round Key 10:E01926002F4003550050
Round Key 11:F00A1C0324C005ED806A
Round Key 12:800D5E014380649E00BD
Round Key 13:4017B001ABC028768C93
Round Key 14:71926802F600357F050E
Round Key 15:10A1CE324D005EC786AF
Round Key 16:20D5E21439C649A80BD8
Round Key 17:C17B041ABC4287304935
Round Key 18:C926B82F6083578150E6
Round Key 19:6A1CD924D705EC19EAF0
Round Key 20:BD5E0D439B249AEABD83
Round Key 21:07B077ABC1A8736E135D
Round Key 22:426BA0F60EF5783E0E6D
Round Key 23:41CDA84D741EC1D52F07
Round Key 24:F5E0E839B509AE8FD83A
Round Key 25:2B075EBC1D0736ADB5D1
Round Key 26:86BA2560EBD783ADE6D5
Round Key 27:8CDAB0D744AC1D777075
Round Key 28:1E0EB19B561AE89B83AE
Round Key 29:D075C3C1D6336ACDDD13
Round Key 30:8BA27A0EB8783AC96D59
Round Key 31:6DAB31744F41D7008759

Output: 5579C1387B228445

RandyJ149
  • 11
  • 2