aes-spe-regs.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. * Common registers for PPC AES implementation
  3. *
  4. * Copyright (c) 2015 Markus Stockhausen <stockhausen@collogia.de>
  5. *
  6. * This program is free software; you can redistribute it and/or modify it
  7. * under the terms of the GNU General Public License as published by the Free
  8. * Software Foundation; either version 2 of the License, or (at your option)
  9. * any later version.
  10. *
  11. */
  12. #define rKS r0 /* copy of en-/decryption key pointer */
  13. #define rDP r3 /* destination pointer */
  14. #define rSP r4 /* source pointer */
  15. #define rKP r5 /* pointer to en-/decryption key pointer */
  16. #define rRR r6 /* en-/decryption rounds */
  17. #define rLN r7 /* length of data to be processed */
  18. #define rIP r8 /* potiner to IV (CBC/CTR/XTS modes) */
  19. #define rKT r9 /* pointer to tweak key (XTS mode) */
  20. #define rT0 r11 /* pointers to en-/decryption tables */
  21. #define rT1 r10
  22. #define rD0 r9 /* data */
  23. #define rD1 r14
  24. #define rD2 r12
  25. #define rD3 r15
  26. #define rW0 r16 /* working registers */
  27. #define rW1 r17
  28. #define rW2 r18
  29. #define rW3 r19
  30. #define rW4 r20
  31. #define rW5 r21
  32. #define rW6 r22
  33. #define rW7 r23
  34. #define rI0 r24 /* IV */
  35. #define rI1 r25
  36. #define rI2 r26
  37. #define rI3 r27
  38. #define rG0 r28 /* endian reversed tweak (XTS mode) */
  39. #define rG1 r29
  40. #define rG2 r30
  41. #define rG3 r31