/* b128ops.h - common 128-bit block operations1*2* Copyright (c) 2003, Dr Brian Gladman, Worcester, UK.3* Copyright (c) 2006, Rik Snel <[email protected]>4*5* Based on Dr Brian Gladman's (GPL'd) work published at6* http://fp.gladman.plus.com/cryptography_technology/index.htm7* See the original copyright notice below.8*9* This program is free software; you can redistribute it and/or modify it10* under the terms of the GNU General Public License as published by the Free11* Software Foundation; either version 2 of the License, or (at your option)12* any later version.13*/14/*15---------------------------------------------------------------------------16Copyright (c) 2003, Dr Brian Gladman, Worcester, UK. All rights reserved.1718LICENSE TERMS1920The free distribution and use of this software in both source and binary21form is allowed (with or without changes) provided that:22231. distributions of this source code include the above copyright24notice, this list of conditions and the following disclaimer;25262. distributions in binary form include the above copyright27notice, this list of conditions and the following disclaimer28in the documentation and/or other associated materials;29303. the copyright holder's name is not used to endorse products31built using this software without specific written permission.3233ALTERNATIVELY, provided that this notice is retained in full, this product34may be distributed under the terms of the GNU General Public License (GPL),35in which case the provisions of the GPL apply INSTEAD OF those given above.3637DISCLAIMER3839This software is provided 'as is' with no explicit or implied warranties40in respect of its properties, including, but not limited to, correctness41and/or fitness for purpose.42---------------------------------------------------------------------------43Issue Date: 13/06/200644*/4546#ifndef _CRYPTO_B128OPS_H47#define _CRYPTO_B128OPS_H4849#include <linux/types.h>5051typedef struct {52__be64 a, b;53} be128;5455typedef struct {56__le64 b, a;57} le128;5859static inline void be128_xor(be128 *r, const be128 *p, const be128 *q)60{61r->a = p->a ^ q->a;62r->b = p->b ^ q->b;63}6465static inline void le128_xor(le128 *r, const le128 *p, const le128 *q)66{67r->a = p->a ^ q->a;68r->b = p->b ^ q->b;69}7071#endif /* _CRYPTO_B128OPS_H */727374