Path: blob/main/contrib/bearssl/src/ec/ec_secp384r1.c
39536 views
/*1* Copyright (c) 2016 Thomas Pornin <[email protected]>2*3* Permission is hereby granted, free of charge, to any person obtaining4* a copy of this software and associated documentation files (the5* "Software"), to deal in the Software without restriction, including6* without limitation the rights to use, copy, modify, merge, publish,7* distribute, sublicense, and/or sell copies of the Software, and to8* permit persons to whom the Software is furnished to do so, subject to9* the following conditions:10*11* The above copyright notice and this permission notice shall be12* included in all copies or substantial portions of the Software.13*14* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,15* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF16* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND17* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS18* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN19* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN20* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE21* SOFTWARE.22*/2324#include "inner.h"2526static const unsigned char P384_N[] = {270xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,280xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,290xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,300xC7, 0x63, 0x4D, 0x81, 0xF4, 0x37, 0x2D, 0xDF,310x58, 0x1A, 0x0D, 0xB2, 0x48, 0xB0, 0xA7, 0x7A,320xEC, 0xEC, 0x19, 0x6A, 0xCC, 0xC5, 0x29, 0x7333};3435static const unsigned char P384_G[] = {360x04, 0xAA, 0x87, 0xCA, 0x22, 0xBE, 0x8B, 0x05,370x37, 0x8E, 0xB1, 0xC7, 0x1E, 0xF3, 0x20, 0xAD,380x74, 0x6E, 0x1D, 0x3B, 0x62, 0x8B, 0xA7, 0x9B,390x98, 0x59, 0xF7, 0x41, 0xE0, 0x82, 0x54, 0x2A,400x38, 0x55, 0x02, 0xF2, 0x5D, 0xBF, 0x55, 0x29,410x6C, 0x3A, 0x54, 0x5E, 0x38, 0x72, 0x76, 0x0A,420xB7, 0x36, 0x17, 0xDE, 0x4A, 0x96, 0x26, 0x2C,430x6F, 0x5D, 0x9E, 0x98, 0xBF, 0x92, 0x92, 0xDC,440x29, 0xF8, 0xF4, 0x1D, 0xBD, 0x28, 0x9A, 0x14,450x7C, 0xE9, 0xDA, 0x31, 0x13, 0xB5, 0xF0, 0xB8,460xC0, 0x0A, 0x60, 0xB1, 0xCE, 0x1D, 0x7E, 0x81,470x9D, 0x7A, 0x43, 0x1D, 0x7C, 0x90, 0xEA, 0x0E,480x5F49};5051/* see inner.h */52const br_ec_curve_def br_secp384r1 = {53BR_EC_secp384r1,54P384_N, sizeof P384_N,55P384_G, sizeof P384_G56};575859