github.com/mad-day/Yawning-crypto@v0.0.0-20190711051033-5a5f8cca32ec/aez/aez_ref.go (about)

     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  
     8  // +build !amd64 gccgo appengine noasm
     9  
    10  package aez
    11  
    12  func xorBytes1x16(a, b, dst []byte) {
    13  	for i := 0; i < 16; i++ {
    14  		dst[i] = a[i] ^ b[i]
    15  	}
    16  }
    17  
    18  func xorBytes4x16(a, b, c, d, dst []byte) {
    19  	for i := 0; i < 16; i++ {
    20  		dst[i] = a[i] ^ b[i] ^ c[i] ^ d[i]
    21  	}
    22  }
    23  
    24  func (e *eState) aezCorePass1(in, out []byte, X *[blockSize]byte, sz int) {
    25  	e.aezCorePass1Slow(in, out, X, sz)
    26  }
    27  
    28  func (e *eState) aezCorePass2(in, out []byte, Y, S *[blockSize]byte, sz int) {
    29  	e.aezCorePass2Slow(in, out, Y, S, sz)
    30  }
    31  
    32  func platformInit() {
    33  	// Nothing special to do here.
    34  }