summaryrefslogtreecommitdiff
path: root/arch/mips/lib/crypto/chacha-glue.c
blob: 88c097594eb0f08a676dc10ee0ca15fb5542c9df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// SPDX-License-Identifier: GPL-2.0
/*
 * ChaCha and HChaCha functions (MIPS optimized)
 *
 * Copyright (C) 2019 Linaro, Ltd. <ard.biesheuvel@linaro.org>
 */

#include <crypto/chacha.h>
#include <linux/kernel.h>
#include <linux/module.h>

asmlinkage void chacha_crypt_arch(struct chacha_state *state,
				  u8 *dst, const u8 *src,
				  unsigned int bytes, int nrounds);
EXPORT_SYMBOL(chacha_crypt_arch);

asmlinkage void hchacha_block_arch(const struct chacha_state *state,
				   u32 out[HCHACHA_OUT_WORDS], int nrounds);
EXPORT_SYMBOL(hchacha_block_arch);

bool chacha_is_arch_optimized(void)
{
	return true;
}
EXPORT_SYMBOL(chacha_is_arch_optimized);

MODULE_DESCRIPTION("ChaCha and HChaCha functions (MIPS optimized)");
MODULE_AUTHOR("Ard Biesheuvel <ard.biesheuvel@linaro.org>");
MODULE_LICENSE("GPL v2");