| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-or-later */ |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Quick & dirty crypto testing module. |
|---|
| 3 | 4 | * |
|---|
| .. | .. |
|---|
| 7 | 8 | * Copyright (c) 2002 James Morris <jmorris@intercode.com.au> |
|---|
| 8 | 9 | * Copyright (c) 2002 Jean-Francois Dive <jef@linuxbe.org> |
|---|
| 9 | 10 | * 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 | | - * |
|---|
| 16 | 11 | */ |
|---|
| 17 | 12 | #ifndef _CRYPTO_TCRYPT_H |
|---|
| 18 | 13 | #define _CRYPTO_TCRYPT_H |
|---|
| .. | .. |
|---|
| 30 | 25 | struct hash_speed { |
|---|
| 31 | 26 | unsigned int blen; /* buffer length */ |
|---|
| 32 | 27 | unsigned int plen; /* per-update length */ |
|---|
| 33 | | - unsigned int klen; /* key length */ |
|---|
| 34 | 28 | }; |
|---|
| 35 | 29 | |
|---|
| 36 | 30 | /* |
|---|
| .. | .. |
|---|
| 51 | 45 | * Cipher speed tests |
|---|
| 52 | 46 | */ |
|---|
| 53 | 47 | static u8 speed_template_8[] = {8, 0}; |
|---|
| 48 | +static u8 speed_template_16[] = {16, 0}; |
|---|
| 54 | 49 | static u8 speed_template_24[] = {24, 0}; |
|---|
| 55 | 50 | static u8 speed_template_8_16[] = {8, 16, 0}; |
|---|
| 56 | 51 | static u8 speed_template_8_32[] = {8, 32, 0}; |
|---|
| .. | .. |
|---|
| 99 | 94 | |
|---|
| 100 | 95 | /* End marker */ |
|---|
| 101 | 96 | { .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, } |
|---|
| 130 | 97 | }; |
|---|
| 131 | 98 | |
|---|
| 132 | 99 | static struct hash_speed poly1305_speed_template[] = { |
|---|