summaryrefslogtreecommitdiff
path: root/src/math/koblitz.h
blob: f1b87d2e9bb5422434eb44580c9e01efe06f4506 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
 * ecgen, tool for generating Elliptic curve domain parameters
 * Copyright (C) 2017-2018 J08nY
 */
#ifndef ECGEN_KOBLITZ_H
#define ECGEN_KOBLITZ_H

#include <stdbool.h>
#include "misc/types.h"

typedef struct {
	unsigned int m;
	unsigned int a;
	const char *hex_order;
} koblitz_t;

/**
 * @brief
 * @param curve
 * @return
 */
bool koblitz_is_curve(const curve_t *curve);

/**
 * @brief
 * @param m
 * @param a
 * @return
 */
const koblitz_t *koblitz_find(unsigned int m, unsigned int a);

/**
 * @brief
 * @param m
 * @param a
 * @return
 */
GEN koblitz_get_order(unsigned int m, unsigned int a);

#endif  // ECGEN_KOBLITZ_H