| 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 |
#ifndef IFMA_ARITH_P256_ASM_H |
| 27 |
#define IFMA_ARITH_P256_ASM_H |
| 28 |
|
| 29 |
#include "owndefs.h" |
| 30 |
|
| 31 |
#if (_IPP32E >= _IPP32E_K1) |
| 32 |
|
| 33 |
#include "gfpec/ecnist/ifma_defs.h" |
| 34 |
#include "gfpec/ecnist/ifma_ecpoint_p256.h" |
| 35 |
#include "gfpec/ecnist/ifma_arith_p256.h" |
| 36 |
|
| 37 |
|
| 38 |
#define ifma_amm52_dual_p256_asm_zmm OWNAPI(ifma_amm52_dual_p256_asm_zmm) |
| 39 |
|
| 40 |
IPP_OWN_DECL(void, ifma_amm52_dual_p256_asm_zmm, (m512* out_r1, |
| 41 |
const m512* in_a1, |
| 42 |
const m512* in_b1, |
| 43 |
m512* out_r2, |
| 44 |
const m512* in_a2, |
| 45 |
const m512* in_b6)) |
| 46 |
|
| 47 |
#define ifma_lnorm52_dual_p256_asm_zmm OWNAPI(ifma_lnorm52_dual_p256_asm_zmm) |
| 48 |
IPP_OWN_DECL(void, ifma_lnorm52_dual_p256_asm_zmm, (m512* out_pr1, |
| 49 |
m512* in_a1, |
| 50 |
m512* out_pr2, |
| 51 |
m512* in_a2)) |
| 52 |
|
| 53 |
|
| 54 |
|
| 55 |
#define ifma_amm52_p256_asm_zmm OWNAPI(ifma_amm52_p256_asm_zmm) |
| 56 |
IPP_OWN_DECL(void, ifma_amm52_p256_asm_zmm, (m512 * out_pr, const m512* in_a, const m512* in_b)) |
| 57 |
|
| 58 |
|
| 59 |
#define ifma_norm52_dual_p256_asm_zmm OWNAPI(ifma_norm52_dual_p256_asm_zmm) |
| 60 |
|
| 61 |
IPP_OWN_DECL(void, ifma_norm52_dual_p256_asm_zmm, (m512* out_pr1, |
| 62 |
m512* in_a1, |
| 63 |
m512* out_pr2, |
| 64 |
m512* in_a2)) |
| 65 |
|
| 66 |
|
| 67 |
|
| 68 |
#define ifma_lnorm52_p256_asm_zmm OWNAPI(ifma_lnorm52_p256_asm_zmm) |
| 69 |
IPP_OWN_DECL(void, ifma_lnorm52_p256_asm_zmm, (m512 * out_pr, m512* in_a)) |
| 70 |
|
| 71 |
|
| 72 |
#define ifma_norm52_p256_asm_zmm OWNAPI(ifma_norm52_p256_asm_zmm) |
| 73 |
IPP_OWN_DECL(void, ifma_norm52_p256_asm_zmm, (m512 * out_pr, m512* in_a)) |
| 74 |
|
| 75 |
|
| 76 |
#define ifma_half52_p256_asm_zmm OWNAPI(ifma_half52_p256_asm_zmm) |
| 77 |
IPP_OWN_DECL(void, ifma_half52_p256_asm_zmm, (m512 * out_pr, m512* in_a)) |
| 78 |
|
| 79 |
|
| 80 |
#define ifma_aminv52_p256_asm_zmm OWNAPI(ifma_aminv52_p256_asm_zmm) |
| 81 |
IPP_OWN_DECL(void, ifma_aminv52_p256_asm_zmm, (m512 * out_pr, m512* in_a)) |
| 82 |
|
| 83 |
|
| 84 |
#define ifma_ec_nistp256_dbl_point_asm_zmm OWNAPI(ifma_ec_nistp256_dbl_point_asm_zmm) |
| 85 |
|
| 86 |
IPP_OWN_DECL(void, ifma_ec_nistp256_dbl_point_asm_zmm, (m512* out_R_X, |
| 87 |
m512* out_R_Y, |
| 88 |
m512* out_R_Z, |
| 89 |
const m512* in_P_X, |
| 90 |
const m512* in_P_Y, |
| 91 |
const m512* in_P_Z)) |
| 92 |
|
| 93 |
|
| 94 |
|
| 95 |
|
| 96 |
|
| 97 |
#define ifma_ec_nistp256_add_point_asm_zmm OWNAPI(ifma_ec_nistp256_add_point_asm_zmm) |
| 98 |
IPP_OWN_DECL(void, ifma_ec_nistp256_add_point_asm_zmm, (m512* P_X, |
| 99 |
m512* P_Y, |
| 100 |
m512* P_Z, |
| 101 |
const m512* in_Q_X, |
| 102 |
const m512* in_Q_Y, |
| 103 |
const m512* in_Q_Z)) |
| 104 |
|
| 105 |
|
| 106 |
|
| 107 |
|
| 108 |
|
| 109 |
|
| 110 |
|
| 111 |
|
| 112 |
|
| 113 |
|
| 114 |
|
| 115 |
|
| 116 |
#define ifma_ec_nistp256_mul_point_loop_asm_zmm OWNAPI(ifma_ec_nistp256_mul_point_loop_asm_zmm) |
| 117 |
|
| 118 |
IPP_OWN_DECL(void, ifma_ec_nistp256_mul_point_loop_asm_zmm, (P256_POINT_IFMA* R, |
| 119 |
const Ipp8u* pScalar, |
| 120 |
Ipp32s scalarBitSize, |
| 121 |
const m512* px, |
| 122 |
const m512* py, |
| 123 |
const m512* pz)) |
| 124 |
|
| 125 |
|
| 126 |
|
| 127 |
|
| 128 |
#define ifma_ec_nistp256_get_affine_coords_asm_zmm OWNAPI(ifma_ec_nistp256_get_affine_coords_asm_zmm) |
| 129 |
IPP_OWN_DECL(void, ifma_ec_nistp256_get_affine_coords_asm_zmm, (m512* out_R_X, m512* out_R_Y, |
| 130 |
const P256_POINT_IFMA* A)) |
| 131 |
|
| 132 |
|
| 133 |
|
| 134 |
|
| 135 |
#define ifma_frommont52_p256_asm_zmm OWNAPI(ifma_frommont52_p256_asm_zmm) |
| 136 |
IPP_OWN_DECL(void, ifma_frommont52_p256_asm_zmm, (m512 * out_pr, m512* in_a)) |
| 137 |
|
| 138 |
|
| 139 |
|
| 140 |
|
| 141 |
|
| 142 |
|
| 143 |
|
| 144 |
|
| 145 |
#define ifma_amm52_dual_p256_mul_asm(out_r1, in_a1, in_b1, out_r2, in_a2, in_b6) \ |
| 146 |
ifma_amm52_dual_p256_asm_zmm((out_r1), (in_a1), (in_b1), (out_r2), (in_a2), (in_b6)) |
| 147 |
|
| 148 |
|
| 149 |
|
| 150 |
|
| 151 |
#define ifma_amm52_dual_p256_sqr_asm(r1, a1, r2, a2) \ |
| 152 |
ifma_amm52_dual_p256_asm_zmm(r1, a1, a1, r2, a2, a2); |
| 153 |
|
| 154 |
|
| 155 |
|
| 156 |
|
| 157 |
#define ifma_ams52_p256_asm(out_pr, in_a) ifma_amm52_p256_asm_zmm(out_pr, in_a, in_a); |
| 158 |
|
| 159 |
|
| 160 |
|
| 161 |
|
| 162 |
#define ifma_lnorm52_dual_p256_asm(out_pr1, in_a1, out_pr2, in_a2) \ |
| 163 |
ifma_lnorm52_dual_p256_asm_zmm((out_pr1), (in_a1), (out_pr2), (in_a2)) |
| 164 |
|
| 165 |
|
| 166 |
|
| 167 |
|
| 168 |
#define ifma_norm52_dual_p256_asm(out_pr1, in_a1, out_pr2, in_a2) \ |
| 169 |
ifma_norm52_dual_p256_asm_zmm((out_pr1), (in_a1), (out_pr2), (in_a2)) |
| 170 |
|
| 171 |
|
| 172 |
|
| 173 |
|
| 174 |
|
| 175 |
#define ifma_amm52_p256_asm(out_pr, in_a, in_b) ifma_amm52_p256_asm_zmm(out_pr, in_a, in_b); |
| 176 |
|
| 177 |
|
| 178 |
|
| 179 |
|
| 180 |
#define ifma_lnorm52_p256_asm(out_pr, in_a) ifma_lnorm52_p256_asm_zmm((out_pr), (in_a)) |
| 181 |
|
| 182 |
|
| 183 |
|
| 184 |
|
| 185 |
#define ifma_norm52_p256_asm(out_pr, in_a) ifma_norm52_p256_asm_zmm((out_pr), (in_a)) |
| 186 |
|
| 187 |
|
| 188 |
|
| 189 |
|
| 190 |
#define ifma_ec_nistp256_get_affine_coords_asm(out_R_X, out_R_Y, A) \ |
| 191 |
ifma_ec_nistp256_get_affine_coords_asm_zmm((out_R_X), (out_R_Y), (A)) |
| 192 |
|
| 193 |
|
| 194 |
|
| 195 |
|
| 196 |
#define ifma_frommont52_p256_asm(out_pr, in_a) ifma_frommont52_p256_asm_zmm((out_pr), (in_a)) |
| 197 |
|
| 198 |
#endif |
| 199 |
|
| 200 |
#endif |