evpciph_aes_wrap.txt 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. #
  2. # Copyright 2020-2021 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. # Cipher names id-aesXXX-wrap are to test aliases.
  9. # AES wrap tests from RFC3394
  10. Cipher = id-aes128-wrap
  11. Key = 000102030405060708090A0B0C0D0E0F
  12. Plaintext = 00112233445566778899AABBCCDDEEFF
  13. Ciphertext = 1FA68B0A8112B447AEF34BD8FB5A7B829D3E862371D2CFE5
  14. Cipher = id-aes192-wrap
  15. Key = 000102030405060708090A0B0C0D0E0F1011121314151617
  16. Plaintext = 00112233445566778899AABBCCDDEEFF
  17. Ciphertext = 96778B25AE6CA435F92B5B97C050AED2468AB8A17AD84E5D
  18. Cipher = id-aes256-wrap
  19. Key = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
  20. Plaintext = 00112233445566778899AABBCCDDEEFF
  21. Ciphertext = 64E8C3F9CE0F5BA263E9777905818A2A93C8191E7D6E8AE7
  22. Cipher = id-aes192-wrap
  23. Key = 000102030405060708090A0B0C0D0E0F1011121314151617
  24. Plaintext = 00112233445566778899AABBCCDDEEFF0001020304050607
  25. Ciphertext = 031D33264E15D33268F24EC260743EDCE1C6C7DDEE725A936BA814915C6762D2
  26. Cipher = id-aes256-wrap
  27. Key = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
  28. Plaintext = 00112233445566778899AABBCCDDEEFF0001020304050607
  29. Ciphertext = A8F9BC1612C68B3FF6E6F4FBE30E71E4769C8B80A32CB8958CD5D17D6B254DA1
  30. # Testing strncasecmp
  31. Cipher = aes256-WRAP
  32. Key = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
  33. Plaintext = 00112233445566778899AABBCCDDEEFF000102030405060708090A0B0C0D0E0F
  34. Ciphertext = 28C9F404C4B810F4CBCCB35CFB87F8263F5786E2D80ED326CBC7F0E71A99F43BFB988B9B7A02DD21
  35. Cipher = ID-aes256-WRAP
  36. Key = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
  37. Plaintext = 00112233445566778899AABBCCDDEEFF000102030405060708090A0B0C0D0E0F
  38. Ciphertext = 28C9F404C4B810F4CBCCB35CFB87F8263F5786E2D80ED326CBC7F0E71A99F43BFB988B9B7A02DD21
  39. # Same as previous example but with invalid unwrap key: should be rejected
  40. # without returning any plaintext
  41. Cipher = id-aes256-wrap
  42. Operation = DECRYPT
  43. Key = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E00
  44. Plaintext = 00112233445566778899AABBCCDDEEFF000102030405060708090A0B0C0D0E0F
  45. Ciphertext = 28C9F404C4B810F4CBCCB35CFB87F8263F5786E2D80ED326CBC7F0E71A99F43BFB988B9B7A02DD21
  46. Result = CIPHERUPDATE_ERROR
  47. # AES wrap tests from RFC5649
  48. Cipher = id-aes192-wrap-pad
  49. Key = 5840df6e29b02af1ab493b705bf16ea1ae8338f4dcc176a8
  50. Plaintext = c37b7e6492584340bed12207808941155068f738
  51. Ciphertext = 138bdeaa9b8fa7fc61f97742e72248ee5ae6ae5360d1ae6a5f54f373fa543b6a
  52. Cipher = id-aes192-wrap-pad
  53. Key = 5840df6e29b02af1ab493b705bf16ea1ae8338f4dcc176a8
  54. Plaintext = 466f7250617369
  55. Ciphertext = afbeb0f07dfbf5419200f2ccb50bb24f
  56. # AES wrap tests from
  57. # https://csrc.nist.gov/CSRC/media/Projects/
  58. # Cryptographic-Algorithm-Validation-Program/documents/mac/kwtestvectors.zip
  59. # A small subset has been used.
  60. # KW_AD_128_inv
  61. Cipher = AES-128-WRAP-INV
  62. Operation = DECRYPT
  63. Key = 7aa9e9e3c6b2916b4b62ac06074d14e8
  64. Ciphertext = 110f6ba8d4aa2a24f0abfd2cd351ebb6cdfafb35941bbe33
  65. Plaintext = 77a44e843e1f85707cc7e149e5f873be
  66. Cipher = AES-128-WRAP-INV
  67. Operation = DECRYPT
  68. Key = accc4b014123f9e95d3c6f92d07da9fd
  69. Ciphertext = 020cc7c82b6b7cd2ff4d28186930305edce13d65cc36d8d1
  70. Result = CIPHERUPDATE_ERROR
  71. Cipher = AES-128-WRAP-INV
  72. Operation = DECRYPT
  73. Key = 68eceb881f8f34ccb6bebd4e149741ff
  74. Ciphertext = 67292ab62037d076734513943ac907994b6a45b74ed2349f009e2267dc95f13a01b0e2fa109b9b6a
  75. Plaintext = 2910c499dc41de663e7f349b26f00291537943fcc8845166cdd210368d5adf44
  76. Cipher = AES-128-WRAP-INV
  77. Operation = DECRYPT
  78. Key = f8f94a07506f4d1728f6bed6c89a9c5d
  79. Ciphertext = 85fe9d64465db07ec63062aeb4c9161558fabb01d6b9e787850831f9b3414a5cbd35023c63fd59626c64cb3c470d9b7d
  80. Plaintext = c248842911a3dbc5562b1fe0f3955c4da3fd74471062d074d9b972ce3a840f0cb63a768ed1c432b7
  81. # KW_AD_192_inv
  82. Cipher = AES-192-WRAP-INV
  83. Operation = DECRYPT
  84. Key = fd9f4c93416fe7cb53002a5b011a2d4695ec64460af59826
  85. Ciphertext = 5e25074c8d7e82f0224c151db4af874578d55dfa5cc98952
  86. Plaintext = 1097eb6e48232f5c5f15fb5d1c8b5f44
  87. # KW_AD_256_inv
  88. Cipher = AES-256-WRAP-INV
  89. Operation = DECRYPT
  90. Key = d660410f4c4eeb7b0f9dfb7b5dcd4eabac1cfcbb072b1825c96026f6a64dd7dd
  91. Ciphertext = 157629ebd041bf5b9f354bbda3a4906e7ec84cac6d7d7702
  92. Plaintext = 4142bea750ab0f332e9ea5185157af13
  93. # KW_AE_128_inv
  94. Cipher = AES-128-WRAP-INV
  95. Key = e88ba734ea243480a6129366753b58eb
  96. Plaintext = d140ac16a44c1c2b3f47037ea8898a3e
  97. Ciphertext = 600861ee14320006f0ae55c46d5e1ebf3303751df7f038df
  98. # KW_AE_192_inv
  99. Cipher = AES-192-WRAP-INV
  100. Key = 370c715135b44eb3773b1aff833bcd28b59aee866d4a36b3
  101. Plaintext = eae0f60f1cf33d5b75869e84c764a04e
  102. Ciphertext = ea4ba4add8add19950ca491d109ffa08f90312693055677a
  103. # KW_AE_256_inv
  104. Cipher = AES-256-WRAP-INV
  105. Key = de982f7c871f78e37462e2f48a62eecb2da81a10799c6ebf2bee8c786b624b0e
  106. Plaintext = ecafc437d9f1643c7645c2416c14c003
  107. Ciphertext = aec02ddb3f6de1f99103c6042dfc9001eb3cf56d9c2a11f7
  108. # KWP_AD_128_inv
  109. Cipher = AES-128-WRAP-PAD-INV
  110. Operation = DECRYPT
  111. Key = 7877f11e1a2d530a0b27274d4e6d7f2c
  112. Ciphertext = ea53d73d75f5f0642c64d4715d1c131a
  113. Plaintext = 52
  114. Cipher = AES-128-WRAP-PAD-INV
  115. Operation = DECRYPT
  116. Key = 983dc3acf84ca6522b26f818cd0cf64f
  117. Ciphertext = 441da28c430266c29e8413a5938089013c0e8251280ecddc
  118. Plaintext = f469d3232eed4d096f
  119. # KWP_AD_192_inv
  120. Cipher = AES-192-WRAP-PAD-INV
  121. Operation = DECRYPT
  122. Key = 427c6c0a2cc30bbe0cd9fc6b11c29f8cfe64df6ab0379433
  123. Ciphertext = f5dcb63193a377a526db98a852db6099
  124. Plaintext = 98
  125. # KWP_AD_256_inv
  126. Cipher = AES-256-WRAP-PAD-INV
  127. Operation = DECRYPT
  128. Key = 48658f36aa5e24621f86fa6db06487bd635b18ff87704431a1c42cd145115c51
  129. Ciphertext = 6990b3b115563ef6a0884a110a393ee4
  130. Plaintext = 16700199665ff161
  131. # KWP_AE_128_inv
  132. Cipher = AES-128-WRAP-PAD-INV
  133. Key = 1c321a356b0ee25e30de2d618c1facbe
  134. Plaintext = 42
  135. Ciphertext = 3ddf22da3080a1a5252574c76f833790
  136. # KWP_AE_192_inv
  137. Cipher = AES-192-WRAP-PAD-INV
  138. Key = fe3fe235bb36dcf03f01cbf32cc98a3abf10ab3d608d3b30
  139. Plaintext = 1d2b7fc29991bafaf7
  140. Ciphertext = c11afb3c0de263dfb9b672a5f81fe0b9acfe9c407691f332
  141. # KWP_AE_256_inv
  142. Cipher = AES-256-WRAP-PAD-INV
  143. Key = 148a3fa618a6998c30b9f0f67922354a3747f2fa2e4d2e0b7af9582d6f548fee
  144. Plaintext = 441125592acf9e5208dcd558a7ac0034d15530dbad7a2913963da0cbf60aa3
  145. Ciphertext = 23f26a9476829885055694062c89b86399e8d6125509c9e88bb0a5b5113f4bfc8d34a62cba3c9eee