evpciph_sm4.txt 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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. Title = SM4 test vectors from IETF draft-ribose-cfrg-sm4
  9. Cipher = SM4-ECB
  10. Key = 0123456789ABCDEFFEDCBA9876543210
  11. Plaintext = 0123456789ABCDEFFEDCBA9876543210
  12. Ciphertext = 681EDF34D206965E86B3E94F536E4246
  13. Cipher = SM4-CBC
  14. Key = 0123456789ABCDEFFEDCBA9876543210
  15. IV = 0123456789ABCDEFFEDCBA9876543210
  16. Plaintext = 0123456789ABCDEFFEDCBA98765432100123456789ABCDEFFEDCBA9876543210
  17. Ciphertext = 2677F46B09C122CC975533105BD4A22AF6125F7275CE552C3A2BBCF533DE8A3B
  18. Cipher = SM4-OFB
  19. Key = 0123456789ABCDEFFEDCBA9876543210
  20. IV = 0123456789ABCDEFFEDCBA9876543210
  21. Plaintext = 0123456789ABCDEFFEDCBA98765432100123456789ABCDEFFEDCBA9876543210
  22. Ciphertext = 693D9A535BAD5BB1786F53D7253A7056F2075D28B5235F58D50027E4177D2BCE
  23. Cipher = SM4-CFB
  24. Key = 0123456789ABCDEFFEDCBA9876543210
  25. IV = 0123456789ABCDEFFEDCBA9876543210
  26. Plaintext = 0123456789ABCDEFFEDCBA98765432100123456789ABCDEFFEDCBA9876543210
  27. Ciphertext = 693D9A535BAD5BB1786F53D7253A70569ED258A85A0467CC92AAB393DD978995
  28. Cipher = SM4-CTR
  29. Key = 0123456789ABCDEFFEDCBA9876543210
  30. IV = 0123456789ABCDEFFEDCBA9876543210
  31. Plaintext = AAAAAAAAAAAAAAAABBBBBBBBBBBBBBBBCCCCCCCCCCCCCCCCDDDDDDDDDDDDDDDDEEEEEEEEEEEEEEEEFFFFFFFFFFFFFFFFEEEEEEEEEEEEEEEEAAAAAAAAAAAAAAAA
  32. Ciphertext = C2B4759E78AC3CF43D0852F4E8D5F9FD7256E8A5FCB65A350EE00630912E44492A0B17E1B85B060D0FBA612D8A95831638B361FD5FFACD942F081485A83CA35D
  33. Title = SM4 GCM test vectors from RFC8998
  34. Cipher = SM4-GCM
  35. Key = 0123456789abcdeffedcba9876543210
  36. IV = 00001234567800000000abcd
  37. AAD = feedfacedeadbeeffeedfacedeadbeefabaddad2
  38. Tag = 83de3541e4c2b58177e065a9bf7b62ec
  39. Plaintext = aaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbccccccccccccccccddddddddddddddddeeeeeeeeeeeeeeeeffffffffffffffffeeeeeeeeeeeeeeeeaaaaaaaaaaaaaaaa
  40. Ciphertext = 17f399f08c67d5ee19d0dc9969c4bb7d5fd46fd3756489069157b282bb200735d82710ca5c22f0ccfa7cbf93d496ac15a56834cbcf98c397b4024a2691233b8d
  41. Title = SM4 CCM test vectors from RFC8998
  42. Cipher = SM4-CCM
  43. Key = 0123456789abcdeffedcba9876543210
  44. IV = 00001234567800000000abcd
  45. AAD = feedfacedeadbeeffeedfacedeadbeefabaddad2
  46. Tag = 16842d4fa186f56ab33256971fa110f4
  47. Plaintext = aaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbccccccccccccccccddddddddddddddddeeeeeeeeeeeeeeeeffffffffffffffffeeeeeeeeeeeeeeeeaaaaaaaaaaaaaaaa
  48. Ciphertext = 48af93501fa62adbcd414cce6034d895dda1bf8f132f042098661572e7483094fd12e518ce062c98acee28d95df4416bed31a2f04476c18bb40c84a74b97dc5b