Deleted Added
full compact
rsa.c (189261) rsa.c (209158)
1/*
2 * RSA
3 * Copyright (c) 2006, Jouni Malinen <j@w1.fi>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 *

--- 21 unchanged lines hidden (view full) ---

30 struct bignum *p; /* prime p (factor of n) */
31 struct bignum *q; /* prime q (factor of n) */
32 struct bignum *dmp1; /* d mod (p - 1); CRT exponent */
33 struct bignum *dmq1; /* d mod (q - 1); CRT exponent */
34 struct bignum *iqmp; /* 1 / q mod p; CRT coefficient */
35};
36
37
1/*
2 * RSA
3 * Copyright (c) 2006, Jouni Malinen <j@w1.fi>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 *

--- 21 unchanged lines hidden (view full) ---

30 struct bignum *p; /* prime p (factor of n) */
31 struct bignum *q; /* prime q (factor of n) */
32 struct bignum *dmp1; /* d mod (p - 1); CRT exponent */
33 struct bignum *dmq1; /* d mod (q - 1); CRT exponent */
34 struct bignum *iqmp; /* 1 / q mod p; CRT coefficient */
35};
36
37
38#ifdef EAP_TLS_FUNCS
38static const u8 * crypto_rsa_parse_integer(const u8 *pos, const u8 *end,
39 struct bignum *num)
40{
41 struct asn1_hdr hdr;
42
43 if (pos == NULL)
44 return NULL;
45

--- 172 unchanged lines hidden (view full) ---

218 }
219
220 return key;
221
222error:
223 crypto_rsa_free(key);
224 return NULL;
225}
39static const u8 * crypto_rsa_parse_integer(const u8 *pos, const u8 *end,
40 struct bignum *num)
41{
42 struct asn1_hdr hdr;
43
44 if (pos == NULL)
45 return NULL;
46

--- 172 unchanged lines hidden (view full) ---

219 }
220
221 return key;
222
223error:
224 crypto_rsa_free(key);
225 return NULL;
226}
227#endif /* EAP_TLS_FUNCS */
226
227
228/**
229 * crypto_rsa_get_modulus_len - Get the modulus length of the RSA key
230 * @key: RSA key
231 * Returns: Modulus length of the key
232 */
233size_t crypto_rsa_get_modulus_len(struct crypto_rsa_key *key)

--- 126 unchanged lines hidden ---
228
229
230/**
231 * crypto_rsa_get_modulus_len - Get the modulus length of the RSA key
232 * @key: RSA key
233 * Returns: Modulus length of the key
234 */
235size_t crypto_rsa_get_modulus_len(struct crypto_rsa_key *key)

--- 126 unchanged lines hidden ---