资源简介
基于miracl库实现椭圆曲线算法,包括双线性对的实现,塔式扩张等
代码片段和文件信息
/*
* Implementation of the NIST Advanced Ecryption Standard
*
* Could/Should be speeded up by assembly patches in time critical loops in
* aes_ecb_encrypt() and aes_ecb_decrypt()
*
* Note that the AES winner has not yet been determined! Nonetheless
* we are jumping the gun a little and implementing one of the favourites
* RIJNDAEL partly because it is entirely patent-free.
*
* We were right! Rijndael is the AES from October 2nd 2000
*
* Copyright (c) Shamus Software 1999-2001
*/
#include
#include “miracl.h“
#define MR_WORD mr_unsign32
/* this is fixed */
#define NB 4
/* rotates x one bit to the left */
#define ROTL(x) (((x)>>7)|((x)<<1))
/* Rotates 32-bit word left by 1 2 or 3 byte */
#define ROTL8(x) (((x)<<8)|((x)>>24))
#define ROTL16(x) (((x)<<16)|((x)>>16))
#define ROTL24(x) (((x)<<24)|((x)>>8))
static const MR_BYTE InCo[4]={0xB0xD0x90xE}; /* Inverse Coefficients */
static const MR_BYTE ptab[]=
{1351517518525526461141501612481953
95225567221611514916424726103034102170
229529222855892353810619021711214417123049
8324541220606820479209104184211110178205
7621210316922459772159816624182440120136
13115818520810718922012712915217920673219118154
1811968724916488024011293910518721497163
2542543125135146173236471131471742333296160
251225878210109183194932315086250216365
195942266171201641929123744116156191218117
15918621310017223942126130157188223122142137128
1551821938823235101175234371111772006719784
25231339916524479274511915317620370202
692077422212113913414516822762661988124314
185490238411231411401431381331481672421323
57752211241321511622532836108180199822461};
static const MR_BYTE ltab[]=
{0255251502261987519927104512382233
1004224145214112923976113820024810528193
1251942918124918539106772281661141542019120
101471385331522536182401306953147218142
150143219189542082061481992210241647013156
10222125348191613998179372261523413614516
12611072195163182306658107408425013361186
431211021155159942027821217222924311516787
175881688024423421411679174233213231230173232
442151171222352211245892039517615616981160
127122461112319673236216673145164118123183
20418762902519617713459821611081708541157
15117813514497190220252188149207205556391209
835713260651621097120421589386242211171
681714621735324613718012418438119153227165
10374237222197492542413991401281922471127};
static const MR_BYTE fbsub[]=
{991241191232421071111974811034325421
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 42094 2008-07-14 14:41 miracl\mraes.c
文件 1032 2005-11-28 10:10 miracl\mralloc.c
文件 6670 2007-06-08 09:10 miracl\mrarth0.c
文件 21789 2017-12-21 14:20 miracl\mrarth1.c
文件 41437 2009-03-24 17:17 miracl\mrarth2.c
文件 5025 2007-02-06 14:04 miracl\mrarth3.c
文件 4152 2007-06-13 13:19 miracl\mrbits.c
文件 4299 2006-06-23 09:39 miracl\mrbrick.c
文件 4642 2006-06-20 14:59 miracl\mrbuild.c
文件 50837 2009-03-25 11:26 miracl\mrcore.c
文件 2834 2008-07-14 15:15 miracl\mrcrt.c
文件 68993 2009-03-24 18:26 miracl\mrcurve.c
文件 3168 2006-06-20 14:59 miracl\mrdouble.c
文件 5137 2009-03-24 10:17 miracl\mrebrick.c
文件 4687 2006-06-22 14:56 miracl\mrebrick2.c
文件 53362 2008-09-11 14:26 miracl\mrec2m.c
文件 81614 2018-02-02 16:52 miracl\mrecn2.c
文件 33629 2009-03-09 20:01 miracl\mredn2.c
文件 38050 2009-03-24 17:03 miracl\mrfast.c
文件 7679 2007-02-06 13:57 miracl\mrflash.c
文件 5145 2004-09-16 11:56 miracl\mrflsh1.c
文件 4675 2006-06-20 15:00 miracl\mrflsh2.c
文件 7182 2006-02-09 14:52 miracl\mrflsh3.c
文件 2497 2004-09-16 11:56 miracl\mrflsh4.c
文件 943 2007-06-13 13:21 miracl\mrfrnd.c
文件 3711 2007-06-13 13:17 miracl\mrgcd.c
文件 77843 2008-05-12 11:27 miracl\mrgf2m.c
文件 84439 2007-08-21 13:51 miracl\mrgf2mnew.c
文件 11453 2008-08-14 14:45 miracl\mrio1.c
文件 4049 2007-06-08 10:34 miracl\mrio2.c
............此处省略85个文件信息
- 上一篇:TLC5615 STM32驱动程序
- 下一篇:UnityTerrain2MeshV3
评论
共有 条评论