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

TOMOYO Linux Cross Reference
Linux/crypto/tcrypt.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 /crypto/tcrypt.h (Version linux-6.12-rc7) and /crypto/tcrypt.h (Version linux-4.9.337)


  1 /* SPDX-License-Identifier: GPL-2.0-or-later * << 
  2 /*                                                  1 /*
  3  * Quick & dirty crypto testing module.             2  * Quick & dirty crypto testing module.
  4  *                                                  3  *
  5  * This will only exist until we have a better      4  * This will only exist until we have a better testing mechanism
  6  * (e.g. a char device).                            5  * (e.g. a char device).
  7  *                                                  6  *
  8  * Copyright (c) 2002 James Morris <jmorris@in      7  * Copyright (c) 2002 James Morris <jmorris@intercode.com.au>
  9  * Copyright (c) 2002 Jean-Francois Dive <jef@      8  * Copyright (c) 2002 Jean-Francois Dive <jef@linuxbe.org>
 10  * Copyright (c) 2007 Nokia Siemens Networks        9  * Copyright (c) 2007 Nokia Siemens Networks
                                                   >>  10  *
                                                   >>  11  * This program is free software; you can redistribute it and/or modify it
                                                   >>  12  * under the terms of the GNU General Public License as published by the Free
                                                   >>  13  * Software Foundation; either version 2 of the License, or (at your option)
                                                   >>  14  * any later version.
                                                   >>  15  *
 11  */                                                16  */
 12 #ifndef _CRYPTO_TCRYPT_H                           17 #ifndef _CRYPTO_TCRYPT_H
 13 #define _CRYPTO_TCRYPT_H                           18 #define _CRYPTO_TCRYPT_H
 14                                                    19 
 15 struct cipher_speed_template {                     20 struct cipher_speed_template {
 16         const char *key;                           21         const char *key;
 17         unsigned int klen;                         22         unsigned int klen;
 18 };                                                 23 };
 19                                                    24 
 20 struct aead_speed_template {                       25 struct aead_speed_template {
 21         const char *key;                           26         const char *key;
 22         unsigned int klen;                         27         unsigned int klen;
 23 };                                                 28 };
 24                                                    29 
 25 struct hash_speed {                                30 struct hash_speed {
 26         unsigned int blen;      /* buffer leng     31         unsigned int blen;      /* buffer length */
 27         unsigned int plen;      /* per-update      32         unsigned int plen;      /* per-update length */
                                                   >>  33         unsigned int klen;      /* key length */
 28 };                                                 34 };
 29                                                    35 
 30 /*                                                 36 /*
 31  * DES test vectors.                               37  * DES test vectors.
 32  */                                                38  */
 33 #define DES3_SPEED_VECTORS      1                  39 #define DES3_SPEED_VECTORS      1
 34                                                    40 
 35 static struct cipher_speed_template des3_speed     41 static struct cipher_speed_template des3_speed_template[] = {
 36         {                                          42         {
 37                 .key    = "\x01\x23\x45\x67\x8     43                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef"
 38                           "\x55\x55\x55\x55\x5     44                           "\x55\x55\x55\x55\x55\x55\x55\x55"
 39                           "\xfe\xdc\xba\x98\x7     45                           "\xfe\xdc\xba\x98\x76\x54\x32\x10",
 40                 .klen   = 24,                      46                 .klen   = 24,
 41         }                                          47         }
 42 };                                                 48 };
 43                                                    49 
 44 /*                                                 50 /*
 45  * Cipher speed tests                              51  * Cipher speed tests
 46  */                                                52  */
 47 static u8 speed_template_8[] = {8, 0};             53 static u8 speed_template_8[] = {8, 0};
 48 static u8 speed_template_16[] = {16, 0};       << 
 49 static u8 speed_template_24[] = {24, 0};           54 static u8 speed_template_24[] = {24, 0};
 50 static u8 speed_template_8_16[] = {8, 16, 0};      55 static u8 speed_template_8_16[] = {8, 16, 0};
 51 static u8 speed_template_8_32[] = {8, 32, 0};      56 static u8 speed_template_8_32[] = {8, 32, 0};
 52 static u8 speed_template_16_32[] = {16, 32, 0}     57 static u8 speed_template_16_32[] = {16, 32, 0};
 53 static u8 speed_template_16_24_32[] = {16, 24,     58 static u8 speed_template_16_24_32[] = {16, 24, 32, 0};
 54 static u8 speed_template_20_28_36[] = {20, 28,     59 static u8 speed_template_20_28_36[] = {20, 28, 36, 0};
 55 static u8 speed_template_32_40_48[] = {32, 40,     60 static u8 speed_template_32_40_48[] = {32, 40, 48, 0};
 56 static u8 speed_template_32_48[] = {32, 48, 0}     61 static u8 speed_template_32_48[] = {32, 48, 0};
 57 static u8 speed_template_32_48_64[] = {32, 48,     62 static u8 speed_template_32_48_64[] = {32, 48, 64, 0};
 58 static u8 speed_template_32_64[] = {32, 64, 0}     63 static u8 speed_template_32_64[] = {32, 64, 0};
 59 static u8 speed_template_32[] = {32, 0};           64 static u8 speed_template_32[] = {32, 0};
 60                                                    65 
 61 /*                                                 66 /*
 62  * AEAD speed tests                                67  * AEAD speed tests
 63  */                                                68  */
 64 static u8 aead_speed_template_19[] = {19, 0};      69 static u8 aead_speed_template_19[] = {19, 0};
 65 static u8 aead_speed_template_20_28_36[] = {20 !!  70 static u8 aead_speed_template_20[] = {20, 0};
 66 static u8 aead_speed_template_36[] = {36, 0};      71 static u8 aead_speed_template_36[] = {36, 0};
 67                                                    72 
 68 /*                                                 73 /*
 69  * Digest speed tests                              74  * Digest speed tests
 70  */                                                75  */
 71 static struct hash_speed generic_hash_speed_te     76 static struct hash_speed generic_hash_speed_template[] = {
 72         { .blen = 16,   .plen = 16, },             77         { .blen = 16,   .plen = 16, },
 73         { .blen = 64,   .plen = 16, },             78         { .blen = 64,   .plen = 16, },
 74         { .blen = 64,   .plen = 64, },             79         { .blen = 64,   .plen = 64, },
 75         { .blen = 256,  .plen = 16, },             80         { .blen = 256,  .plen = 16, },
 76         { .blen = 256,  .plen = 64, },             81         { .blen = 256,  .plen = 64, },
 77         { .blen = 256,  .plen = 256, },            82         { .blen = 256,  .plen = 256, },
 78         { .blen = 1024, .plen = 16, },             83         { .blen = 1024, .plen = 16, },
 79         { .blen = 1024, .plen = 256, },            84         { .blen = 1024, .plen = 256, },
 80         { .blen = 1024, .plen = 1024, },           85         { .blen = 1024, .plen = 1024, },
 81         { .blen = 2048, .plen = 16, },             86         { .blen = 2048, .plen = 16, },
 82         { .blen = 2048, .plen = 256, },            87         { .blen = 2048, .plen = 256, },
 83         { .blen = 2048, .plen = 1024, },           88         { .blen = 2048, .plen = 1024, },
 84         { .blen = 2048, .plen = 2048, },           89         { .blen = 2048, .plen = 2048, },
 85         { .blen = 4096, .plen = 16, },             90         { .blen = 4096, .plen = 16, },
 86         { .blen = 4096, .plen = 256, },            91         { .blen = 4096, .plen = 256, },
 87         { .blen = 4096, .plen = 1024, },           92         { .blen = 4096, .plen = 1024, },
 88         { .blen = 4096, .plen = 4096, },           93         { .blen = 4096, .plen = 4096, },
 89         { .blen = 8192, .plen = 16, },             94         { .blen = 8192, .plen = 16, },
 90         { .blen = 8192, .plen = 256, },            95         { .blen = 8192, .plen = 256, },
 91         { .blen = 8192, .plen = 1024, },           96         { .blen = 8192, .plen = 1024, },
 92         { .blen = 8192, .plen = 4096, },           97         { .blen = 8192, .plen = 4096, },
 93         { .blen = 8192, .plen = 8192, },           98         { .blen = 8192, .plen = 8192, },
 94                                                    99 
 95         /* End marker */                          100         /* End marker */
 96         {  .blen = 0,   .plen = 0, }              101         {  .blen = 0,   .plen = 0, }
                                                   >> 102 };
                                                   >> 103 
                                                   >> 104 static struct hash_speed hash_speed_template_16[] = {
                                                   >> 105         { .blen = 16,   .plen = 16,     .klen = 16, },
                                                   >> 106         { .blen = 64,   .plen = 16,     .klen = 16, },
                                                   >> 107         { .blen = 64,   .plen = 64,     .klen = 16, },
                                                   >> 108         { .blen = 256,  .plen = 16,     .klen = 16, },
                                                   >> 109         { .blen = 256,  .plen = 64,     .klen = 16, },
                                                   >> 110         { .blen = 256,  .plen = 256,    .klen = 16, },
                                                   >> 111         { .blen = 1024, .plen = 16,     .klen = 16, },
                                                   >> 112         { .blen = 1024, .plen = 256,    .klen = 16, },
                                                   >> 113         { .blen = 1024, .plen = 1024,   .klen = 16, },
                                                   >> 114         { .blen = 2048, .plen = 16,     .klen = 16, },
                                                   >> 115         { .blen = 2048, .plen = 256,    .klen = 16, },
                                                   >> 116         { .blen = 2048, .plen = 1024,   .klen = 16, },
                                                   >> 117         { .blen = 2048, .plen = 2048,   .klen = 16, },
                                                   >> 118         { .blen = 4096, .plen = 16,     .klen = 16, },
                                                   >> 119         { .blen = 4096, .plen = 256,    .klen = 16, },
                                                   >> 120         { .blen = 4096, .plen = 1024,   .klen = 16, },
                                                   >> 121         { .blen = 4096, .plen = 4096,   .klen = 16, },
                                                   >> 122         { .blen = 8192, .plen = 16,     .klen = 16, },
                                                   >> 123         { .blen = 8192, .plen = 256,    .klen = 16, },
                                                   >> 124         { .blen = 8192, .plen = 1024,   .klen = 16, },
                                                   >> 125         { .blen = 8192, .plen = 4096,   .klen = 16, },
                                                   >> 126         { .blen = 8192, .plen = 8192,   .klen = 16, },
                                                   >> 127 
                                                   >> 128         /* End marker */
                                                   >> 129         {  .blen = 0,   .plen = 0,      .klen = 0, }
 97 };                                                130 };
 98                                                   131 
 99 static struct hash_speed poly1305_speed_templa    132 static struct hash_speed poly1305_speed_template[] = {
100         { .blen = 96,   .plen = 16, },            133         { .blen = 96,   .plen = 16, },
101         { .blen = 96,   .plen = 32, },            134         { .blen = 96,   .plen = 32, },
102         { .blen = 96,   .plen = 96, },            135         { .blen = 96,   .plen = 96, },
103         { .blen = 288,  .plen = 16, },            136         { .blen = 288,  .plen = 16, },
104         { .blen = 288,  .plen = 32, },            137         { .blen = 288,  .plen = 32, },
105         { .blen = 288,  .plen = 288, },           138         { .blen = 288,  .plen = 288, },
106         { .blen = 1056, .plen = 32, },            139         { .blen = 1056, .plen = 32, },
107         { .blen = 1056, .plen = 1056, },          140         { .blen = 1056, .plen = 1056, },
108         { .blen = 2080, .plen = 32, },            141         { .blen = 2080, .plen = 32, },
109         { .blen = 2080, .plen = 2080, },          142         { .blen = 2080, .plen = 2080, },
110         { .blen = 4128, .plen = 4128, },          143         { .blen = 4128, .plen = 4128, },
111         { .blen = 8224, .plen = 8224, },          144         { .blen = 8224, .plen = 8224, },
112                                                   145 
113         /* End marker */                          146         /* End marker */
114         {  .blen = 0,   .plen = 0, }              147         {  .blen = 0,   .plen = 0, }
115 };                                                148 };
116                                                   149 
117 #endif  /* _CRYPTO_TCRYPT_H */                    150 #endif  /* _CRYPTO_TCRYPT_H */
118                                                   151 

~ [ 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