In this article, I explain how AES encryption works and how the algorithm is implemented.

  • vzq@lemmy.blahaj.zone
    link
    fedilink
    arrow-up
    4
    ·
    edit-2
    1 year ago

    That’s a very good explanation.

    Now forget you read that and never ever implement that yourself in production situations. Instead rely on hardware implementations and established libraries.

    AES is practically impossible to implement without introducing huge side channels. Verification of side channel resistance is a huge issue.

    • addie@feddit.uk
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      The side channel resistance includes such matters as ensuring that the cypher takes the same amount of time, regardless of the key, but also such super-sneaky insights as the amount of power used to run the cypher, which can be measured from the CPU temperature. Every bit of the cypher that you can be sure of makes it easier to guess the rest. And even if you coded this algorithm in assembly, the CPU will interpret it as microcode and run that, potentially leaving you vulnerable - this is not straightforward stuff.

      Like vzq says, implementing this properly is for a cross-disciplinary team of experts in their fields.