NASFAQ/CRS_final/doc/latex/setup_8h_source.tex
hoguchi live 541f86904e Init sync
2022-02-13 20:50:50 +01:00

70 lines
4.6 KiB
TeX

\hypertarget{setup_8h_source}{}\doxysection{setup.\+h}
\label{setup_8h_source}\index{/home/steaky/git/CRS/src/Exchange/setup.h@{/home/steaky/git/CRS/src/Exchange/setup.h}}
\begin{DoxyCode}{0}
\DoxyCodeLine{1 \textcolor{preprocessor}{\#ifndef \_setup\_H\_}}
\DoxyCodeLine{2 \textcolor{preprocessor}{\#define \_setup\_H\_}}
\DoxyCodeLine{3 }
\DoxyCodeLine{4 \textcolor{preprocessor}{\#include <stdio.h>}}
\DoxyCodeLine{5 \textcolor{preprocessor}{\#include <stdlib.h>}}
\DoxyCodeLine{6 }
\DoxyCodeLine{7 \textcolor{preprocessor}{\#include "{}../../src/EllipticCurves/models.h"{}}}
\DoxyCodeLine{8 \textcolor{preprocessor}{\#include "{}../../src/EllipticCurves/memory.h"{}}}
\DoxyCodeLine{9 }
\DoxyCodeLine{10 \textcolor{preprocessor}{\#include <gmp.h>}}
\DoxyCodeLine{11 \textcolor{preprocessor}{\#include <flint/fmpz.h>}}
\DoxyCodeLine{12 \textcolor{preprocessor}{\#include <flint/fq.h>}}
\DoxyCodeLine{13 }
\DoxyCodeLine{14 \textcolor{preprocessor}{\#define BASE\_p "{}12037340738208845034383383978222801137092029451270197923071397735408251586669938291587857560356890516069961904754171956588530344066457839297755929645858769"{}}}
\DoxyCodeLine{15 \textcolor{preprocessor}{\#define BASE\_q "{}12037340738208845034383383978222801137092029451270197923071397735408251586669938291587857560356890516069961904754171956588530344066457839297755929645858769"{}}}
\DoxyCodeLine{16 }
\DoxyCodeLine{17 \textcolor{preprocessor}{\#define BASE\_A "{}10861338504649280383859950140772947007703646408372831934324660566888732797778932142488253565145603672591944602210571423767689240032829444439469242521864171"{}}}
\DoxyCodeLine{18 \textcolor{preprocessor}{\#define BASE\_B "{}1"{}}}
\DoxyCodeLine{19 \textcolor{preprocessor}{\#define BASE\_t "{}-\/147189550172528104900422131912266898599387555512924231762107728432541952979290"{}}}
\DoxyCodeLine{20 }
\DoxyCodeLine{21 \textcolor{preprocessor}{\#define NB\_PRIMES 24}}
\DoxyCodeLine{22 \textcolor{preprocessor}{\#define MAX\_EXTENSION\_DEGREE 9}}
\DoxyCodeLine{23 }
\DoxyCodeLine{24 \textcolor{comment}{/*********************************************}}
\DoxyCodeLine{25 \textcolor{comment}{ l-\/primes structure}}
\DoxyCodeLine{26 \textcolor{comment}{*********************************************/}}
\DoxyCodeLine{27 \textcolor{keyword}{typedef} \textcolor{keyword}{struct }\mbox{\hyperlink{structlprime__t}{lprime\_t}}\{}
\DoxyCodeLine{28 }
\DoxyCodeLine{29 fmpz\_t l;}
\DoxyCodeLine{30 }
\DoxyCodeLine{31 uint type; \textcolor{comment}{// Unused (0), Radical (1) or Velu (2)}}
\DoxyCodeLine{32 uint lbound, hbound; \textcolor{comment}{// Bounds for the walk}}
\DoxyCodeLine{33 uint r; \textcolor{comment}{// Working extension degree}}
\DoxyCodeLine{34 uint bkw; \textcolor{comment}{// 1 if backward walking possible}}
\DoxyCodeLine{35 \} \mbox{\hyperlink{structlprime__t}{lprime\_t}} ;}
\DoxyCodeLine{36 }
\DoxyCodeLine{37 \textcolor{comment}{/*********************************************}}
\DoxyCodeLine{38 \textcolor{comment}{ Global configuration structure}}
\DoxyCodeLine{39 \textcolor{comment}{*********************************************/}}
\DoxyCodeLine{40 \textcolor{keyword}{typedef} \textcolor{keyword}{struct }\mbox{\hyperlink{structcfg__t}{cfg\_t}}\{}
\DoxyCodeLine{41 }
\DoxyCodeLine{43 \mbox{\hyperlink{struct_m_g__curve__t}{MG\_curve\_t}} *E; \textcolor{comment}{//base curve}}
\DoxyCodeLine{44 }
\DoxyCodeLine{46 uint nb\_primes; \textcolor{comment}{// number of l-\/primes used}}
\DoxyCodeLine{47 \mbox{\hyperlink{structlprime__t}{lprime\_t}} *lprimes; \textcolor{comment}{// the l-\/primes ordered in an lprime\_t array}}
\DoxyCodeLine{48 }
\DoxyCodeLine{50 fq\_ctx\_t *fields;}
\DoxyCodeLine{51 }
\DoxyCodeLine{53 uint seed;}
\DoxyCodeLine{54 \} \mbox{\hyperlink{structcfg__t}{cfg\_t}};}
\DoxyCodeLine{55 }
\DoxyCodeLine{56 }
\DoxyCodeLine{57 \textcolor{keywordtype}{void} lprime\_init(\mbox{\hyperlink{structlprime__t}{lprime\_t}} *);}
\DoxyCodeLine{58 \mbox{\hyperlink{structlprime__t}{lprime\_t}} *lprime\_init\_();}
\DoxyCodeLine{59 \textcolor{keywordtype}{void} lprime\_set(\mbox{\hyperlink{structlprime__t}{lprime\_t}} *, fmpz\_t, uint, uint, uint, uint, uint);}
\DoxyCodeLine{60 \textcolor{keywordtype}{void} lprime\_clear(\mbox{\hyperlink{structlprime__t}{lprime\_t}} *);}
\DoxyCodeLine{61 }
\DoxyCodeLine{62 \mbox{\hyperlink{structcfg__t}{cfg\_t}} *cfg\_init\_set();}
\DoxyCodeLine{63 \textcolor{keywordtype}{void} cfg\_print(\mbox{\hyperlink{structcfg__t}{cfg\_t}} *);}
\DoxyCodeLine{64 \textcolor{keywordtype}{void} cfg\_clear(\mbox{\hyperlink{structcfg__t}{cfg\_t}} *);}
\DoxyCodeLine{65 }
\DoxyCodeLine{66 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{67 }
\end{DoxyCode}