aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/restricted/aws/s2n/pq-crypto/bike_r1/gf2x_internal.h
blob: 74fc5b9932939ce4133e95213f8fa98717cc20d4 (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
/* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * SPDX-License-Identifier: Apache-2.0"
 *
 * Written by Nir Drucker and Shay Gueron,
 * AWS Cryptographic Algorithms Group.
 * (ndrucker@amazon.com, gueron@amazon.com)
 */

#pragma once

#include "types.h"

EXTERNC void
karatzuba_add1(OUT uint64_t *res,
               IN const uint64_t *a,
               IN const uint64_t *b,
               IN uint64_t        n_half,
               IN uint64_t *alah);

EXTERNC void
karatzuba_add2(OUT uint64_t *res1,
               OUT uint64_t *res2,
               IN const uint64_t *res,
               IN const uint64_t *tmp,
               IN uint64_t        n_half);

EXTERNC void
red(uint64_t *res);

void

gf2x_mul_1x1(OUT uint64_t *res, IN uint64_t a, IN uint64_t b);