)]}'
{
  "commit": "a2a892a236d03a6e985471a7e57d1c863de144c8",
  "tree": "33b52c87bdecf0f24936b952a565a445ce03c616",
  "parents": [
    "a61cc44812ff94793987bf43b70a3d9bc64a6820"
  ],
  "author": {
    "name": "Andreas Steinmetz",
    "email": "ast@domdv.de",
    "time": "Wed Jul 06 13:55:00 2005 -0700"
  },
  "committer": {
    "name": "David S. Miller",
    "email": "davem@davemloft.net",
    "time": "Wed Jul 06 13:55:00 2005 -0700"
  },
  "message": "[CRYPTO] Add x86_64 asm AES\n\nImplementation:\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\nThe encrypt/decrypt code is based on an x86 implementation I did a while\nago which I never published. This unpublished implementation does\ninclude an assembler based key schedule and precomputed tables. For\nsimplicity and best acceptance, however, I took Gladman\u0027s in-kernel code\nfor table generation and key schedule for the kernel port of my\nassembler code and modified this code to produce the key schedule as\nrequired by my assembler implementation. File locations and Kconfig are\nkept similar to the i586 AES assembler implementation.\nIt may seem a little bit strange to use 32 bit I/O and registers in the\nassembler implementation but this gives the best code size. My\nimplementation takes one instruction more per round compared to\nGladman\u0027s x86 assembler but it doesn\u0027t require any stack for local\nvariables or saved registers and it is less serialized than Gladman\u0027s\ncode.\nNote that all comparisons to Gladman\u0027s code were done after my code was\nimplemented. I did only use FIPS PUB 197 for the implementation so my\nimplementation is independent work.\nIf anybody has a better assembler solution for x86_64 I\u0027ll be pleased to\nhave my code replaced with the better solution.\n\nTesting:\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\nThe implementation passes the in-kernel crypto testing module and I\u0027m\nrunning it without any problems on my laptop where it is mainly used for\ndm-crypt.\n\nMicrobenchmark:\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\nThe microbenchmark was done in userspace with similar compile flags as\nused during kernel compile.\nEncrypt/decrypt is about 35% faster than the generic C implementation.\nAs the generic C as well as my assembler implementation are both table\nI don\u0027t really expect that there is much room for further\nimprovements though I\u0027ll be glad to be corrected here.\nThe key schedule is about 5% slower than the generic C implementation.\nThis is due to the fact that some more work has to be done in the key\nschedule routine to fit the schedule to the assembler implementation.\n\nCode Size:\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\nEncrypt and decrypt are together about 2.1 Kbytes smaller than the\ngeneric C implementation which is important with regard to L1 cache\nusage. The key schedule routine is about 100 bytes larger than the\ngeneric C implementation.\n\nData Size:\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\nThere\u0027s no difference in data size requirements between the assembler\nimplementation and the generic C implementation.\n\nLicense:\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\nGladmans\u0027s code is dual BSD/GPL whereas my assembler code is GPLv2 only\n(I\u0027m  not going to change the license for my code). So I had to change\nthe module license for the x86_64 aes module from \u0027Dual BSD/GPL\u0027 to\n\u0027GPL\u0027 to reflect the most restrictive license within the module.\n\nSigned-off-by: Andreas Steinmetz \u003cast@domdv.de\u003e\nSigned-off-by: Herbert Xu \u003cherbert@gondor.apana.org.au\u003e\nSigned-off-by: David S. Miller \u003cdavem@davemloft.net\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "8a73794f9b9022dba5b6085fab84a81556dc8d0c",
      "old_mode": 33188,
      "old_path": "arch/x86_64/Makefile",
      "new_id": "4289156976751580dbf2895f086b4eaad0345003",
      "new_mode": 33188,
      "new_path": "arch/x86_64/Makefile"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "426d20f4b72ec95a749af59077b9f9e37e4d8ddb",
      "new_mode": 33188,
      "new_path": "arch/x86_64/crypto/Makefile"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "483cbb23ab8d0da13c7f6c8262d95fc6206ef7b3",
      "new_mode": 33188,
      "new_path": "arch/x86_64/crypto/aes-x86_64-asm.S"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "2b5c4010ce38715737a549e0bf986a9cb8431292",
      "new_mode": 33188,
      "new_path": "arch/x86_64/crypto/aes.c"
    },
    {
      "type": "modify",
      "old_id": "90d6089d60ed8c11e251da02e6f090bcc4129bb9",
      "old_mode": 33188,
      "old_path": "crypto/Kconfig",
      "new_id": "256c0b1fed10ddfb8e3f242651ccdefdd970cfa9",
      "new_mode": 33188,
      "new_path": "crypto/Kconfig"
    }
  ]
}
