Let us walk on the 3-isogeny graph
|
#include <assert.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <immintrin.h>
#include "../common/fips202.h"
#include "../common/fp/mulx/fp.h"
#include "../common/namespace.h"
#include "../common/primes.h"
#include "ctidh.h"
#include "ctidh_api.h"
Go to the source code of this file.
Macros | |
#define | HASH_BYTES NUMBER_OF_WORDS*8 |
#define | HASH(data, len, out) |
#define | secsidh_keygen NSAPI(keygen) |
#define | secsidh_derive NSAPI(derive) |
#define | cprintf(...) |
#define | SECSIDH_SUCCESS 0 |
#define | SECSIDH_FAILURE -1 |
Functions | |
const size_t | NSAPI (pk_size) |
const size_t | NSAPI (sk_size) |
const size_t | NSAPI (ss_size) |
void | internal_keygen (public_key *pk, private_key *sk) |
bool | internal_derive (fp *ss, public_key *const pk, private_key *const sk) |
void | skgen (int8_t *sk) |
void | pkgen (public_key *pk, int8_t *const sk) |
int | secsidh_keygen (uint8_t *pk, uint8_t *sk) |
int | secsidh_derive (uint8_t *ss, const uint8_t *peer_pk, const uint8_t *sk) |
#define cprintf | ( | ... | ) |
Definition at line 32 of file ctidh_api.c.
#define HASH | ( | data, | |
len, | |||
out ) |
Definition at line 9 of file ctidh_api.c.
#define HASH_BYTES NUMBER_OF_WORDS*8 |
Definition at line 8 of file ctidh_api.c.
Definition at line 30 of file ctidh_api.c.
#define SECSIDH_FAILURE -1 |
Definition at line 93 of file ctidh_api.c.
Referenced by secsidh_derive().
Definition at line 29 of file ctidh_api.c.
#define SECSIDH_SUCCESS 0 |
Definition at line 92 of file ctidh_api.c.
Referenced by secsidh_derive(), and secsidh_keygen().
bool internal_derive | ( | fp * | ss, |
public_key *const | pk, | ||
private_key *const | sk ) |
Definition at line 63 of file ctidh_api.c.
References public_key::A, action, fp_copy, and validate.
void internal_keygen | ( | public_key * | pk, |
private_key * | sk ) |
Definition at line 46 of file ctidh_api.c.
References public_key::A, action, base, ctidh_private, fulltorsion_points, and public_key::seed.
void pkgen | ( | public_key * | pk, |
int8_t *const | sk ) |
Definition at line 85 of file ctidh_api.c.
int secsidh_derive | ( | uint8_t * | ss, |
const uint8_t * | peer_pk, | ||
const uint8_t * | sk ) |
Definition at line 202 of file ctidh_api.c.
References internal_derive, SECSIDH_FAILURE, and SECSIDH_SUCCESS.
int secsidh_keygen | ( | uint8_t * | pk, |
uint8_t * | sk ) |
Definition at line 187 of file ctidh_api.c.
References internal_keygen, and SECSIDH_SUCCESS.
void skgen | ( | int8_t * | sk | ) |
Definition at line 80 of file ctidh_api.c.
References ctidh_private.