1/***************************************************************************** 2* * 3* Copyright (c) 2012, Intel Corporation * 4* * 5* All rights reserved. * 6* * 7* Redistribution and use in source and binary forms, with or without * 8* modification, are permitted provided that the following conditions are * 9* met: * 10* * 11* * Redistributions of source code must retain the above copyright * 12* notice, this list of conditions and the following disclaimer. * 13* * 14* * Redistributions in binary form must reproduce the above copyright * 15* notice, this list of conditions and the following disclaimer in the * 16* documentation and/or other materials provided with the * 17* distribution. * 18* * 19* * Neither the name of the Intel Corporation nor the names of its * 20* contributors may be used to endorse or promote products derived from * 21* this software without specific prior written permission. * 22* * 23* * 24* THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION ""AS IS"" AND ANY * 25* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * 26* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * 27* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION OR * 28* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * 29* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * 30* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * 31* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * 32* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * 33* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * 34* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * 35* * 36****************************************************************************** 37* Developers and authors: * 38* Shay Gueron (1, 2), and Vlad Krasnov (1) * 39* (1) Intel Corporation, Israel Development Center, Haifa, Israel * 40* (2) University of Haifa, Israel * 41*****************************************************************************/ 42 43#ifndef RSAZ_EXP_H 44#define RSAZ_EXP_H 45 46#include <openssl/bn.h> 47 48void RSAZ_1024_mod_exp_avx2(BN_ULONG result[16], 49 const BN_ULONG base_norm[16], const BN_ULONG exponent[16], 50 const BN_ULONG m_norm[16], const BN_ULONG RR[16], BN_ULONG k0); 51int rsaz_avx2_eligible(void); 52 53#endif 54