Let us walk on the 3-isogeny graph
Loading...
Searching...
No Matches
ctidh.h
Go to the documentation of this file.
1#ifndef CTIDH_H
2#define CTIDH_H
3
5
6
7#if defined AVX2
8 #include "../common/fp/avx2/fp-avx2.h"
9#elif defined GMP
11#elif defined KARATSUBA
13#else
14 #include "../common/fp/mulx/fp.h"
15#endif
16#include "../common/mont.h"
17#include "../common/primes.h"
18
19
20
21#define csidh_stattried NS(csidh_stattried)
22extern long long csidh_stattried[primes_batches];
23#define csidh_statsucceeded NS(csidh_statsucceeded)
24extern long long csidh_statsucceeded[primes_batches];
25
26// typedef struct private_key {
27// int8_t e[primes_num];
28// } private_key;
29
30
31typedef struct private_key {
32 uint8_t ells[WOMBATKEYS];
33 uint8_t directions[WOMBATKEYS];
37
38
39typedef struct public_key {
40 fp A; /* Montgomery coefficient: represents y^2 = x^3 + Ax^2 + x */
41 uint64_t seed;
43
44#define base NS(base)
45extern const public_key base;
46
47#define ctidh_private NS(ctidh_private)
48// #define csidh_private NS(csidh_private)
49
50
51#define csidh NS(csidh)
52#define validate_cutofforder_v2 NS(validate_cutofforder_v2)
53#define validate NS(validate)
54#define action NS(action)
55#define cofactor_multiples NS(cofactor_multiples)
56#define get_full_point NS(get_full_point)
57#define fulltorsion_points NS(fulltorsion_points)
58#define validate2 NS(validate2)
59
61// void csidh_private(private_key *priv);
62
63bool csidh(public_key *out, public_key const *in, private_key const *priv);
64
65// int validate_cutofforder_v2(fp *order,const fp *P,const fp *A);
66bool validate(public_key const *in);
67
68void action(public_key *out, public_key const *in, private_key const *priv);
69void cofactor_multiples(proj P[], proj const A, size_t lower, size_t upper);
70
71uint64_t get_full_point(proj* P, proj *A);
72
73void fulltorsion_points(fp u, fp const a);
74
75// int validate_cutofforder_v2(uintbig *order,const fp *P,const fp *A);
76// bool validate2(public_key const *in);
77
78#endif
#define csidh_statsucceeded
Definition ctidh.h:23
#define csidh_stattried
Definition ctidh.h:21
#define validate
Definition ctidh.h:53
#define ctidh_private
Definition ctidh.h:47
#define base
Definition ctidh.h:44
#define fulltorsion_points
Definition ctidh.h:57
#define get_full_point
Definition ctidh.h:56
#define action
Definition ctidh.h:54
#define csidh
Definition ctidh.h:51
#define cofactor_multiples
Definition ctidh.h:55
uint64_t fp[NUMBER_OF_WORDS]
Definition fp-gmp.h:22
uint8_t radical_direction
Definition ctidh.h:35
uint8_t radical_length
Definition ctidh.h:34
uint8_t ells[WOMBATKEYS]
Definition ctidh.h:32
uint8_t directions[WOMBATKEYS]
Definition ctidh.h:33
Definition proj.h:18
uint64_t seed
Definition ctidh.h:41
f a
Definition to_model.m:12