aez_ref.go 871 B

12345678910111213141516171819202122232425262728293031323334
  1. // aez_ref.go - Generic fallback routines.
  2. //
  3. // To the extent possible under law, Yawning Angel has waived all copyright
  4. // and related or neighboring rights to aez, using the Creative
  5. // Commons "CC0" public domain dedication. See LICENSE or
  6. // <http://creativecommons.org/publicdomain/zero/1.0/> for full details.
  7. // +build !amd64 gccgo appengine noasm
  8. package aez
  9. func xorBytes1x16(a, b, dst []byte) {
  10. for i := 0; i < 16; i++ {
  11. dst[i] = a[i] ^ b[i]
  12. }
  13. }
  14. func xorBytes4x16(a, b, c, d, dst []byte) {
  15. for i := 0; i < 16; i++ {
  16. dst[i] = a[i] ^ b[i] ^ c[i] ^ d[i]
  17. }
  18. }
  19. func (e *eState) aezCorePass1(in, out []byte, X *[blockSize]byte, sz int) {
  20. e.aezCorePass1Slow(in, out, X, sz)
  21. }
  22. func (e *eState) aezCorePass2(in, out []byte, Y, S *[blockSize]byte, sz int) {
  23. e.aezCorePass2Slow(in, out, Y, S, sz)
  24. }
  25. func platformInit() {
  26. // Nothing special to do here.
  27. }