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

📄 pbc_a_param.h

📁 这是一个C的源代码
💻 H
字号:
// requires// * stdio.h// * gmp.h// * pairing.h// * fops.h#ifndef __PBC_A_PARAM_H__#define __PBC_A_PARAM_H__struct a_param_s {    int exp2;    int exp1;    int sign1;    int sign0;    mpz_t r; // r = 2^exp2 + sign1 * 2^exp1 + sign0 * 1    mpz_t q; // we work in E(F_q) (and E(F_q^2))    mpz_t h; // r * h = q + 1};typedef struct a_param_s a_param_t[1];typedef struct a_param_s *a_param_ptr;/*@manual aparamInitialize ''p''. This must be called before ''p'' can be used.*/void a_param_init(a_param_t p);/*@manual aparamClear ''p''. This should be called after ''p'' is no longer needed.*/void a_param_clear(a_param_t p);/*@manual aparamGenerate type A pairing parameters and store them in ''p'',where the group order r is ''rbits'' long, and the order of the base field qis ''qbits'' long.To be secure, generic discrete log algorithms mustbe infeasible in groups of order r, and finite field discrete log algorithmsmust be infeasible in finite fields of order q^2.Typical values: ''rbits'' = 160, ''qbits'' = 512.*/void a_param_gen(a_param_t p, int rbits, int qbits);/*@manual aparamWrite the parameters in ''p'' in a text format onto ''stream''.*/void a_param_out_str(FILE *stream, a_param_ptr p);void a_param_inp_generic (a_param_ptr p, fetch_ops_t fops, void *ctx);void pairing_init_a_param(pairing_t pairing, a_param_t p);#endif //__PBC_A_PARAM_H__

⌨️ 快捷键说明

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