diff options
| author | J08nY | 2018-03-03 02:05:23 +0100 |
|---|---|---|
| committer | J08nY | 2018-03-03 02:05:23 +0100 |
| commit | 5a283c6e24682f706a5209a3f785980813fb0c3b (patch) | |
| tree | 981e44eeb0003e0aaeb2cb40b433ede41c10dcd8 /src/math/koblitz.c | |
| parent | 7cdbef7b9fb6af64b82193e765fb536078230540 (diff) | |
| download | ecgen-5a283c6e24682f706a5209a3f785980813fb0c3b.tar.gz ecgen-5a283c6e24682f706a5209a3f785980813fb0c3b.tar.zst ecgen-5a283c6e24682f706a5209a3f785980813fb0c3b.zip | |
Diffstat (limited to 'src/math/koblitz.c')
| -rw-r--r-- | src/math/koblitz.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/math/koblitz.c b/src/math/koblitz.c index 10467e3..b553cf6 100644 --- a/src/math/koblitz.c +++ b/src/math/koblitz.c @@ -56,14 +56,14 @@ static int compare_koblitz(const void *a, const void *b) { } } -const koblitz_t *koblitz_find(unsigned int m, unsigned int a) { - koblitz_t searched = {m, a, NULL}; +const koblitz_t *koblitz_find(unsigned long m, unsigned long a) { + koblitz_t searched = {(unsigned int) m, (unsigned int) a, NULL}; return (koblitz_t *)bsearch(&searched, koblitz_curves, sizeof(koblitz_curves) / sizeof(koblitz_t), sizeof(koblitz_t), &compare_koblitz); } -GEN koblitz_get_order(unsigned int m, unsigned int a) { +GEN koblitz_get_order(unsigned long m, unsigned long a) { const koblitz_t *found = koblitz_find(m, a); if (found) { return strtoi(found->hex_order); |
