Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0 OR MIT
0002 /*
0003  * Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
0004  *
0005  * This is an implementation of the Curve25519 ECDH algorithm, using either
0006  * a 32-bit implementation or a 64-bit implementation with 128-bit integers,
0007  * depending on what is supported by the target compiler.
0008  *
0009  * Information: https://cr.yp.to/ecdh.html
0010  */
0011 
0012 #include <crypto/curve25519.h>
0013 #include <linux/module.h>
0014 #include <linux/init.h>
0015 
0016 static int __init curve25519_init(void)
0017 {
0018     if (!IS_ENABLED(CONFIG_CRYPTO_MANAGER_DISABLE_TESTS) &&
0019         WARN_ON(!curve25519_selftest()))
0020         return -ENODEV;
0021     return 0;
0022 }
0023 
0024 static void __exit curve25519_exit(void)
0025 {
0026 }
0027 
0028 module_init(curve25519_init);
0029 module_exit(curve25519_exit);
0030 
0031 MODULE_LICENSE("GPL v2");
0032 MODULE_DESCRIPTION("Curve25519 scalar multiplication");
0033 MODULE_AUTHOR("Jason A. Donenfeld <Jason@zx2c4.com>");