bn: rename extract_multiplier_2x20_win5 -> ossl_extract_multiplier_2x20_win5
authorPauli <pauli@openssl.org>
Tue, 25 May 2021 00:34:10 +0000 (10:34 +1000)
committerPauli <pauli@openssl.org>
Wed, 26 May 2021 23:35:50 +0000 (09:35 +1000)
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/15445)

crypto/bn/asm/rsaz-avx512.pl
crypto/bn/rsaz_exp_x2.c

index 1842bec609907faadc5d11c527965a80e8c74a4a..b827514496c5f599922dd260a99f4bbb333760df 100644 (file)
@@ -514,10 +514,10 @@ ___
 #
 # Extracted value (output) is 20 digit number in 2^52 radix.
 #
-# void extract_multiplier_2x20_win5(BN_ULONG *red_Y,
-#                                   const BN_ULONG red_table[1 << EXP_WIN_SIZE][2][20],
-#                                   int red_table_idx,
-#                                   int tbl_idx);           # 0 or 1
+# void ossl_extract_multiplier_2x20_win5(BN_ULONG *red_Y,
+#                                        const BN_ULONG red_table[1 << EXP_WIN_SIZE][2][20],
+#                                        int red_table_idx,
+#                                        int tbl_idx);           # 0 or 1
 #
 # EXP_WIN_SIZE = 5
 ###############################################################################
@@ -535,9 +535,9 @@ $code.=<<___;
 .text
 
 .align 32
-.globl  extract_multiplier_2x20_win5
-.type   extract_multiplier_2x20_win5,\@function,4
-extract_multiplier_2x20_win5:
+.globl  ossl_extract_multiplier_2x20_win5
+.type   ossl_extract_multiplier_2x20_win5,\@function,4
+ossl_extract_multiplier_2x20_win5:
 .cfi_startproc
     endbranch
     leaq    ($tbl_idx,$tbl_idx,4), %rax
@@ -581,7 +581,7 @@ extract_multiplier_2x20_win5:
 
     ret
 .cfi_endproc
-.size   extract_multiplier_2x20_win5, .-extract_multiplier_2x20_win5
+.size   ossl_extract_multiplier_2x20_win5, .-ossl_extract_multiplier_2x20_win5
 ___
 $code.=<<___;
 .data
@@ -696,9 +696,9 @@ rsaz_def_handler:
     .rva    .LSEH_end_RSAZ_amm52x20_x2_256
     .rva    .LSEH_info_RSAZ_amm52x20_x2_256
 
-    .rva    .LSEH_begin_extract_multiplier_2x20_win5
-    .rva    .LSEH_end_extract_multiplier_2x20_win5
-    .rva    .LSEH_info_extract_multiplier_2x20_win5
+    .rva    .LSEH_begin_ossl_extract_multiplier_2x20_win5
+    .rva    .LSEH_end_ossl_extract_multiplier_2x20_win5
+    .rva    .LSEH_info_ossl_extract_multiplier_2x20_win5
 
 .section    .xdata
 .align  8
@@ -710,10 +710,10 @@ rsaz_def_handler:
     .byte   9,0,0,0
     .rva    rsaz_def_handler
     .rva    .Lrsaz_amm52x20_x2_256_body,.Lrsaz_amm52x20_x2_256_epilogue
-.LSEH_info_extract_multiplier_2x20_win5:
+.LSEH_info_ossl_extract_multiplier_2x20_win5:
     .byte   9,0,0,0
     .rva    rsaz_def_handler
-    .rva    .LSEH_begin_extract_multiplier_2x20_win5,.LSEH_begin_extract_multiplier_2x20_win5
+    .rva    .LSEH_begin_ossl_extract_multiplier_2x20_win5,.LSEH_begin_ossl_extract_multiplier_2x20_win5
 ___
 }
 }}} else {{{                # fallback for old assembler
@@ -729,11 +729,11 @@ rsaz_avx512ifma_eligible:
 
 .globl  RSAZ_amm52x20_x1_256
 .globl  RSAZ_amm52x20_x2_256
-.globl  extract_multiplier_2x20_win5
+.globl  ossl_extract_multiplier_2x20_win5
 .type   RSAZ_amm52x20_x1_256,\@abi-omnipotent
 RSAZ_amm52x20_x1_256:
 RSAZ_amm52x20_x2_256:
-extract_multiplier_2x20_win5:
+ossl_extract_multiplier_2x20_win5:
     .byte   0x0f,0x0b    # ud2
     ret
 .size   RSAZ_amm52x20_x1_256, .-RSAZ_amm52x20_x1_256
index b2a83e81bed0e3bfef19e1c3e4cedfab57606292..cca8176dc17db99421a89fef6a66441f39b33a78 100644 (file)
@@ -82,9 +82,9 @@ void RSAZ_exp52x20_x2_256(BN_ULONG *res, const BN_ULONG *base,
 void RSAZ_amm52x20_x2_256(BN_ULONG *out, const BN_ULONG *a,
                           const BN_ULONG *b, const BN_ULONG *m,
                           const BN_ULONG k0[2]);
-void extract_multiplier_2x20_win5(BN_ULONG *red_Y,
-                                  const BN_ULONG *red_table,
-                                  int red_table_idx, int tbl_idx);
+void ossl_extract_multiplier_2x20_win5(BN_ULONG *red_Y,
+                                       const BN_ULONG *red_table,
+                                       int red_table_idx, int tbl_idx);
 
 /*
  * Dual Montgomery modular exponentiation using prime moduli of the
@@ -328,8 +328,10 @@ void RSAZ_exp52x20_x2_256(BN_ULONG *out,          /* [2][20] */
         red_table_idx_0 >>= exp_chunk_shift;
         red_table_idx_1 >>= exp_chunk_shift;
 
-        extract_multiplier_2x20_win5(red_Y[0], (const BN_ULONG*)red_table, (int)red_table_idx_0, 0);
-        extract_multiplier_2x20_win5(red_Y[1], (const BN_ULONG*)red_table, (int)red_table_idx_1, 1);
+        ossl_extract_multiplier_2x20_win5(red_Y[0], (const BN_ULONG*)red_table,
+                                          (int)red_table_idx_0, 0);
+        ossl_extract_multiplier_2x20_win5(red_Y[1], (const BN_ULONG*)red_table,
+                                          (int)red_table_idx_1, 1);
 
         /* Process other exp windows */
         for (exp_bit_no -= EXP_WIN_SIZE; exp_bit_no >= 0; exp_bit_no -= EXP_WIN_SIZE) {
@@ -354,7 +356,9 @@ void RSAZ_exp52x20_x2_256(BN_ULONG *out,          /* [2][20] */
                     }
                     red_table_idx_0 &= table_idx_mask;
 
-                    extract_multiplier_2x20_win5(red_X[0], (const BN_ULONG*)red_table, (int)red_table_idx_0, 0);
+                    ossl_extract_multiplier_2x20_win5(red_X[0],
+                                                      (const BN_ULONG*)red_table,
+                                                      (int)red_table_idx_0, 0);
                 }
                 {
                     red_table_idx_1 = expz[1][exp_chunk_no];
@@ -371,7 +375,9 @@ void RSAZ_exp52x20_x2_256(BN_ULONG *out,          /* [2][20] */
                     }
                     red_table_idx_1 &= table_idx_mask;
 
-                    extract_multiplier_2x20_win5(red_X[1], (const BN_ULONG*)red_table, (int)red_table_idx_1, 1);
+                    ossl_extract_multiplier_2x20_win5(red_X[1],
+                                                      (const BN_ULONG*)red_table,
+                                                      (int)red_table_idx_1, 1);
                 }
             }