< prev index next >

src/java.base/share/tools/org/openjdk/buildtools/intpoly/FieldGen.java

Print this page




   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 
  25 /*
  26  * This file is used to generated optimized finite field implementations.
  27  */
  28 package build.tools.intpoly;
  29 
  30 import java.io.*;
  31 import java.math.BigInteger;
  32 import java.nio.file.Files;
  33 import java.nio.file.Path;
  34 import java.util.*;
  35 
  36 public class FieldGen {
  37 
  38     static FieldParams Curve25519 = new FieldParams(
  39             "IntegerPolynomial25519", 26, 10, 1, 255,
  40             Arrays.asList(
  41                     new Term(0, -19)
  42             ),
  43             Curve25519CrSequence(), simpleSmallCrSequence(10)
  44     );
  45 
  46     private static List<CarryReduce> Curve25519CrSequence() {
  47         List<CarryReduce> result = new ArrayList<CarryReduce>();
  48 




   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 
  25 /*
  26  * This file is used to generated optimized finite field implementations.
  27  */
  28 package org.openjdk.buildtools.intpoly;
  29 
  30 import java.io.*;
  31 import java.math.BigInteger;
  32 import java.nio.file.Files;
  33 import java.nio.file.Path;
  34 import java.util.*;
  35 
  36 public class FieldGen {
  37 
  38     static FieldParams Curve25519 = new FieldParams(
  39             "IntegerPolynomial25519", 26, 10, 1, 255,
  40             Arrays.asList(
  41                     new Term(0, -19)
  42             ),
  43             Curve25519CrSequence(), simpleSmallCrSequence(10)
  44     );
  45 
  46     private static List<CarryReduce> Curve25519CrSequence() {
  47         List<CarryReduce> result = new ArrayList<CarryReduce>();
  48 


< prev index next >