summaryrefslogtreecommitdiff
path: root/security/nss/lib/cryptohi/keyhi.h
diff options
context:
space:
mode:
authorcvs2hg <devnull@localhost>2007-01-17 18:58:59 +0000
committercvs2hg <devnull@localhost>2007-01-17 18:58:59 +0000
commit1a2baef5120a52411195a17d360a79e84a09797e (patch)
tree0bf7f8e2bd360c94d835ca8226aea357927e9062 /security/nss/lib/cryptohi/keyhi.h
parentefc6ec73fd3a32a186e55ad5da2cb9e383c8676e (diff)
downloadnss-hg-1a2baef5120a52411195a17d360a79e84a09797e.tar.gz
Diffstat (limited to 'security/nss/lib/cryptohi/keyhi.h')
-rw-r--r--security/nss/lib/cryptohi/keyhi.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/security/nss/lib/cryptohi/keyhi.h b/security/nss/lib/cryptohi/keyhi.h
index 8707c3d1d..350b88d0f 100644
--- a/security/nss/lib/cryptohi/keyhi.h
+++ b/security/nss/lib/cryptohi/keyhi.h
@@ -90,6 +90,11 @@ extern unsigned SECKEY_PublicKeyStrength(SECKEYPublicKey *pubk);
extern unsigned SECKEY_PublicKeyStrengthInBits(SECKEYPublicKey *pubk);
/*
+** Return the length of the signature in bytes
+*/
+extern unsigned SECKEY_SignatureLen(const SECKEYPublicKey *pubk);
+
+/*
** Make a copy of the private key "privKey"
*/
extern SECKEYPrivateKey *SECKEY_CopyPrivateKey(SECKEYPrivateKey *privKey);
@@ -283,8 +288,24 @@ SECKEY_AddPublicKeyToListTail( SECKEYPublicKeyList *list,
#define PUBKEY_LIST_NEXT(n) ((SECKEYPublicKeyListNode *)n->links.next)
#define PUBKEY_LIST_END(n,l) (((void *)n) == ((void *)&l->list))
+/*
+ * Length in bits of the EC's field size. This is also the length of
+ * the x and y coordinates of EC points, such as EC public keys and
+ * base points.
+ *
+ * Return 0 on failure (unknown EC domain parameters).
+ */
extern int SECKEY_ECParamsToKeySize(const SECItem *params);
+/*
+ * Length in bits of the EC base point order, usually denoted n. This
+ * is also the length of EC private keys and ECDSA signature components
+ * r and s.
+ *
+ * Return 0 on failure (unknown EC domain parameters).
+ */
+extern int SECKEY_ECParamsToBasePointOrderLen(const SECItem *params);
+
SEC_END_PROTOS
#endif /* _KEYHI_H_ */