⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xec_tate1.h

📁 IBE是一种非对称密码技术
💻 H
字号:
/* Copyright 2003-2006, Voltage Security, all rights reserved.
 */

#include "ictk.h"
#include "surrender.h"

#ifndef XEC_TATE1_H
#define XEC_TATE1_H

#ifdef __cplusplus
extern "C" {
#endif

/* computes main step of Tate pairing using Miller's algorithm
 * assumes : P \in E/F_p , Q \in E/F_p^2 , group order is Solinas
 * prime and 11 mod 12
 */
int ec1TateSolinasMiller (
   fp2_t *r,
   pt1_t *P,
   pt1_t *Q,
   ec1_t *ec,
   VoltSurrenderCtx *surrCtx,
   unsigned int surrFlag,
   unsigned int *callNumber
   );

/* r = a ^ tatepwr
 */
int ec1TatePower (
   fp2_t *r,
   fp2_t *a,
   ec1_t *ec
   );

/* computes the full Tate pairing e(P,Q) including final exponentiation
 * assumes : P \in E/F_p , Q \in E/F_p^2 , group order is Solinas prime
 * and 11 mod 12
 */
int ec1TatePairing (
   fp2_t *r,
   pt1_t *P,
   pt1_t *Q,
   ec1_t *ec,
   VoltSurrenderCtx *surrCtx,
   unsigned int surrFlag,
   unsigned int *callNumber
   );

/* computes the MODIFIED Tate pairing e(P,Q) including final
 * exponentiation AND distortion
 * assumes : P \in E/F_p , Q \in E/F_p , group order is Solinas prime
 * and 11 mod 12
 */
int ec1TatePairingModified (
   fp2_t *r,
   pt1_t *P,
   pt1_t *Q,
   ec1_t *ec,
   VoltSurrenderCtx *surrCtx,
   unsigned int surrFlag,
   unsigned int *callNumber
   );

/* computes the product of two full Tate pairings e(P1,Q1)*e(P2,Q2)
 * including final exponentiation.
 * assumes : Px \in E/F_p , Qx \in E/F_p^2 ,
 * group order is Solinas prime and 11 mod 12
 */
int ec1MultiTatePairing (
   fp2_t *r,
   pt1_t *P1,
   pt1_t *Q1,
   pt1_t *P2,
   pt1_t *Q2,
   ec1_t *ec,
   VoltSurrenderCtx *surrCtx,
   unsigned int surrFlag,
   unsigned int *callNumber
   );

/* computes the product of two MODIFIED Tate pairings e(P1,Q1)*e(P2,Q2)
 * including final exponentiation AND distortion
 * assumes : Px \in E/F_p , Qx \in E/F_p^2 ,
 * group order is Solinas prime and 11 mod 12
 */
int ec1MultiTatePairingModified (
   fp2_t *r,
   pt1_t *P1,
   pt1_t *Q1,
   pt1_t *P2,
   pt1_t *Q2,
   ec1_t *ec,
   VoltSurrenderCtx *surrCtx,
   unsigned int surrFlag,
   unsigned int *callNumber
);

#ifdef __cplusplus
}
#endif

#endif // XEC_TATE1_H

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -