crypto_null.c (5800571960234f9d1f1011bf135799b2014d4268) | crypto_null.c (d6ebf5286f8f94a254a8c90d4b9f2a8b076a8634) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-or-later | |
2/* 3 * Cryptographic API. 4 * 5 * Null algorithms, aka Much Ado About Nothing. 6 * 7 * These are needed for IPsec, and may be useful in general for 8 * testing & debugging. 9 * 10 * The null cipher is compliant with RFC2410. 11 * 12 * Copyright (c) 2002 James Morris <jmorris@intercode.com.au> | 1/* 2 * Cryptographic API. 3 * 4 * Null algorithms, aka Much Ado About Nothing. 5 * 6 * These are needed for IPsec, and may be useful in general for 7 * testing & debugging. 8 * 9 * The null cipher is compliant with RFC2410. 10 * 11 * Copyright (c) 2002 James Morris <jmorris@intercode.com.au> |
12 * 13 * This program is free software; you can redistribute it and/or modify 14 * it under the terms of the GNU General Public License as published by 15 * the Free Software Foundation; either version 2 of the License, or 16 * (at your option) any later version. 17 * |
|
13 */ 14 15#include <crypto/null.h> 16#include <crypto/internal/hash.h> 17#include <crypto/internal/skcipher.h> 18#include <linux/init.h> 19#include <linux/module.h> 20#include <linux/mm.h> --- 74 unchanged lines hidden (view full) --- 95 .setkey = null_hash_setkey, 96 .init = null_init, 97 .update = null_update, 98 .finup = null_digest, 99 .digest = null_digest, 100 .final = null_final, 101 .base = { 102 .cra_name = "digest_null", | 18 */ 19 20#include <crypto/null.h> 21#include <crypto/internal/hash.h> 22#include <crypto/internal/skcipher.h> 23#include <linux/init.h> 24#include <linux/module.h> 25#include <linux/mm.h> --- 74 unchanged lines hidden (view full) --- 100 .setkey = null_hash_setkey, 101 .init = null_init, 102 .update = null_update, 103 .finup = null_digest, 104 .digest = null_digest, 105 .final = null_final, 106 .base = { 107 .cra_name = "digest_null", |
108 .cra_driver_name = "digest_null-generic", |
|
103 .cra_blocksize = NULL_BLOCK_SIZE, 104 .cra_module = THIS_MODULE, 105 } 106}; 107 108static struct skcipher_alg skcipher_null = { 109 .base.cra_name = "ecb(cipher_null)", 110 .base.cra_driver_name = "ecb-cipher_null", --- 6 unchanged lines hidden (view full) --- 117 .ivsize = NULL_IV_SIZE, 118 .setkey = null_skcipher_setkey, 119 .encrypt = null_skcipher_crypt, 120 .decrypt = null_skcipher_crypt, 121}; 122 123static struct crypto_alg null_algs[] = { { 124 .cra_name = "cipher_null", | 109 .cra_blocksize = NULL_BLOCK_SIZE, 110 .cra_module = THIS_MODULE, 111 } 112}; 113 114static struct skcipher_alg skcipher_null = { 115 .base.cra_name = "ecb(cipher_null)", 116 .base.cra_driver_name = "ecb-cipher_null", --- 6 unchanged lines hidden (view full) --- 123 .ivsize = NULL_IV_SIZE, 124 .setkey = null_skcipher_setkey, 125 .encrypt = null_skcipher_crypt, 126 .decrypt = null_skcipher_crypt, 127}; 128 129static struct crypto_alg null_algs[] = { { 130 .cra_name = "cipher_null", |
131 .cra_driver_name = "cipher_null-generic", |
|
125 .cra_flags = CRYPTO_ALG_TYPE_CIPHER, 126 .cra_blocksize = NULL_BLOCK_SIZE, 127 .cra_ctxsize = 0, 128 .cra_module = THIS_MODULE, 129 .cra_u = { .cipher = { 130 .cia_min_keysize = NULL_KEY_SIZE, 131 .cia_max_keysize = NULL_KEY_SIZE, 132 .cia_setkey = null_setkey, 133 .cia_encrypt = null_crypt, 134 .cia_decrypt = null_crypt } } 135}, { 136 .cra_name = "compress_null", | 132 .cra_flags = CRYPTO_ALG_TYPE_CIPHER, 133 .cra_blocksize = NULL_BLOCK_SIZE, 134 .cra_ctxsize = 0, 135 .cra_module = THIS_MODULE, 136 .cra_u = { .cipher = { 137 .cia_min_keysize = NULL_KEY_SIZE, 138 .cia_max_keysize = NULL_KEY_SIZE, 139 .cia_setkey = null_setkey, 140 .cia_encrypt = null_crypt, 141 .cia_decrypt = null_crypt } } 142}, { 143 .cra_name = "compress_null", |
144 .cra_driver_name = "compress_null-generic", |
|
137 .cra_flags = CRYPTO_ALG_TYPE_COMPRESS, 138 .cra_blocksize = NULL_BLOCK_SIZE, 139 .cra_ctxsize = 0, 140 .cra_module = THIS_MODULE, 141 .cra_u = { .compress = { 142 .coa_compress = null_compress, 143 .coa_decompress = null_compress } } 144} }; --- 78 unchanged lines hidden --- | 145 .cra_flags = CRYPTO_ALG_TYPE_COMPRESS, 146 .cra_blocksize = NULL_BLOCK_SIZE, 147 .cra_ctxsize = 0, 148 .cra_module = THIS_MODULE, 149 .cra_u = { .compress = { 150 .coa_compress = null_compress, 151 .coa_decompress = null_compress } } 152} }; --- 78 unchanged lines hidden --- |