提交 5f0b4448 编写于 作者: A Andy Polyakov 提交者: Matt Caswell

bn/rsaz_exp.c: make it indent-friendly.

Reviewed-by: NTim Hudson <tjh@openssl.org>
上级 2dc57eb5
...@@ -63,10 +63,14 @@ void rsaz_1024_red2norm_avx2(void *norm,const void *red); ...@@ -63,10 +63,14 @@ void rsaz_1024_red2norm_avx2(void *norm,const void *red);
# define ALIGN64 /* not fatal, might hurt performance a little */ # define ALIGN64 /* not fatal, might hurt performance a little */
#endif #endif
ALIGN64 static const BN_ULONG one[40] = ALIGN64 static const BN_ULONG one[40] = {
{1,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
ALIGN64 static const BN_ULONG two80[40] = 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
{0,0,1<<22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; };
ALIGN64 static const BN_ULONG two80[40] = {
0,0,1<<22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
};
void RSAZ_1024_mod_exp_avx2(BN_ULONG result_norm[16], void RSAZ_1024_mod_exp_avx2(BN_ULONG result_norm[16],
const BN_ULONG base_norm[16], const BN_ULONG exponent[16], const BN_ULONG base_norm[16], const BN_ULONG exponent[16],
...@@ -74,9 +78,9 @@ void RSAZ_1024_mod_exp_avx2(BN_ULONG result_norm[16], ...@@ -74,9 +78,9 @@ void RSAZ_1024_mod_exp_avx2(BN_ULONG result_norm[16],
{ {
unsigned char storage[320*3+32*9*16+64]; /* 5.5KB */ unsigned char storage[320*3+32*9*16+64]; /* 5.5KB */
unsigned char *p_str = storage + (64-((size_t)storage%64)); unsigned char *p_str = storage + (64-((size_t)storage%64));
unsigned char *a_inv, *m, *result, unsigned char *a_inv, *m, *result;
*table_s = p_str+320*3, unsigned char *table_s = p_str+320*3;
*R2 = table_s; /* borrow */ unsigned char *R2 = table_s; /* borrow */
int index; int index;
int wvalue; int wvalue;
...@@ -270,8 +274,8 @@ void RSAZ_512_mod_exp(BN_ULONG result[8], ...@@ -270,8 +274,8 @@ void RSAZ_512_mod_exp(BN_ULONG result[8],
{ {
unsigned char storage[16*8*8+64*2+64]; /* 1.2KB */ unsigned char storage[16*8*8+64*2+64]; /* 1.2KB */
unsigned char *table = storage + (64-((size_t)storage%64)); unsigned char *table = storage + (64-((size_t)storage%64));
BN_ULONG *a_inv = (BN_ULONG *)(table+16*8*8), BN_ULONG *a_inv = (BN_ULONG *)(table+16*8*8);
*temp = (BN_ULONG *)(table+16*8*8+8*8); BN_ULONG *temp = (BN_ULONG *)(table+16*8*8+8*8);
unsigned char *p_str = (unsigned char*)exponent; unsigned char *p_str = (unsigned char*)exponent;
int index; int index;
unsigned int wvalue; unsigned int wvalue;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册