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

📄 pbc_mnt.h

📁 这是一个C的源代码
💻 H
字号:
//requires// * gmp.h// * darray.h#ifndef __PBC_MNT_H__#define __PBC_MNT_H__struct cm_info_s {    mpz_t q; //curve defined over F_q    mpz_t n; //has order n (= q - t + 1) in F_q (and r^2 in F_q^k)    mpz_t h; //h * r = n, r is prime    mpz_t r;    int D; //discrminant needed to find j-invariant    int k; //embedding degree};typedef struct cm_info_s *cm_info_ptr;typedef struct cm_info_s cm_info_t[1];/*@manual cminfoInitializes ''cm''.*/void cm_info_init(cm_info_t cm);/*@manual cminfoClears ''cm''.*/void cm_info_clear(cm_info_t cm);/*@manual cminfoFor a given discriminant D, searches for MNT curves of embedding degree 6suitable for cryptography (type D pairings) where the group orderis at most ''bitlimit'' bits. For each suitable set of CM parameters found,a <type>cm_info_t</type> is created and appended to the dynamic array ''L''.Returns the number of CM parameters found.</para><para>When no longer needed, <command>cm_info_clear</command> should becalled on each appended element in ''L''. (And of course, when ''L'' isno longer needed <command>darray_clear</command> should be called on ''L''.)*/int find_mnt6_curve(darray_t L, unsigned int D, unsigned int bitlimit);/*@manual cminfoFor a given discriminant D, searches for a Freeman curve of embeddingdegree 10suitable for cryptography (type D pairings) where the group orderis at most ''bitlimit'' bits. For each suitable set of CM parameters found,a <type>cm_info_t</type> is created and appended to the dynamic array ''L''.Returns the number of CM parameters found.</para><para>When no longer needed, <command>cm_info_clear</command> should becalled on each appended element in ''L''. (And of course, when ''L'' isno longer needed <command>darray_clear</command> should be called on ''L''.)*/int find_freeman_curve(darray_t L, unsigned int D, unsigned int bitlimit);#endif //__PBC_MNT_H__

⌨️ 快捷键说明

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