)]}'
{
  "commit": "de0752318171da717af4ce24d0a2e8626afaeb11",
  "tree": "81cb3ffba606ecc1d12fcb077993d31af92a4106",
  "parents": [
    "ff745d0763f824127273eee405c465dfc3254caf"
  ],
  "author": {
    "name": "Adam Langley",
    "email": "agl@golang.org",
    "time": "Wed Aug 08 09:52:45 2018 -0700"
  },
  "committer": {
    "name": "Adam Langley",
    "email": "agl@golang.org",
    "time": "Wed Aug 08 21:18:26 2018 +0000"
  },
  "message": "chacha20poly1305: add some more XChaCha20-Poly1305 test vectors.\n\nThese vectors were generated with libsodium to ensure that Go is\ncompatible with that library:\n\n  #include \u003cstdio.h\u003e\n  #include \u003csodium.h\u003e\n  #include \u003cstdlib.h\u003e\n\n  static void hexdump(const uint8_t *in, size_t in_len) {\n  \tprintf(\"\\t\\t\\\"\");\n  \tfor (size_t i \u003d 0; i \u003c in_len; i++) {\n  \t\tprintf(\"%02x\", in[i]);\n  \t}\n  \tprintf(\"\\\",\\n\");\n  }\n\n  int main() {\n  \tuint8_t nonce[24];\n  \tuint8_t key[32];\n  \tuint8_t m[64], c[64+16];\n  \tuint8_t ad[16];\n\n  \tfor (size_t ad_len \u003d 0; ad_len \u003c sizeof(ad); ad_len +\u003d 4) {\n  \t\tfor (size_t m_len \u003d 0; m_len \u003c sizeof(m); m_len +\u003d 5) {\n  \t\t\trandombytes(nonce, sizeof(nonce));\n  \t\t\trandombytes(key, sizeof(key));\n  \t\t\trandombytes(m, m_len);\n  \t\t\trandombytes(ad, ad_len);\n\n  \t\t\tunsigned long long c_len \u003d sizeof(c);\n  \t\t\tif (crypto_aead_xchacha20poly1305_ietf_encrypt(c, \u0026c_len, m, m_len, ad, ad_len, NULL, nonce, key)) {\n  \t\t\t\tabort();\n  \t\t\t}\n\n  \t\t\tprintf(\"\\t{\\n\");\n  \t\t\thexdump(m, m_len);\n  \t\t\thexdump(ad, ad_len);\n  \t\t\thexdump(key, sizeof(key));\n  \t\t\thexdump(nonce, sizeof(nonce));\n  \t\t\thexdump(c, c_len);\n  \t\t\tprintf(\"\\t},\\n\");\n  \t\t}\n  \t}\n\n  \treturn 0;\n  }\n\nChange-Id: I4e9e4dc26e0e842c82319829599dbe48c331726f\nReviewed-on: https://go-review.googlesource.com/128615\nRun-TryBot: Adam Langley \u003cagl@golang.org\u003e\nReviewed-by: Brad Fitzpatrick \u003cbradfitz@golang.org\u003e\nTryBot-Result: Gobot Gobot \u003cgobot@golang.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "6efd78f2fe7a37759b3a5c19bba020a8a296da4f",
      "old_mode": 33188,
      "old_path": "chacha20poly1305/chacha20poly1305_vectors_test.go",
      "new_id": "fa3607e8abbf6d055621618a82902e687bc139a3",
      "new_mode": 33188,
      "new_path": "chacha20poly1305/chacha20poly1305_vectors_test.go"
    }
  ]
}
