~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/crypto/b128ops.h

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /include/crypto/b128ops.h (Version linux-6.12-rc7) and /include/crypto/b128ops.h (Version linux-5.16.20)


  1 /* b128ops.h - common 128-bit block operations      1 /* b128ops.h - common 128-bit block operations
  2  *                                                  2  *
  3  * Copyright (c) 2003, Dr Brian Gladman, Worce      3  * Copyright (c) 2003, Dr Brian Gladman, Worcester, UK.
  4  * Copyright (c) 2006, Rik Snel <rsnel@cube.dy      4  * Copyright (c) 2006, Rik Snel <rsnel@cube.dyndns.org>
  5  *                                                  5  *
  6  * Based on Dr Brian Gladman's (GPL'd) work pu      6  * Based on Dr Brian Gladman's (GPL'd) work published at
  7  * http://fp.gladman.plus.com/cryptography_tec      7  * http://fp.gladman.plus.com/cryptography_technology/index.htm
  8  * See the original copyright notice below.         8  * See the original copyright notice below.
  9  *                                                  9  *
 10  * This program is free software; you can redi     10  * This program is free software; you can redistribute it and/or modify it
 11  * under the terms of the GNU General Public L     11  * under the terms of the GNU General Public License as published by the Free
 12  * Software Foundation; either version 2 of th     12  * Software Foundation; either version 2 of the License, or (at your option)
 13  * any later version.                              13  * any later version.
 14  */                                                14  */
 15 /*                                                 15 /*
 16  ---------------------------------------------     16  ---------------------------------------------------------------------------
 17  Copyright (c) 2003, Dr Brian Gladman, Worcest     17  Copyright (c) 2003, Dr Brian Gladman, Worcester, UK.   All rights reserved.
 18                                                    18 
 19  LICENSE TERMS                                     19  LICENSE TERMS
 20                                                    20 
 21  The free distribution and use of this softwar     21  The free distribution and use of this software in both source and binary
 22  form is allowed (with or without changes) pro     22  form is allowed (with or without changes) provided that:
 23                                                    23 
 24    1. distributions of this source code includ     24    1. distributions of this source code include the above copyright
 25       notice, this list of conditions and the      25       notice, this list of conditions and the following disclaimer;
 26                                                    26 
 27    2. distributions in binary form include the     27    2. distributions in binary form include the above copyright
 28       notice, this list of conditions and the      28       notice, this list of conditions and the following disclaimer
 29       in the documentation and/or other associ     29       in the documentation and/or other associated materials;
 30                                                    30 
 31    3. the copyright holder's name is not used      31    3. the copyright holder's name is not used to endorse products
 32       built using this software without specif     32       built using this software without specific written permission.
 33                                                    33 
 34  ALTERNATIVELY, provided that this notice is r     34  ALTERNATIVELY, provided that this notice is retained in full, this product
 35  may be distributed under the terms of the GNU     35  may be distributed under the terms of the GNU General Public License (GPL),
 36  in which case the provisions of the GPL apply     36  in which case the provisions of the GPL apply INSTEAD OF those given above.
 37                                                    37 
 38  DISCLAIMER                                        38  DISCLAIMER
 39                                                    39 
 40  This software is provided 'as is' with no exp     40  This software is provided 'as is' with no explicit or implied warranties
 41  in respect of its properties, including, but      41  in respect of its properties, including, but not limited to, correctness
 42  and/or fitness for purpose.                       42  and/or fitness for purpose.
 43  ---------------------------------------------     43  ---------------------------------------------------------------------------
 44  Issue Date: 13/06/2006                            44  Issue Date: 13/06/2006
 45 */                                                 45 */
 46                                                    46 
 47 #ifndef _CRYPTO_B128OPS_H                          47 #ifndef _CRYPTO_B128OPS_H
 48 #define _CRYPTO_B128OPS_H                          48 #define _CRYPTO_B128OPS_H
 49                                                    49 
 50 #include <linux/types.h>                           50 #include <linux/types.h>
 51                                                    51 
 52 typedef struct {                                   52 typedef struct {
                                                   >>  53         u64 a, b;
                                                   >>  54 } u128;
                                                   >>  55 
                                                   >>  56 typedef struct {
 53         __be64 a, b;                               57         __be64 a, b;
 54 } be128;                                           58 } be128;
 55                                                    59 
 56 typedef struct {                                   60 typedef struct {
 57         __le64 b, a;                               61         __le64 b, a;
 58 } le128;                                           62 } le128;
 59                                                    63 
 60 static inline void be128_xor(be128 *r, const b !!  64 static inline void u128_xor(u128 *r, const u128 *p, const u128 *q)
 61 {                                                  65 {
 62         r->a = p->a ^ q->a;                        66         r->a = p->a ^ q->a;
 63         r->b = p->b ^ q->b;                        67         r->b = p->b ^ q->b;
 64 }                                                  68 }
 65                                                    69 
                                                   >>  70 static inline void be128_xor(be128 *r, const be128 *p, const be128 *q)
                                                   >>  71 {
                                                   >>  72         u128_xor((u128 *)r, (u128 *)p, (u128 *)q);
                                                   >>  73 }
                                                   >>  74 
 66 static inline void le128_xor(le128 *r, const l     75 static inline void le128_xor(le128 *r, const le128 *p, const le128 *q)
 67 {                                                  76 {
 68         r->a = p->a ^ q->a;                    !!  77         u128_xor((u128 *)r, (u128 *)p, (u128 *)q);
 69         r->b = p->b ^ q->b;                    << 
 70 }                                                  78 }
 71                                                    79 
 72 #endif /* _CRYPTO_B128OPS_H */                     80 #endif /* _CRYPTO_B128OPS_H */
 73                                                    81 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php