1*45818ee1SMatthew Ahrens /* 2*45818ee1SMatthew Ahrens * CDDL HEADER START 3*45818ee1SMatthew Ahrens * 4*45818ee1SMatthew Ahrens * The contents of this file are subject to the terms of the 5*45818ee1SMatthew Ahrens * Common Development and Distribution License (the "License"). 6*45818ee1SMatthew Ahrens * You may not use this file except in compliance with the License. 7*45818ee1SMatthew Ahrens * 8*45818ee1SMatthew Ahrens * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*45818ee1SMatthew Ahrens * or http://opensource.org/licenses/CDDL-1.0. 10*45818ee1SMatthew Ahrens * See the License for the specific language governing permissions 11*45818ee1SMatthew Ahrens * and limitations under the License. 12*45818ee1SMatthew Ahrens * 13*45818ee1SMatthew Ahrens * When distributing Covered Code, include this CDDL HEADER in each 14*45818ee1SMatthew Ahrens * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*45818ee1SMatthew Ahrens * If applicable, add the following below this CDDL HEADER, with the 16*45818ee1SMatthew Ahrens * fields enclosed by brackets "[]" replaced with your own identifying 17*45818ee1SMatthew Ahrens * information: Portions Copyright [yyyy] [name of copyright owner] 18*45818ee1SMatthew Ahrens * 19*45818ee1SMatthew Ahrens * CDDL HEADER END 20*45818ee1SMatthew Ahrens */ 21*45818ee1SMatthew Ahrens 22*45818ee1SMatthew Ahrens /* 23*45818ee1SMatthew Ahrens * Copyright 2013 Saso Kiselkov. All rights reserved. 24*45818ee1SMatthew Ahrens */ 25*45818ee1SMatthew Ahrens 26*45818ee1SMatthew Ahrens #include <sys/modctl.h> 27*45818ee1SMatthew Ahrens #include <sys/crypto/common.h> 28*45818ee1SMatthew Ahrens #include <sys/crypto/spi.h> 29*45818ee1SMatthew Ahrens #include <sys/sysmacros.h> 30*45818ee1SMatthew Ahrens #include <sys/systm.h> 31*45818ee1SMatthew Ahrens #include <sys/edonr.h> 32*45818ee1SMatthew Ahrens 33*45818ee1SMatthew Ahrens /* 34*45818ee1SMatthew Ahrens * Unlike sha2 or skein, we won't expose edonr via the Kernel Cryptographic 35*45818ee1SMatthew Ahrens * Framework (KCF), because Edon-R is *NOT* suitable for general-purpose 36*45818ee1SMatthew Ahrens * cryptographic use. Users of Edon-R must interface directly to this module. 37*45818ee1SMatthew Ahrens */ 38*45818ee1SMatthew Ahrens 39*45818ee1SMatthew Ahrens static struct modlmisc modlmisc = { 40*45818ee1SMatthew Ahrens &mod_miscops, 41*45818ee1SMatthew Ahrens "Edon-R Message-Digest Algorithm" 42*45818ee1SMatthew Ahrens }; 43*45818ee1SMatthew Ahrens 44*45818ee1SMatthew Ahrens static struct modlinkage modlinkage = { 45*45818ee1SMatthew Ahrens MODREV_1, &modlmisc, NULL 46*45818ee1SMatthew Ahrens }; 47*45818ee1SMatthew Ahrens 48*45818ee1SMatthew Ahrens int 49*45818ee1SMatthew Ahrens _init(void) 50*45818ee1SMatthew Ahrens { 51*45818ee1SMatthew Ahrens int error; 52*45818ee1SMatthew Ahrens 53*45818ee1SMatthew Ahrens if ((error = mod_install(&modlinkage)) != 0) 54*45818ee1SMatthew Ahrens return (error); 55*45818ee1SMatthew Ahrens 56*45818ee1SMatthew Ahrens return (0); 57*45818ee1SMatthew Ahrens } 58*45818ee1SMatthew Ahrens 59*45818ee1SMatthew Ahrens int 60*45818ee1SMatthew Ahrens _info(struct modinfo *modinfop) 61*45818ee1SMatthew Ahrens { 62*45818ee1SMatthew Ahrens return (mod_info(&modlinkage, modinfop)); 63*45818ee1SMatthew Ahrens } 64