aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_crypto_lib.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-03-21 13:41:12 +0000
committerChristian Grothoff <christian@grothoff.org>2016-03-21 13:41:12 +0000
commit1733de7305720882b8745e82b51b6ff47c10099e (patch)
treedf9199b0e8670b089ead17186b191b80629bda8f /src/include/gnunet_crypto_lib.h
parent60de5f48cbfc3868570284e91415ca7e06c390e1 (diff)
downloadgnunet-1733de7305720882b8745e82b51b6ff47c10099e.tar.gz
gnunet-1733de7305720882b8745e82b51b6ff47c10099e.zip
fixing symbol naming and coding convention issues
Diffstat (limited to 'src/include/gnunet_crypto_lib.h')
-rw-r--r--src/include/gnunet_crypto_lib.h74
1 files changed, 37 insertions, 37 deletions
diff --git a/src/include/gnunet_crypto_lib.h b/src/include/gnunet_crypto_lib.h
index 93ee09cab..d104318e3 100644
--- a/src/include/gnunet_crypto_lib.h
+++ b/src/include/gnunet_crypto_lib.h
@@ -1779,12 +1779,12 @@ GNUNET_CRYPTO_paillier_hom_get_remaining (const struct GNUNET_CRYPTO_PaillierCip
1779/** 1779/**
1780 * The private information of an RSA key pair. 1780 * The private information of an RSA key pair.
1781 */ 1781 */
1782struct GNUNET_CRYPTO_rsa_PrivateKey; 1782struct GNUNET_CRYPTO_RsaPrivateKey;
1783 1783
1784/** 1784/**
1785 * The public information of an RSA key pair. 1785 * The public information of an RSA key pair.
1786 */ 1786 */
1787struct GNUNET_CRYPTO_rsa_PublicKey; 1787struct GNUNET_CRYPTO_RsaPublicKey;
1788 1788
1789/** 1789/**
1790 * Key used to blind a message 1790 * Key used to blind a message
@@ -1794,7 +1794,7 @@ struct GNUNET_CRYPTO_rsa_BlindingKey;
1794/** 1794/**
1795 * @brief an RSA signature 1795 * @brief an RSA signature
1796 */ 1796 */
1797struct GNUNET_CRYPTO_rsa_Signature; 1797struct GNUNET_CRYPTO_RsaSignature;
1798 1798
1799 1799
1800/** 1800/**
@@ -1803,7 +1803,7 @@ struct GNUNET_CRYPTO_rsa_Signature;
1803 * @param len length of the key in bits (i.e. 2048) 1803 * @param len length of the key in bits (i.e. 2048)
1804 * @return fresh private key 1804 * @return fresh private key
1805 */ 1805 */
1806struct GNUNET_CRYPTO_rsa_PrivateKey * 1806struct GNUNET_CRYPTO_RsaPrivateKey *
1807GNUNET_CRYPTO_rsa_private_key_create (unsigned int len); 1807GNUNET_CRYPTO_rsa_private_key_create (unsigned int len);
1808 1808
1809 1809
@@ -1813,7 +1813,7 @@ GNUNET_CRYPTO_rsa_private_key_create (unsigned int len);
1813 * @param key pointer to the memory to free 1813 * @param key pointer to the memory to free
1814 */ 1814 */
1815void 1815void
1816GNUNET_CRYPTO_rsa_private_key_free (struct GNUNET_CRYPTO_rsa_PrivateKey *key); 1816GNUNET_CRYPTO_rsa_private_key_free (struct GNUNET_CRYPTO_RsaPrivateKey *key);
1817 1817
1818 1818
1819/** 1819/**
@@ -1825,7 +1825,7 @@ GNUNET_CRYPTO_rsa_private_key_free (struct GNUNET_CRYPTO_rsa_PrivateKey *key);
1825 * @return size of memory allocatedin @a buffer 1825 * @return size of memory allocatedin @a buffer
1826 */ 1826 */
1827size_t 1827size_t
1828GNUNET_CRYPTO_rsa_private_key_encode (const struct GNUNET_CRYPTO_rsa_PrivateKey *key, 1828GNUNET_CRYPTO_rsa_private_key_encode (const struct GNUNET_CRYPTO_RsaPrivateKey *key,
1829 char **buffer); 1829 char **buffer);
1830 1830
1831 1831
@@ -1837,7 +1837,7 @@ GNUNET_CRYPTO_rsa_private_key_encode (const struct GNUNET_CRYPTO_rsa_PrivateKey
1837 * @param len the length of the data in @a buf 1837 * @param len the length of the data in @a buf
1838 * @return NULL on error 1838 * @return NULL on error
1839 */ 1839 */
1840struct GNUNET_CRYPTO_rsa_PrivateKey * 1840struct GNUNET_CRYPTO_RsaPrivateKey *
1841GNUNET_CRYPTO_rsa_private_key_decode (const char *buf, 1841GNUNET_CRYPTO_rsa_private_key_decode (const char *buf,
1842 size_t len); 1842 size_t len);
1843 1843
@@ -1848,8 +1848,8 @@ GNUNET_CRYPTO_rsa_private_key_decode (const char *buf,
1848 * @param key the private key to duplicate 1848 * @param key the private key to duplicate
1849 * @return the duplicate key; NULL upon error 1849 * @return the duplicate key; NULL upon error
1850 */ 1850 */
1851struct GNUNET_CRYPTO_rsa_PrivateKey * 1851struct GNUNET_CRYPTO_RsaPrivateKey *
1852GNUNET_CRYPTO_rsa_private_key_dup (const struct GNUNET_CRYPTO_rsa_PrivateKey *key); 1852GNUNET_CRYPTO_rsa_private_key_dup (const struct GNUNET_CRYPTO_RsaPrivateKey *key);
1853 1853
1854 1854
1855/** 1855/**
@@ -1858,8 +1858,8 @@ GNUNET_CRYPTO_rsa_private_key_dup (const struct GNUNET_CRYPTO_rsa_PrivateKey *ke
1858 * @param priv the private key 1858 * @param priv the private key
1859 * @retur NULL on error, otherwise the public key 1859 * @retur NULL on error, otherwise the public key
1860 */ 1860 */
1861struct GNUNET_CRYPTO_rsa_PublicKey * 1861struct GNUNET_CRYPTO_RsaPublicKey *
1862GNUNET_CRYPTO_rsa_private_key_get_public (const struct GNUNET_CRYPTO_rsa_PrivateKey *priv); 1862GNUNET_CRYPTO_rsa_private_key_get_public (const struct GNUNET_CRYPTO_RsaPrivateKey *priv);
1863 1863
1864 1864
1865/** 1865/**
@@ -1869,7 +1869,7 @@ GNUNET_CRYPTO_rsa_private_key_get_public (const struct GNUNET_CRYPTO_rsa_Private
1869 * @param hc where to store the hash code 1869 * @param hc where to store the hash code
1870 */ 1870 */
1871void 1871void
1872GNUNET_CRYPTO_rsa_public_key_hash (const struct GNUNET_CRYPTO_rsa_PublicKey *key, 1872GNUNET_CRYPTO_rsa_public_key_hash (const struct GNUNET_CRYPTO_RsaPublicKey *key,
1873 struct GNUNET_HashCode *hc); 1873 struct GNUNET_HashCode *hc);
1874 1874
1875 1875
@@ -1880,7 +1880,7 @@ GNUNET_CRYPTO_rsa_public_key_hash (const struct GNUNET_CRYPTO_rsa_PublicKey *key
1880 * @return length of the key in bits 1880 * @return length of the key in bits
1881 */ 1881 */
1882unsigned int 1882unsigned int
1883GNUNET_CRYPTO_rsa_public_key_len (const struct GNUNET_CRYPTO_rsa_PublicKey *key); 1883GNUNET_CRYPTO_rsa_public_key_len (const struct GNUNET_CRYPTO_RsaPublicKey *key);
1884 1884
1885 1885
1886/** 1886/**
@@ -1889,7 +1889,7 @@ GNUNET_CRYPTO_rsa_public_key_len (const struct GNUNET_CRYPTO_rsa_PublicKey *key)
1889 * @param key pointer to the memory to free 1889 * @param key pointer to the memory to free
1890 */ 1890 */
1891void 1891void
1892GNUNET_CRYPTO_rsa_public_key_free (struct GNUNET_CRYPTO_rsa_PublicKey *key); 1892GNUNET_CRYPTO_rsa_public_key_free (struct GNUNET_CRYPTO_RsaPublicKey *key);
1893 1893
1894 1894
1895/** 1895/**
@@ -1901,7 +1901,7 @@ GNUNET_CRYPTO_rsa_public_key_free (struct GNUNET_CRYPTO_rsa_PublicKey *key);
1901 * @return size of memory allocated in @a buffer 1901 * @return size of memory allocated in @a buffer
1902 */ 1902 */
1903size_t 1903size_t
1904GNUNET_CRYPTO_rsa_public_key_encode (const struct GNUNET_CRYPTO_rsa_PublicKey *key, 1904GNUNET_CRYPTO_rsa_public_key_encode (const struct GNUNET_CRYPTO_RsaPublicKey *key,
1905 char **buffer); 1905 char **buffer);
1906 1906
1907 1907
@@ -1913,7 +1913,7 @@ GNUNET_CRYPTO_rsa_public_key_encode (const struct GNUNET_CRYPTO_rsa_PublicKey *k
1913 * @param len the length of the data in @a buf 1913 * @param len the length of the data in @a buf
1914 * @return NULL on error 1914 * @return NULL on error
1915 */ 1915 */
1916struct GNUNET_CRYPTO_rsa_PublicKey * 1916struct GNUNET_CRYPTO_RsaPublicKey *
1917GNUNET_CRYPTO_rsa_public_key_decode (const char *buf, 1917GNUNET_CRYPTO_rsa_public_key_decode (const char *buf,
1918 size_t len); 1918 size_t len);
1919 1919
@@ -1924,8 +1924,8 @@ GNUNET_CRYPTO_rsa_public_key_decode (const char *buf,
1924 * @param key the public key to duplicate 1924 * @param key the public key to duplicate
1925 * @return the duplicate key; NULL upon error 1925 * @return the duplicate key; NULL upon error
1926 */ 1926 */
1927struct GNUNET_CRYPTO_rsa_PublicKey * 1927struct GNUNET_CRYPTO_RsaPublicKey *
1928GNUNET_CRYPTO_rsa_public_key_dup (const struct GNUNET_CRYPTO_rsa_PublicKey *key); 1928GNUNET_CRYPTO_rsa_public_key_dup (const struct GNUNET_CRYPTO_RsaPublicKey *key);
1929 1929
1930 1930
1931/** 1931/**
@@ -1958,8 +1958,8 @@ GNUNET_CRYPTO_rsa_blinding_key_cmp (struct GNUNET_CRYPTO_rsa_BlindingKey *b1,
1958 * @return 0 if the two are equal 1958 * @return 0 if the two are equal
1959 */ 1959 */
1960int 1960int
1961GNUNET_CRYPTO_rsa_signature_cmp (struct GNUNET_CRYPTO_rsa_Signature *s1, 1961GNUNET_CRYPTO_rsa_signature_cmp (struct GNUNET_CRYPTO_RsaSignature *s1,
1962 struct GNUNET_CRYPTO_rsa_Signature *s2); 1962 struct GNUNET_CRYPTO_RsaSignature *s2);
1963 1963
1964/** 1964/**
1965 * Compare the values of two private keys. 1965 * Compare the values of two private keys.
@@ -1969,8 +1969,8 @@ GNUNET_CRYPTO_rsa_signature_cmp (struct GNUNET_CRYPTO_rsa_Signature *s1,
1969 * @return 0 if the two are equal 1969 * @return 0 if the two are equal
1970 */ 1970 */
1971int 1971int
1972GNUNET_CRYPTO_rsa_private_key_cmp (struct GNUNET_CRYPTO_rsa_PrivateKey *p1, 1972GNUNET_CRYPTO_rsa_private_key_cmp (struct GNUNET_CRYPTO_RsaPrivateKey *p1,
1973 struct GNUNET_CRYPTO_rsa_PrivateKey *p2); 1973 struct GNUNET_CRYPTO_RsaPrivateKey *p2);
1974 1974
1975 1975
1976/** 1976/**
@@ -1981,8 +1981,8 @@ GNUNET_CRYPTO_rsa_private_key_cmp (struct GNUNET_CRYPTO_rsa_PrivateKey *p1,
1981 * @return 0 if the two are equal 1981 * @return 0 if the two are equal
1982 */ 1982 */
1983int 1983int
1984GNUNET_CRYPTO_rsa_public_key_cmp (struct GNUNET_CRYPTO_rsa_PublicKey *p1, 1984GNUNET_CRYPTO_rsa_public_key_cmp (struct GNUNET_CRYPTO_RsaPublicKey *p1,
1985 struct GNUNET_CRYPTO_rsa_PublicKey *p2); 1985 struct GNUNET_CRYPTO_RsaPublicKey *p2);
1986 1986
1987 1987
1988/** 1988/**
@@ -2032,7 +2032,7 @@ GNUNET_CRYPTO_rsa_blinding_key_decode (const char *buf,
2032size_t 2032size_t
2033GNUNET_CRYPTO_rsa_blind (const struct GNUNET_HashCode *hash, 2033GNUNET_CRYPTO_rsa_blind (const struct GNUNET_HashCode *hash,
2034 struct GNUNET_CRYPTO_rsa_BlindingKey *bkey, 2034 struct GNUNET_CRYPTO_rsa_BlindingKey *bkey,
2035 struct GNUNET_CRYPTO_rsa_PublicKey *pkey, 2035 struct GNUNET_CRYPTO_RsaPublicKey *pkey,
2036 char **buffer); 2036 char **buffer);
2037 2037
2038 2038
@@ -2044,8 +2044,8 @@ GNUNET_CRYPTO_rsa_blind (const struct GNUNET_HashCode *hash,
2044 * @param msg_len number of bytes in @a msg to sign 2044 * @param msg_len number of bytes in @a msg to sign
2045 * @return NULL on error, signature on success 2045 * @return NULL on error, signature on success
2046 */ 2046 */
2047struct GNUNET_CRYPTO_rsa_Signature * 2047struct GNUNET_CRYPTO_RsaSignature *
2048GNUNET_CRYPTO_rsa_sign (const struct GNUNET_CRYPTO_rsa_PrivateKey *key, 2048GNUNET_CRYPTO_rsa_sign (const struct GNUNET_CRYPTO_RsaPrivateKey *key,
2049 const void *msg, 2049 const void *msg,
2050 size_t msg_len); 2050 size_t msg_len);
2051 2051
@@ -2056,7 +2056,7 @@ GNUNET_CRYPTO_rsa_sign (const struct GNUNET_CRYPTO_rsa_PrivateKey *key,
2056 * @param sig memory to free 2056 * @param sig memory to free
2057 */ 2057 */
2058void 2058void
2059GNUNET_CRYPTO_rsa_signature_free (struct GNUNET_CRYPTO_rsa_Signature *sig); 2059GNUNET_CRYPTO_rsa_signature_free (struct GNUNET_CRYPTO_RsaSignature *sig);
2060 2060
2061 2061
2062/** 2062/**
@@ -2067,7 +2067,7 @@ GNUNET_CRYPTO_rsa_signature_free (struct GNUNET_CRYPTO_rsa_Signature *sig);
2067 * @return size of memory allocated in @a buffer 2067 * @return size of memory allocated in @a buffer
2068 */ 2068 */
2069size_t 2069size_t
2070GNUNET_CRYPTO_rsa_signature_encode (const struct GNUNET_CRYPTO_rsa_Signature *sig, 2070GNUNET_CRYPTO_rsa_signature_encode (const struct GNUNET_CRYPTO_RsaSignature *sig,
2071 char **buffer); 2071 char **buffer);
2072 2072
2073 2073
@@ -2079,7 +2079,7 @@ GNUNET_CRYPTO_rsa_signature_encode (const struct GNUNET_CRYPTO_rsa_Signature *si
2079 * @param len the length of the data in @a buf 2079 * @param len the length of the data in @a buf
2080 * @return NULL on error 2080 * @return NULL on error
2081 */ 2081 */
2082struct GNUNET_CRYPTO_rsa_Signature * 2082struct GNUNET_CRYPTO_RsaSignature *
2083GNUNET_CRYPTO_rsa_signature_decode (const char *buf, 2083GNUNET_CRYPTO_rsa_signature_decode (const char *buf,
2084 size_t len); 2084 size_t len);
2085 2085
@@ -2090,8 +2090,8 @@ GNUNET_CRYPTO_rsa_signature_decode (const char *buf,
2090 * @param sig the signature to duplicate 2090 * @param sig the signature to duplicate
2091 * @return the duplicate key; NULL upon error 2091 * @return the duplicate key; NULL upon error
2092 */ 2092 */
2093struct GNUNET_CRYPTO_rsa_Signature * 2093struct GNUNET_CRYPTO_RsaSignature *
2094GNUNET_CRYPTO_rsa_signature_dup (const struct GNUNET_CRYPTO_rsa_Signature *sig); 2094GNUNET_CRYPTO_rsa_signature_dup (const struct GNUNET_CRYPTO_RsaSignature *sig);
2095 2095
2096 2096
2097/** 2097/**
@@ -2104,10 +2104,10 @@ GNUNET_CRYPTO_rsa_signature_dup (const struct GNUNET_CRYPTO_rsa_Signature *sig);
2104 * @param pkey the public key of the signer 2104 * @param pkey the public key of the signer
2105 * @return unblinded signature on success, NULL on error 2105 * @return unblinded signature on success, NULL on error
2106 */ 2106 */
2107struct GNUNET_CRYPTO_rsa_Signature * 2107struct GNUNET_CRYPTO_RsaSignature *
2108GNUNET_CRYPTO_rsa_unblind (struct GNUNET_CRYPTO_rsa_Signature *sig, 2108GNUNET_CRYPTO_rsa_unblind (struct GNUNET_CRYPTO_RsaSignature *sig,
2109 struct GNUNET_CRYPTO_rsa_BlindingKey *bkey, 2109 struct GNUNET_CRYPTO_rsa_BlindingKey *bkey,
2110 struct GNUNET_CRYPTO_rsa_PublicKey *pkey); 2110 struct GNUNET_CRYPTO_RsaPublicKey *pkey);
2111 2111
2112 2112
2113/** 2113/**
@@ -2121,8 +2121,8 @@ GNUNET_CRYPTO_rsa_unblind (struct GNUNET_CRYPTO_rsa_Signature *sig,
2121 */ 2121 */
2122int 2122int
2123GNUNET_CRYPTO_rsa_verify (const struct GNUNET_HashCode *hash, 2123GNUNET_CRYPTO_rsa_verify (const struct GNUNET_HashCode *hash,
2124 const struct GNUNET_CRYPTO_rsa_Signature *sig, 2124 const struct GNUNET_CRYPTO_RsaSignature *sig,
2125 const struct GNUNET_CRYPTO_rsa_PublicKey *public_key); 2125 const struct GNUNET_CRYPTO_RsaPublicKey *public_key);
2126 2126
2127 2127
2128#if 0 /* keep Emacsens' auto-indent happy */ 2128#if 0 /* keep Emacsens' auto-indent happy */