aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_crypto_lib.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/gnunet_crypto_lib.h')
-rw-r--r--src/include/gnunet_crypto_lib.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/include/gnunet_crypto_lib.h b/src/include/gnunet_crypto_lib.h
index 7439932c9..af039dbf5 100644
--- a/src/include/gnunet_crypto_lib.h
+++ b/src/include/gnunet_crypto_lib.h
@@ -1603,6 +1603,16 @@ GNUNET_CRYPTO_rsa_private_key_decode (const char *buf,
1603 1603
1604 1604
1605/** 1605/**
1606 * Duplicate the given private key
1607 *
1608 * @param key the private key to duplicate
1609 * @return the duplicate key; NULL upon error
1610 */
1611struct GNUNET_CRYPTO_rsa_PrivateKey *
1612GNUNET_CRYPTO_rsa_private_key_dup (const struct GNUNET_CRYPTO_rsa_PrivateKey *key);
1613
1614
1615/**
1606 * Extract the public key of the given private key. 1616 * Extract the public key of the given private key.
1607 * 1617 *
1608 * @param priv the private key 1618 * @param priv the private key
@@ -1701,6 +1711,17 @@ int
1701GNUNET_CRYPTO_rsa_signature_cmp (struct GNUNET_CRYPTO_rsa_Signature *s1, 1711GNUNET_CRYPTO_rsa_signature_cmp (struct GNUNET_CRYPTO_rsa_Signature *s1,
1702 struct GNUNET_CRYPTO_rsa_Signature *s2); 1712 struct GNUNET_CRYPTO_rsa_Signature *s2);
1703 1713
1714/**
1715 * Compare the values of two private keys.
1716 *
1717 * @param p1 one private key
1718 * @param p2 the other private key
1719 * @return 0 if the two are equal
1720 */
1721int
1722GNUNET_CRYPTO_rsa_private_key_cmp (struct GNUNET_CRYPTO_rsa_PrivateKey *p1,
1723 struct GNUNET_CRYPTO_rsa_PrivateKey *p2);
1724
1704 1725
1705/** 1726/**
1706 * Compare the values of two public keys. 1727 * Compare the values of two public keys.
@@ -1814,6 +1835,16 @@ GNUNET_CRYPTO_rsa_signature_decode (const char *buf,
1814 1835
1815 1836
1816/** 1837/**
1838 * Duplicate the given rsa signature
1839 *
1840 * @param sig the signature to duplicate
1841 * @return the duplicate key; NULL upon error
1842 */
1843struct GNUNET_CRYPTO_rsa_Signature *
1844GNUNET_CRYPTO_rsa_signature_dup (const struct GNUNET_CRYPTO_rsa_Signature *sig);
1845
1846
1847/**
1817 * Unblind a blind-signed signature. The signature should have been generated 1848 * Unblind a blind-signed signature. The signature should have been generated
1818 * with #GNUNET_CRYPTO_rsa_sign() using a hash that was blinded with 1849 * with #GNUNET_CRYPTO_rsa_sign() using a hash that was blinded with
1819 * #GNUNET_CRYPTO_rsa_blind(). 1850 * #GNUNET_CRYPTO_rsa_blind().