# $OpenBSD: aeadtests.txt,v 1.8 2019/01/22 00:59:21 dlg Exp $ # # MACsec GCM-AES Test Vectors (bn-randall-test-vectors-0511-v1.pdf) # # 2.5.1 65-byte Packet Authentication Using GCM-AES-128 AEAD: aes-128-gcm KEY: 013FE00B5F11BE7F866D0CBBC55A7A90 NONCE: 7CFDE9F9E33724C68932D612 IN: AD: 84C5D513D2AAF6E5BBD2727788E523008932D6127CFDE9F9E33724C608000F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F0005 CT: TAG: 217867E50C2DAD74C28C3B50ABDF695A # 2.5.2 65-byte Packet Authentication Using GCM-AES-256 AEAD: aes-256-gcm KEY: 83C093B58DE7FFE1C0DA926AC43FB3609AC1C80FEE1B624497EF942E2F79A823 NONCE: 7CFDE9F9E33724C68932D612 IN: AD: 84C5D513D2AAF6E5BBD2727788E523008932D6127CFDE9F9E33724C608000F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F0005 CT: TAG: 6EE160E8FAECA4B36C86B234920CA975 # 2.8.1 75-byte Packet Encryption Using GCM-AES-128 AEAD: aes-128-gcm KEY: 88EE087FD95DA9FBF6725AA9D757B0CD NONCE: 7AE8E2CA4EC500012E58495C IN: 08000F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F404142434445464748490008 AD: 68F2E77696CE7AE8E2CA4EC588E54D002E58495C CT: C31F53D99E5687F7365119B832D2AAE70741D593F1F9E2AB3455779B078EB8FEACDFEC1F8E3E5277F8180B43361F6512ADB16D2E38548A2C719DBA7228D840 TAG: 88F8757ADB8AA788D8F65AD668BE70E7 # 2.8.2 75-byte Packet Encryption Using GCM-AES-256 AEAD: aes-256-gcm KEY: 4C973DBC7364621674F8B5B89E5C15511FCED9216490FB1C1A2CAA0FFE0407E5 NONCE: 7AE8E2CA4EC500012E58495C IN: 08000F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F404142434445464748490008 AD: 68F2E77696CE7AE8E2CA4EC588E54D002E58495C CT: BA8AE31BC506486D6873E4FCE460E7DC57591FF00611F31C3834FE1C04AD80B66803AFCF5B27E6333FA67C99DA47C2F0CED68D531BD741A943CFF7A6713BD0 TAG: 2611CD7DAA01D61C5C886DC1A8170107 # Test vector from RFC7539 2.8.2 AEAD: chacha20-poly1305 KEY: 808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9f NONCE: 070000004041424344454647 IN: 4c616469657320616e642047656e746c656d656e206f662074686520636c617373206f66202739393a204966204920636f756c64206f6666657220796f75206f6e6c79206f6e652074697020666f7220746865206675747572652c2073756e73637265656e20776f756c642062652069742e AD: 50515253c0c1c2c3c4c5c6c7 CT: d31a8d34648e60db7b86afbc53ef7ec2a4aded51296e08fea9e2b5a736ee62d63dbea45e8ca9671282fafb69da92728b1a71de0a9e060b2905d6a5b67ecd3b3692ddbd7f2d778b8c9803aee328091b58fab324e4fad675945585808b4831d7bc3ff4def08e4b7a9de576d26586cec64b6116 TAG: 1ae10b594f09e26a7e902ecbd0600691 # Test vector from RFC7539 Appendix A.5 AEAD: chacha20-poly1305 KEY: 1c9240a5eb55d38af333888604f6b5f0473917c1402b80099dca5cbc207075c0 NONCE: 000000000102030405060708 IN: 496e7465726e65742d4472616674732061726520647261667420646f63756d656e74732076616c696420666f722061206d6178696d756d206f6620736978206d6f6e74687320616e64206d617920626520757064617465642c207265706c616365642c206f72206f62736f6c65746564206279206f7468657220646f63756d656e747320617420616e792074696d652e20497420697320696e617070726f70726961746520746f2075736520496e7465726e65742d447261667473206173207265666572656e6365206d6174657269616c206f7220746f2063697465207468656d206f74686572207468616e206173202fe2809c776f726b20696e2070726f67726573732e2fe2809d AD: f33388860000000000004e91 CT: 64a0861575861af460f062c79be643bd5e805cfd345cf389f108670ac76c8cb24c6cfc18755d43eea09ee94e382d26b0bdb7b73c321b0100d4f03b7f355894cf332f830e710b97ce98c8a84abd0b948114ad176e008d33bd60f982b1ff37c8559797a06ef4f0ef61c186324e2b3506383606907b6a7c02b0f9f6157b53c867e4b9166c767b804d46a59b5216cde7a4e99040c5a40433225ee282a1b0a06c523eaf4534d7f83fa1155b0047718cbc546a0d072b04b3564eea1b422273f548271a0bb2316053fa76991955ebd63159434ecebb4e466dae5a1073a6727627097a1049e617d91d361094fa68f0ff77987130305beaba2eda04df997b714d6c6f2c29a6ad5cb4022b02709b TAG: eead9d67890cbb22392336fea1851f38 # Test vector from RFC7634 Appendix A AEAD: chacha20-poly1305 KEY: 808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9f NONCE: a0a1a2a31011121314151617 IN: 45000054a6f200004001e778c6336405c000020508005b7a3a080000553bec100007362708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363701020204 AD: 0102030400000005 CT: 24039428b97f417e3c13753a4f05087b67c352e6a7fab1b982d466ef407ae5c614ee8099d52844eb61aa95dfab4c02f72aa71e7c4c4f64c9befe2facc638e8f3cbec163fac469b502773f6fb94e664da9165b82829f641e0 TAG: 76aaa8266b7fb0f7b11b369907e1ad43 # Test vector from RFC7634 Appendix B AEAD: chacha20-poly1305 KEY: 808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9f NONCE: a0a1a2a31011121314151617 IN: 0000000c000040010000000a00 AD: c0c1c2c3c4c5c6c7d0d1d2d3d4d5d6d72e202500000000090000004529000029 CT: 610394701f8d017f7c12924889 TAG: 6b71bfe25236efd7cdc67066906315b2 # Test vector from draft-arciszewski-xchacha-02 AEAD: xchacha20-poly1305 KEY: 808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9f NONCE: 404142434445464748494a4b4c4d4e4f5051525354555657 IN: 4c616469657320616e642047656e746c656d656e206f662074686520636c617373206f66202739393a204966204920636f756c64206f6666657220796f75206f6e6c79206f6e652074697020666f7220746865206675747572652c2073756e73637265656e20776f756c642062652069742e AD: 50515253c0c1c2c3c4c5c6c7 CT: bd6d179d3e83d43b9576579493c0e939572a1700252bfaccbed2902c21396cbb731c7f1b0b4aa6440bf3a82f4eda7e39ae64c6708c54c216cb96b72e1213b4522f8c9ba40db5d945b11b69b982c1bb9e3f3fac2bc369488f76b2383565d3fff921f9664c97637da9768812f615c68b13b52e TAG: c0875924c1c7987947deafd8780acf49