evpciph_aes_ocb.txt 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259
  1. #
  2. # Copyright 2001-2020 The OpenSSL Project Authors. All Rights Reserved.
  3. #
  4. # Licensed under the Apache License 2.0 (the "License"). You may not use
  5. # this file except in compliance with the License. You can obtain a copy
  6. # in the file LICENSE in the source distribution or at
  7. # https://www.openssl.org/source/license.html
  8. # Tests start with one of these keywords
  9. # Cipher Decrypt Derive Digest Encoding KDF MAC PBE
  10. # PrivPubKeyPair Sign Verify VerifyRecover
  11. # and continue until a blank line. Lines starting with a pound sign are ignored.
  12. Title = AES OCB Test vectors
  13. Cipher = aes-128-ocb
  14. Key = 000102030405060708090A0B0C0D0E0F
  15. IV = 000102030405060708090A0B
  16. AAD =
  17. Tag = 197B9C3C441D3C83EAFB2BEF633B9182
  18. Plaintext =
  19. Ciphertext =
  20. Cipher = aes-128-ocb
  21. Key = 000102030405060708090A0B0C0D0E0F
  22. IV = 000102030405060708090A0B
  23. AAD = 0001020304050607
  24. Tag = 16DC76A46D47E1EAD537209E8A96D14E
  25. Plaintext = 0001020304050607
  26. Ciphertext = 92B657130A74B85A
  27. Cipher = aes-128-ocb
  28. Key = 000102030405060708090A0B0C0D0E0F
  29. IV = 000102030405060708090A0B
  30. AAD = 0001020304050607
  31. Tag = 98B91552C8C009185044E30A6EB2FE21
  32. Plaintext =
  33. Ciphertext =
  34. Cipher = aes-128-ocb
  35. Key = 000102030405060708090A0B0C0D0E0F
  36. IV = 000102030405060708090A0B
  37. AAD =
  38. Tag = 971EFFCAE19AD4716F88E87B871FBEED
  39. Plaintext = 0001020304050607
  40. Ciphertext = 92B657130A74B85A
  41. Cipher = aes-128-ocb
  42. Key = 000102030405060708090A0B0C0D0E0F
  43. IV = 000102030405060708090A0B
  44. AAD = 000102030405060708090A0B0C0D0E0F
  45. Tag = 776C9924D6723A1FC4524532AC3E5BEB
  46. Plaintext = 000102030405060708090A0B0C0D0E0F
  47. Ciphertext = BEA5E8798DBE7110031C144DA0B26122
  48. Cipher = aes-128-ocb
  49. Key = 000102030405060708090A0B0C0D0E0F
  50. IV = 000102030405060708090A0B
  51. AAD = 000102030405060708090A0B0C0D0E0F
  52. Tag = 7DDB8E6CEA6814866212509619B19CC6
  53. Plaintext =
  54. Ciphertext =
  55. Cipher = aes-128-ocb
  56. Key = 000102030405060708090A0B0C0D0E0F
  57. IV = 000102030405060708090A0B
  58. AAD =
  59. Tag = 13CC8B747807121A4CBB3E4BD6B456AF
  60. Plaintext = 000102030405060708090A0B0C0D0E0F
  61. Ciphertext = BEA5E8798DBE7110031C144DA0B26122
  62. Cipher = aes-128-ocb
  63. Key = 000102030405060708090A0B0C0D0E0F
  64. IV = 000102030405060708090A0B
  65. AAD = 000102030405060708090A0B0C0D0E0F1011121314151617
  66. Tag = 5FA94FC3F38820F1DC3F3D1FD4E55E1C
  67. Plaintext = 000102030405060708090A0B0C0D0E0F1011121314151617
  68. Ciphertext = BEA5E8798DBE7110031C144DA0B26122FCFCEE7A2A8D4D48
  69. Cipher = aes-128-ocb
  70. Key = 000102030405060708090A0B0C0D0E0F
  71. IV = 000102030405060708090A0B
  72. AAD = 000102030405060708090A0B0C0D0E0F1011121314151617
  73. Tag = 282026DA3068BC9FA118681D559F10F6
  74. Plaintext =
  75. Ciphertext =
  76. Cipher = aes-128-ocb
  77. Key = 000102030405060708090A0B0C0D0E0F
  78. IV = 000102030405060708090A0B
  79. AAD =
  80. Tag = 6EF2F52587FDA0ED97DC7EEDE241DF68
  81. Plaintext = 000102030405060708090A0B0C0D0E0F1011121314151617
  82. Ciphertext = BEA5E8798DBE7110031C144DA0B26122FCFCEE7A2A8D4D48
  83. Cipher = aes-128-ocb
  84. Key = 000102030405060708090A0B0C0D0E0F
  85. IV = 000102030405060708090A0B
  86. AAD = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
  87. Tag = B2A040DD3BD5164372D76D7BB6824240
  88. Plaintext = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
  89. Ciphertext = BEA5E8798DBE7110031C144DA0B26122CEAAB9B05DF771A657149D53773463CB
  90. Cipher = aes-128-ocb
  91. Key = 000102030405060708090A0B0C0D0E0F
  92. IV = 000102030405060708090A0B
  93. AAD = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
  94. Tag = E1E072633BADE51A60E85951D9C42A1B
  95. Plaintext =
  96. Ciphertext =
  97. Cipher = aes-128-ocb
  98. Key = 000102030405060708090A0B0C0D0E0F
  99. IV = 000102030405060708090A0B
  100. AAD =
  101. Tag = 4A3BAE824465CFDAF8C41FC50C7DF9D9
  102. Plaintext = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
  103. Ciphertext = BEA5E8798DBE7110031C144DA0B26122CEAAB9B05DF771A657149D53773463CB
  104. Cipher = aes-128-ocb
  105. Key = 000102030405060708090A0B0C0D0E0F
  106. IV = 000102030405060708090A0B
  107. AAD = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F2021222324252627
  108. Tag = 659C623211DEEA0DE30D2C381879F4C8
  109. Plaintext = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F2021222324252627
  110. Ciphertext = BEA5E8798DBE7110031C144DA0B26122CEAAB9B05DF771A657149D53773463CB68C65778B058A635
  111. Cipher = aes-128-ocb
  112. Key = 000102030405060708090A0B0C0D0E0F
  113. IV = 000102030405060708090A0B
  114. AAD = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F2021222324252627
  115. Tag = 7AEB7A69A1687DD082CA27B0D9A37096
  116. Plaintext =
  117. Ciphertext =
  118. Cipher = aes-128-ocb
  119. Key = 000102030405060708090A0B0C0D0E0F
  120. IV = 000102030405060708090A0B
  121. AAD =
  122. Tag = 060C8467F4ABAB5E8B3C2067A2E115DC
  123. Plaintext = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F2021222324252627
  124. Ciphertext = BEA5E8798DBE7110031C144DA0B26122CEAAB9B05DF771A657149D53773463CB68C65778B058A635
  125. #AES OCB Non standard test vectors - generated from reference implementation
  126. Cipher = aes-128-ocb
  127. Key = 000102030405060708090A0B0C0D0E0F
  128. IV = 000102030405060708090A0B
  129. AAD = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F2021222324252627
  130. Tag = 1b6c44f34e3abb3cbf8976e7
  131. Plaintext = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F2021222324252627
  132. Ciphertext = 09a4fd29de949d9a9aa9924248422097ad4883b4713e6c214ff6567ada08a96766fc4e2ee3e3a5a1
  133. Cipher = aes-128-ocb
  134. Key = 000102030405060708090A0B0C0D0E0F
  135. IV = 000102030405060708090A0B0C0D0E
  136. AAD = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F2021222324252627
  137. Tag = 1ad62009901f40cba7cd7156f94a7324
  138. Plaintext = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F2021222324252627
  139. Ciphertext = 5e2fa7367ffbdb3938845cfd415fcc71ec79634eb31451609d27505f5e2978f43c44213d8fa441ee
  140. Cipher = aes-128-ocb
  141. Key = 000102030405060708090A0B0C0D0E0F
  142. IV = 000102030405060708090A0B
  143. AAD = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F2021222324252627
  144. Tag = C203F98CE28F7DAD3F31C021
  145. Plaintext = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F3031
  146. Ciphertext = 09A4FD29DE949D9A9AA9924248422097AD4883B4713E6C214FF6567ADA08A967B2176C12F110DD441B7CAA3A509B13C822D6
  147. Cipher = aes-128-ocb
  148. Key = 000102030405060708090A0B0C0D0E0F
  149. IV = 000102030405060708090A0B
  150. AAD = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F2021222324252627
  151. Tag = 8346D7D47C5D893ED472F5AB
  152. Plaintext = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F4041
  153. Ciphertext = 09A4FD29DE949D9A9AA9924248422097AD4883B4713E6C214FF6567ADA08A967B2176C12F110DD441B7CAA3A509B13C86A023AFCEE998BEE42028D44507B15F714FF
  154. Cipher = aes-128-ocb
  155. Key = 000102030405060708090A0B0C0D0E0F
  156. IV = 000102030405060708090A0B
  157. AAD = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F2021222324252627
  158. Tag = 5822A9A70FDF55D29D2984A6
  159. Plaintext = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F404142434445464748494A4B4C4D4E4F5051
  160. Ciphertext = 09A4FD29DE949D9A9AA9924248422097AD4883B4713E6C214FF6567ADA08A967B2176C12F110DD441B7CAA3A509B13C86A023AFCEE998BEE42028D44507B15F77C528A1DE6406B519BCEE8FCB8294170634D
  161. Cipher = aes-128-ocb
  162. Key = 000102030405060708090A0B0C0D0E0F
  163. IV = 000102030405060708090A0B
  164. AAD = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F2021222324252627
  165. Tag = 81772B6741ABB4ECA9D2DEB2
  166. Plaintext = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F404142434445464748494A4B4C4D4E4F505152535455565758595A5B5C5D5E5F6061
  167. Ciphertext = 09A4FD29DE949D9A9AA9924248422097AD4883B4713E6C214FF6567ADA08A967B2176C12F110DD441B7CAA3A509B13C86A023AFCEE998BEE42028D44507B15F77C528A1DE6406B519BCEE8FCB829417001E54E15A7576C4DF32366E0F439C7050FAA
  168. Cipher = aes-128-ocb
  169. Key = 000102030405060708090A0B0C0D0E0F
  170. IV = 000102030405060708090A0B
  171. AAD = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F2021222324252627
  172. Tag = 3E52A01D068DE85456DB03B7
  173. Plaintext = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F404142434445464748494A4B4C4D4E4F505152535455565758595A5B5C5D5E5F606162636465666768696A6B6C6D6E6F7071
  174. Ciphertext = 09A4FD29DE949D9A9AA9924248422097AD4883B4713E6C214FF6567ADA08A967B2176C12F110DD441B7CAA3A509B13C86A023AFCEE998BEE42028D44507B15F77C528A1DE6406B519BCEE8FCB829417001E54E15A7576C4DF32366E0F439C7051CB4824B8114E9A720CBC1CE0185B156B486
  175. Cipher = aes-128-ocb
  176. Key = 000102030405060708090A0B0C0D0E0F
  177. IV = 000102030405060708090A0B
  178. AAD = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F2021222324252627
  179. Tag = 3E52A01D068DE85456DB03B6
  180. Plaintext = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F404142434445464748494A4B4C4D4E4F505152535455565758595A5B5C5D5E5F606162636465666768696A6B6C6D6E6F7071
  181. Ciphertext = 09A4FD29DE949D9A9AA9924248422097AD4883B4713E6C214FF6567ADA08A967B2176C12F110DD441B7CAA3A509B13C86A023AFCEE998BEE42028D44507B15F77C528A1DE6406B519BCEE8FCB829417001E54E15A7576C4DF32366E0F439C7051CB4824B8114E9A720CBC1CE0185B156B486
  182. Operation = DECRYPT
  183. Result = CIPHERFINAL_ERROR
  184. #Test vectors generated to validate aesni_ocb_encrypt on x86
  185. Cipher = aes-128-ocb
  186. Key = 000102030405060708090A0B0C0D0E0F
  187. IV = 000000000001020304050607
  188. Tag = C14DFF7D62A13C4A3422456207453190
  189. Plaintext = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F404142434445464748494A4B4C4D4E4F505152535455565758595A5B5C5D5E5F
  190. Ciphertext = F5186C9CC3506386919B6FD9443956E05B203313F8AB35E916AB36932EBDDCD2945901BABE7CF29404929F322F954C916065FABF8F1E52F4BD7C538C0F96899519DBC6BC504D837D8EBD1436B45D33F528CB642FA2EB2C403FE604C12B819333
  191. Cipher = aes-128-ocb
  192. Key = 000102030405060708090A0B0C0D0E0F
  193. IV = 000000000001020304050607
  194. Tag = D47D84F6FF912C79B6A4223AB9BE2DB8
  195. Plaintext = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F404142434445464748494A4B4C4D4E4F505152535455565758595A5B5C5D5E5F606162636465666768696A6B6C6D6E6F
  196. Ciphertext = F5186C9CC3506386919B6FD9443956E05B203313F8AB35E916AB36932EBDDCD2945901BABE7CF29404929F322F954C916065FABF8F1E52F4BD7C538C0F96899519DBC6BC504D837D8EBD1436B45D33F528CB642FA2EB2C403FE604C12B8193332374120A78A1171D23ED9E9CB1ADC204
  197. Cipher = aes-128-ocb
  198. Key = 000102030405060708090A0B0C0D0E0F
  199. IV = 000000000001020304050607
  200. Tag = 41970D13737B7BD1B5FBF49ED4412CA5
  201. Plaintext = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F404142434445464748494A4B4C4D4E4F505152535455565758595A5B5C5D5E5F606162636465666768696A6B6C6D6E6F7071000102030405060708090A0B0C0D
  202. Ciphertext = F5186C9CC3506386919B6FD9443956E05B203313F8AB35E916AB36932EBDDCD2945901BABE7CF29404929F322F954C916065FABF8F1E52F4BD7C538C0F96899519DBC6BC504D837D8EBD1436B45D33F528CB642FA2EB2C403FE604C12B8193332374120A78A1171D23ED9E9CB1ADC20412C017AD0CA498827C768DDD99B26E91
  203. Cipher = aes-128-ocb
  204. Key = 000102030405060708090A0B0C0D0E0F
  205. IV = 000000000001020304050607
  206. Tag = BE0228651ED4E48A11BDED68D953F3A0
  207. Plaintext = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F404142434445464748494A4B4C4D4E4F505152535455565758595A5B5C5D5E5F606162636465666768696A6B6C6D6E6F7071000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D
  208. Ciphertext = F5186C9CC3506386919B6FD9443956E05B203313F8AB35E916AB36932EBDDCD2945901BABE7CF29404929F322F954C916065FABF8F1E52F4BD7C538C0F96899519DBC6BC504D837D8EBD1436B45D33F528CB642FA2EB2C403FE604C12B8193332374120A78A1171D23ED9E9CB1ADC20412C017AD0CA498827C768DDD99B26E91EDB8681700FF30366F07AEDE8CEACC1F
  209. Cipher = aes-128-ocb
  210. Key = 000102030405060708090A0B0C0D0E0F
  211. IV = 000000000001020304050607
  212. Tag = 17BC6E10B16E5FDC52836E7D589518C7
  213. Plaintext = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F404142434445464748494A4B4C4D4E4F505152535455565758595A5B5C5D5E5F606162636465666768696A6B6C6D6E6F7071000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D
  214. Ciphertext = F5186C9CC3506386919B6FD9443956E05B203313F8AB35E916AB36932EBDDCD2945901BABE7CF29404929F322F954C916065FABF8F1E52F4BD7C538C0F96899519DBC6BC504D837D8EBD1436B45D33F528CB642FA2EB2C403FE604C12B8193332374120A78A1171D23ED9E9CB1ADC20412C017AD0CA498827C768DDD99B26E91EDB8681700FF30366F07AEDE8CEACC1F39BE69B91BC808FA7A193F7EEA43137B
  215. Cipher = aes-128-ocb
  216. Key = 000102030405060708090A0B0C0D0E0F
  217. IV = 000000000001020304050607
  218. Tag = E84AAC18666116990A3A37B3A5FC55BD
  219. Plaintext = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F404142434445464748494A4B4C4D4E4F505152535455565758595A5B5C5D5E5F606162636465666768696A6B6C6D6E6F7071000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D
  220. Ciphertext = F5186C9CC3506386919B6FD9443956E05B203313F8AB35E916AB36932EBDDCD2945901BABE7CF29404929F322F954C916065FABF8F1E52F4BD7C538C0F96899519DBC6BC504D837D8EBD1436B45D33F528CB642FA2EB2C403FE604C12B8193332374120A78A1171D23ED9E9CB1ADC20412C017AD0CA498827C768DDD99B26E91EDB8681700FF30366F07AEDE8CEACC1F39BE69B91BC808FA7A193F7EEA43137B11CF99263D693AEBDF8ADE1A1D838DED
  221. Cipher = aes-128-ocb
  222. Key = 000102030405060708090A0B0C0D0E0F
  223. IV = 000000000001020304050607
  224. Tag = 3E5EA7EE064FE83B313E28D411E91EAD
  225. Plaintext = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F404142434445464748494A4B4C4D4E4F505152535455565758595A5B5C5D5E5F606162636465666768696A6B6C6D6E6F7071000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F404142434445464748494A4B4C4D
  226. Ciphertext = F5186C9CC3506386919B6FD9443956E05B203313F8AB35E916AB36932EBDDCD2945901BABE7CF29404929F322F954C916065FABF8F1E52F4BD7C538C0F96899519DBC6BC504D837D8EBD1436B45D33F528CB642FA2EB2C403FE604C12B8193332374120A78A1171D23ED9E9CB1ADC20412C017AD0CA498827C768DDD99B26E91EDB8681700FF30366F07AEDE8CEACC1F39BE69B91BC808FA7A193F7EEA43137B11CF99263D693AEBDF8ADE1A1D838DED48D9E09F452F8E6FBEB76A3DED47611C