/* * Copyright (c) 2012-2020 MIRACL UK Ltd. * * This file is part of MIRACL Core * (see https://github.com/miracl/core). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "arch.h" #include "ecp_NUMS384E.h" namespace NUMS384E { /* NUMS 384-bit Curve - Edwards */ #if CHUNK==16 #error Not supported #endif #if CHUNK==32 using namespace B384_29; const int CURVE_Cof_I=4; const BIG CURVE_Cof= {0x4,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}; const int CURVE_B_I= -11556; const BIG CURVE_B= {0x1FFFD19F,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x7F}; const BIG CURVE_Order= {0x6A3897D,0x5CEE627,0xD721E48,0x8AAB556,0x1E1CF61E,0xD0E5A35,0x1FFF891C,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1F}; const BIG CURVE_Gx= {0xC206BDE,0x6AA0723,0x116504D4,0x52562CA,0x163406FF,0x1FD47998,0x10015D8F,0x8DCB7C9,0x15B30BF4,0x14D72AED,0x102DA884,0xB524CD9,0x1B111FB4,0x30}; const BIG CURVE_Gy= {0x10729392,0xC681F0F,0x1B123727,0x561F28D,0x1964B007,0xC7BFB22,0x1D5A0C3E,0xE9E284B,0x1716AD82,0x11D886E,0x1CE2C69,0x134DDD61,0x983E67B,0x41}; const BIG CURVE_HTPC= {0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}; #endif #if CHUNK==64 using namespace B384_58; const int CURVE_Cof_I= 4; const BIG CURVE_Cof= {0x4L,0x0L,0x0L,0x0L,0x0L,0x0L,0x0L}; const int CURVE_B_I= -11556; const BIG CURVE_B= {0x3FFFFFFFFFFD19FL,0x3FFFFFFFFFFFFFFL,0x3FFFFFFFFFFFFFFL,0x3FFFFFFFFFFFFFFL,0x3FFFFFFFFFFFFFFL,0x3FFFFFFFFFFFFFFL,0xFFFFFFFFFL}; const BIG CURVE_Order= {0xB9DCC4E6A3897DL,0x11556AACD721E48L,0x1A1CB46BE1CF61EL,0x3FFFFFFFFFF891CL,0x3FFFFFFFFFFFFFFL,0x3FFFFFFFFFFFFFFL,0x3FFFFFFFFL}; const BIG CURVE_Gx= {0xD540E46C206BDEL,0xA4AC59516504D4L,0x3FA8F33163406FFL,0x11B96F930015D8FL,0x29AE55DB5B30BF4L,0x16A499B302DA884L,0x61B111FB4L}; const BIG CURVE_Gy= {0x18D03E1F0729392L,0xAC3E51BB123727L,0x18F7F645964B007L,0x1D3C5097D5A0C3EL,0x23B10DD716AD82L,0x269BBAC21CE2C69L,0x82983E67BL}; const BIG CURVE_HTPC= {0x1L,0x0L,0x0L,0x0L,0x0L,0x0L,0x0L}; #endif }