OLD | NEW |
1 /* This Source Code Form is subject to the terms of the Mozilla Public | 1 /* This Source Code Form is subject to the terms of the Mozilla Public |
2 * License, v. 2.0. If a copy of the MPL was not distributed with this | 2 * License, v. 2.0. If a copy of the MPL was not distributed with this |
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
4 | 4 |
5 #ifndef _KEYHI_H_ | 5 #ifndef _KEYHI_H_ |
6 #define _KEYHI_H_ | 6 #define _KEYHI_H_ |
7 | 7 |
8 #include "plarena.h" | 8 #include "plarena.h" |
9 | 9 |
10 #include "seccomon.h" | 10 #include "seccomon.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 CERTSubjectPublicKeyInfo *dst, | 30 CERTSubjectPublicKeyInfo *dst, |
31 CERTSubjectPublicKeyInfo *src); | 31 CERTSubjectPublicKeyInfo *src); |
32 | 32 |
33 /* | 33 /* |
34 ** Update the PQG parameters for a cert's public key. | 34 ** Update the PQG parameters for a cert's public key. |
35 ** Only done for DSA certs | 35 ** Only done for DSA certs |
36 */ | 36 */ |
37 extern SECStatus | 37 extern SECStatus |
38 SECKEY_UpdateCertPQG(CERTCertificate * subjectCert); | 38 SECKEY_UpdateCertPQG(CERTCertificate * subjectCert); |
39 | 39 |
| 40 /* |
| 41 ** Return the number of bits in the provided big integer. This assumes that the |
| 42 ** SECItem contains a big-endian number and counts from the first non-zero bit. |
| 43 */ |
| 44 extern unsigned SECKEY_BigIntegerBitLength(const SECItem *number); |
40 | 45 |
41 /* | 46 /* |
42 ** Return the strength of the public key in bytes | 47 ** Return the strength of the public key in bytes |
43 */ | 48 */ |
44 extern unsigned SECKEY_PublicKeyStrength(const SECKEYPublicKey *pubk); | 49 extern unsigned SECKEY_PublicKeyStrength(const SECKEYPublicKey *pubk); |
45 | 50 |
46 /* | 51 /* |
47 ** Return the strength of the public key in bits | 52 ** Return the strength of the public key in bits |
48 */ | 53 */ |
49 extern unsigned SECKEY_PublicKeyStrengthInBits(const SECKEYPublicKey *pubk); | 54 extern unsigned SECKEY_PublicKeyStrengthInBits(const SECKEYPublicKey *pubk); |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 | 253 |
249 /* | 254 /* |
250 * Length in bits of the EC base point order, usually denoted n. This | 255 * Length in bits of the EC base point order, usually denoted n. This |
251 * is also the length of EC private keys and ECDSA signature components | 256 * is also the length of EC private keys and ECDSA signature components |
252 * r and s. | 257 * r and s. |
253 * | 258 * |
254 * Return 0 on failure (unknown EC domain parameters). | 259 * Return 0 on failure (unknown EC domain parameters). |
255 */ | 260 */ |
256 extern int SECKEY_ECParamsToBasePointOrderLen(const SECItem *params); | 261 extern int SECKEY_ECParamsToBasePointOrderLen(const SECItem *params); |
257 | 262 |
| 263 /* |
| 264 * Returns the object identifier of the curve, of the provided |
| 265 * elliptic curve parameters structures. |
| 266 * |
| 267 * Return 0 on failure (unknown EC domain parameters). |
| 268 */ |
| 269 SECOidTag SECKEY_GetECCOid(const SECKEYECParams * params); |
| 270 |
258 SEC_END_PROTOS | 271 SEC_END_PROTOS |
259 | 272 |
260 #endif /* _KEYHI_H_ */ | 273 #endif /* _KEYHI_H_ */ |
OLD | NEW |