2019-04-25 18:45:27 +02:00
|
|
|
/*
|
|
|
|
* Shared Dragonfly functionality
|
|
|
|
* Copyright (c) 2012-2016, Jouni Malinen <j@w1.fi>
|
|
|
|
* Copyright (c) 2019, The Linux Foundation
|
|
|
|
*
|
|
|
|
* This software may be distributed under the terms of the BSD license.
|
|
|
|
* See README for more details.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef DRAGONFLY_H
|
|
|
|
#define DRAGONFLY_H
|
|
|
|
|
2019-04-25 21:35:14 +02:00
|
|
|
#define DRAGONFLY_MAX_ECC_PRIME_LEN 66
|
|
|
|
|
2019-04-25 19:18:27 +02:00
|
|
|
struct crypto_bignum;
|
2019-04-25 21:35:14 +02:00
|
|
|
struct crypto_ec;
|
2019-04-25 19:18:27 +02:00
|
|
|
|
2019-04-25 18:45:27 +02:00
|
|
|
int dragonfly_suitable_group(int group, int ecc_only);
|
2019-04-25 19:18:27 +02:00
|
|
|
int dragonfly_get_random_qr_qnr(const struct crypto_bignum *prime,
|
|
|
|
struct crypto_bignum **qr,
|
|
|
|
struct crypto_bignum **qnr);
|
2019-04-25 21:35:14 +02:00
|
|
|
int dragonfly_is_quadratic_residue_blind(struct crypto_ec *ec,
|
|
|
|
const u8 *qr, const u8 *qnr,
|
|
|
|
const struct crypto_bignum *val);
|
2019-04-26 16:33:44 +02:00
|
|
|
int dragonfly_generate_scalar(const struct crypto_bignum *order,
|
|
|
|
struct crypto_bignum *_rand,
|
|
|
|
struct crypto_bignum *_mask,
|
|
|
|
struct crypto_bignum *scalar);
|
2019-04-25 18:45:27 +02:00
|
|
|
|
|
|
|
#endif /* DRAGONFLY_H */
|