aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-05-19 13:08:53 +0000
committerChristian Grothoff <christian@grothoff.org>2016-05-19 13:08:53 +0000
commitbf50f7fcd4627a8afcae5699a202a942f76b73e4 (patch)
treea953c2ed49fd5c8abd11ec9239d57e95c1599bcc /src
parentfaf7c575d400f0623c5244944852e256c33d0f6e (diff)
downloadgnunet-bf50f7fcd4627a8afcae5699a202a942f76b73e4.tar.gz
gnunet-bf50f7fcd4627a8afcae5699a202a942f76b73e4.zip
rename.sh GNUNET_CRYPTO_rsa_BlindingKey to GNUNET_CRYPTO_RsaBlindingKey following naming conventions
Diffstat (limited to 'src')
-rw-r--r--src/include/gnunet_crypto_lib.h18
-rw-r--r--src/util/crypto_rsa.c26
-rw-r--r--src/util/perf_crypto_rsa.c2
-rw-r--r--src/util/test_crypto_rsa.c2
4 files changed, 24 insertions, 24 deletions
diff --git a/src/include/gnunet_crypto_lib.h b/src/include/gnunet_crypto_lib.h
index 3c5daccdc..63978617c 100644
--- a/src/include/gnunet_crypto_lib.h
+++ b/src/include/gnunet_crypto_lib.h
@@ -1789,7 +1789,7 @@ struct GNUNET_CRYPTO_RsaPublicKey;
1789/** 1789/**
1790 * Key used to blind a message 1790 * Key used to blind a message
1791 */ 1791 */
1792struct GNUNET_CRYPTO_rsa_BlindingKey; 1792struct GNUNET_CRYPTO_RsaBlindingKey;
1793 1793
1794/** 1794/**
1795 * @brief an RSA signature 1795 * @brief an RSA signature
@@ -1934,7 +1934,7 @@ GNUNET_CRYPTO_rsa_public_key_dup (const struct GNUNET_CRYPTO_RsaPublicKey *key);
1934 * @param len length of the key in bits (i.e. 2048) 1934 * @param len length of the key in bits (i.e. 2048)
1935 * @return the newly created blinding key 1935 * @return the newly created blinding key
1936 */ 1936 */
1937struct GNUNET_CRYPTO_rsa_BlindingKey * 1937struct GNUNET_CRYPTO_RsaBlindingKey *
1938GNUNET_CRYPTO_rsa_blinding_key_create (unsigned int len); 1938GNUNET_CRYPTO_rsa_blinding_key_create (unsigned int len);
1939 1939
1940 1940
@@ -1946,8 +1946,8 @@ GNUNET_CRYPTO_rsa_blinding_key_create (unsigned int len);
1946 * @return 0 if the two are equal 1946 * @return 0 if the two are equal
1947 */ 1947 */
1948int 1948int
1949GNUNET_CRYPTO_rsa_blinding_key_cmp (struct GNUNET_CRYPTO_rsa_BlindingKey *b1, 1949GNUNET_CRYPTO_rsa_blinding_key_cmp (struct GNUNET_CRYPTO_RsaBlindingKey *b1,
1950 struct GNUNET_CRYPTO_rsa_BlindingKey *b2); 1950 struct GNUNET_CRYPTO_RsaBlindingKey *b2);
1951 1951
1952 1952
1953/** 1953/**
@@ -1991,7 +1991,7 @@ GNUNET_CRYPTO_rsa_public_key_cmp (struct GNUNET_CRYPTO_RsaPublicKey *p1,
1991 * @param bkey the blinding key to destroy 1991 * @param bkey the blinding key to destroy
1992 */ 1992 */
1993void 1993void
1994GNUNET_CRYPTO_rsa_blinding_key_free (struct GNUNET_CRYPTO_rsa_BlindingKey *bkey); 1994GNUNET_CRYPTO_rsa_blinding_key_free (struct GNUNET_CRYPTO_RsaBlindingKey *bkey);
1995 1995
1996 1996
1997/** 1997/**
@@ -2003,7 +2003,7 @@ GNUNET_CRYPTO_rsa_blinding_key_free (struct GNUNET_CRYPTO_rsa_BlindingKey *bkey)
2003 * @return size of memory allocated in @a buffer 2003 * @return size of memory allocated in @a buffer
2004 */ 2004 */
2005size_t 2005size_t
2006GNUNET_CRYPTO_rsa_blinding_key_encode (const struct GNUNET_CRYPTO_rsa_BlindingKey *bkey, 2006GNUNET_CRYPTO_rsa_blinding_key_encode (const struct GNUNET_CRYPTO_RsaBlindingKey *bkey,
2007 char **buffer); 2007 char **buffer);
2008 2008
2009 2009
@@ -2015,7 +2015,7 @@ GNUNET_CRYPTO_rsa_blinding_key_encode (const struct GNUNET_CRYPTO_rsa_BlindingKe
2015 * @param len the length of the data in @a buf 2015 * @param len the length of the data in @a buf
2016 * @return NULL on error 2016 * @return NULL on error
2017 */ 2017 */
2018struct GNUNET_CRYPTO_rsa_BlindingKey * 2018struct GNUNET_CRYPTO_RsaBlindingKey *
2019GNUNET_CRYPTO_rsa_blinding_key_decode (const char *buf, 2019GNUNET_CRYPTO_rsa_blinding_key_decode (const char *buf,
2020 size_t len); 2020 size_t len);
2021 2021
@@ -2031,7 +2031,7 @@ GNUNET_CRYPTO_rsa_blinding_key_decode (const char *buf,
2031 */ 2031 */
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_RsaBlindingKey *bkey,
2035 struct GNUNET_CRYPTO_RsaPublicKey *pkey, 2035 struct GNUNET_CRYPTO_RsaPublicKey *pkey,
2036 char **buffer); 2036 char **buffer);
2037 2037
@@ -2118,7 +2118,7 @@ GNUNET_CRYPTO_rsa_signature_dup (const struct GNUNET_CRYPTO_RsaSignature *sig);
2118 */ 2118 */
2119struct GNUNET_CRYPTO_RsaSignature * 2119struct GNUNET_CRYPTO_RsaSignature *
2120GNUNET_CRYPTO_rsa_unblind (struct GNUNET_CRYPTO_RsaSignature *sig, 2120GNUNET_CRYPTO_rsa_unblind (struct GNUNET_CRYPTO_RsaSignature *sig,
2121 struct GNUNET_CRYPTO_rsa_BlindingKey *bkey, 2121 struct GNUNET_CRYPTO_RsaBlindingKey *bkey,
2122 struct GNUNET_CRYPTO_RsaPublicKey *pkey); 2122 struct GNUNET_CRYPTO_RsaPublicKey *pkey);
2123 2123
2124 2124
diff --git a/src/util/crypto_rsa.c b/src/util/crypto_rsa.c
index b32ccea39..3686b02db 100644
--- a/src/util/crypto_rsa.c
+++ b/src/util/crypto_rsa.c
@@ -67,7 +67,7 @@ struct GNUNET_CRYPTO_RsaSignature
67/** 67/**
68 * @brief RSA blinding key 68 * @brief RSA blinding key
69 */ 69 */
70struct GNUNET_CRYPTO_rsa_BlindingKey 70struct GNUNET_CRYPTO_RsaBlindingKey
71{ 71{
72 /** 72 /**
73 * Random value used for blinding. 73 * Random value used for blinding.
@@ -398,12 +398,12 @@ GNUNET_CRYPTO_rsa_public_key_decode (const char *buf,
398 * @param len length of the key in bits (i.e. 2048) 398 * @param len length of the key in bits (i.e. 2048)
399 * @return the newly created blinding key 399 * @return the newly created blinding key
400 */ 400 */
401struct GNUNET_CRYPTO_rsa_BlindingKey * 401struct GNUNET_CRYPTO_RsaBlindingKey *
402GNUNET_CRYPTO_rsa_blinding_key_create (unsigned int len) 402GNUNET_CRYPTO_rsa_blinding_key_create (unsigned int len)
403{ 403{
404 struct GNUNET_CRYPTO_rsa_BlindingKey *blind; 404 struct GNUNET_CRYPTO_RsaBlindingKey *blind;
405 405
406 blind = GNUNET_new (struct GNUNET_CRYPTO_rsa_BlindingKey); 406 blind = GNUNET_new (struct GNUNET_CRYPTO_RsaBlindingKey);
407 blind->r = gcry_mpi_new (len); 407 blind->r = gcry_mpi_new (len);
408 gcry_mpi_randomize (blind->r, 408 gcry_mpi_randomize (blind->r,
409 len, 409 len,
@@ -420,8 +420,8 @@ GNUNET_CRYPTO_rsa_blinding_key_create (unsigned int len)
420 * @return 0 if the two are equal 420 * @return 0 if the two are equal
421 */ 421 */
422int 422int
423GNUNET_CRYPTO_rsa_blinding_key_cmp (struct GNUNET_CRYPTO_rsa_BlindingKey *b1, 423GNUNET_CRYPTO_rsa_blinding_key_cmp (struct GNUNET_CRYPTO_RsaBlindingKey *b1,
424 struct GNUNET_CRYPTO_rsa_BlindingKey *b2) 424 struct GNUNET_CRYPTO_RsaBlindingKey *b2)
425{ 425{
426 return gcry_mpi_cmp (b1->r, 426 return gcry_mpi_cmp (b1->r,
427 b2->r); 427 b2->r);
@@ -559,7 +559,7 @@ GNUNET_CRYPTO_rsa_public_key_len (const struct GNUNET_CRYPTO_RsaPublicKey *key)
559 * @param bkey the blinding key to destroy 559 * @param bkey the blinding key to destroy
560 */ 560 */
561void 561void
562GNUNET_CRYPTO_rsa_blinding_key_free (struct GNUNET_CRYPTO_rsa_BlindingKey *bkey) 562GNUNET_CRYPTO_rsa_blinding_key_free (struct GNUNET_CRYPTO_RsaBlindingKey *bkey)
563{ 563{
564 gcry_mpi_release (bkey->r); 564 gcry_mpi_release (bkey->r);
565 GNUNET_free (bkey); 565 GNUNET_free (bkey);
@@ -607,7 +607,7 @@ numeric_mpi_alloc_n_print (gcry_mpi_t v,
607 * @return size of memory allocated in @a buffer 607 * @return size of memory allocated in @a buffer
608 */ 608 */
609size_t 609size_t
610GNUNET_CRYPTO_rsa_blinding_key_encode (const struct GNUNET_CRYPTO_rsa_BlindingKey *bkey, 610GNUNET_CRYPTO_rsa_blinding_key_encode (const struct GNUNET_CRYPTO_RsaBlindingKey *bkey,
611 char **buffer) 611 char **buffer)
612{ 612{
613 return numeric_mpi_alloc_n_print (bkey->r, buffer); 613 return numeric_mpi_alloc_n_print (bkey->r, buffer);
@@ -622,14 +622,14 @@ GNUNET_CRYPTO_rsa_blinding_key_encode (const struct GNUNET_CRYPTO_rsa_BlindingKe
622 * @param len the length of the data in @a buf 622 * @param len the length of the data in @a buf
623 * @return NULL on error 623 * @return NULL on error
624 */ 624 */
625struct GNUNET_CRYPTO_rsa_BlindingKey * 625struct GNUNET_CRYPTO_RsaBlindingKey *
626GNUNET_CRYPTO_rsa_blinding_key_decode (const char *buf, 626GNUNET_CRYPTO_rsa_blinding_key_decode (const char *buf,
627 size_t len) 627 size_t len)
628{ 628{
629 struct GNUNET_CRYPTO_rsa_BlindingKey *bkey; 629 struct GNUNET_CRYPTO_RsaBlindingKey *bkey;
630 size_t rsize; 630 size_t rsize;
631 631
632 bkey = GNUNET_new (struct GNUNET_CRYPTO_rsa_BlindingKey); 632 bkey = GNUNET_new (struct GNUNET_CRYPTO_RsaBlindingKey);
633 if (0 != 633 if (0 !=
634 gcry_mpi_scan (&bkey->r, 634 gcry_mpi_scan (&bkey->r,
635 GCRYMPI_FMT_USG, 635 GCRYMPI_FMT_USG,
@@ -754,7 +754,7 @@ rsa_full_domain_hash (gcry_mpi_t *r,
754 */ 754 */
755size_t 755size_t
756GNUNET_CRYPTO_rsa_blind (const struct GNUNET_HashCode *hash, 756GNUNET_CRYPTO_rsa_blind (const struct GNUNET_HashCode *hash,
757 struct GNUNET_CRYPTO_rsa_BlindingKey *bkey, 757 struct GNUNET_CRYPTO_RsaBlindingKey *bkey,
758 struct GNUNET_CRYPTO_RsaPublicKey *pkey, 758 struct GNUNET_CRYPTO_RsaPublicKey *pkey,
759 char **buffer) 759 char **buffer)
760{ 760{
@@ -1057,7 +1057,7 @@ GNUNET_CRYPTO_rsa_public_key_dup (const struct GNUNET_CRYPTO_RsaPublicKey *key)
1057 */ 1057 */
1058struct GNUNET_CRYPTO_RsaSignature * 1058struct GNUNET_CRYPTO_RsaSignature *
1059GNUNET_CRYPTO_rsa_unblind (struct GNUNET_CRYPTO_RsaSignature *sig, 1059GNUNET_CRYPTO_rsa_unblind (struct GNUNET_CRYPTO_RsaSignature *sig,
1060 struct GNUNET_CRYPTO_rsa_BlindingKey *bkey, 1060 struct GNUNET_CRYPTO_RsaBlindingKey *bkey,
1061 struct GNUNET_CRYPTO_RsaPublicKey *pkey) 1061 struct GNUNET_CRYPTO_RsaPublicKey *pkey)
1062{ 1062{
1063 gcry_mpi_t n; 1063 gcry_mpi_t n;
diff --git a/src/util/perf_crypto_rsa.c b/src/util/perf_crypto_rsa.c
index 02a9ae6c3..2be766b4a 100644
--- a/src/util/perf_crypto_rsa.c
+++ b/src/util/perf_crypto_rsa.c
@@ -41,7 +41,7 @@ eval (unsigned int len)
41 struct GNUNET_CRYPTO_RsaSignature *rsig; 41 struct GNUNET_CRYPTO_RsaSignature *rsig;
42 struct GNUNET_CRYPTO_RsaPublicKey *public_key; 42 struct GNUNET_CRYPTO_RsaPublicKey *public_key;
43 struct GNUNET_CRYPTO_RsaPrivateKey *private_key; 43 struct GNUNET_CRYPTO_RsaPrivateKey *private_key;
44 struct GNUNET_CRYPTO_rsa_BlindingKey *bkey; 44 struct GNUNET_CRYPTO_RsaBlindingKey *bkey;
45 unsigned int i; 45 unsigned int i;
46 char sbuf[128]; 46 char sbuf[128];
47 char *bbuf; 47 char *bbuf;
diff --git a/src/util/test_crypto_rsa.c b/src/util/test_crypto_rsa.c
index 04134ea2a..6f953386f 100644
--- a/src/util/test_crypto_rsa.c
+++ b/src/util/test_crypto_rsa.c
@@ -43,7 +43,7 @@ main (int argc,
43 struct GNUNET_CRYPTO_RsaPrivateKey *priv_copy; 43 struct GNUNET_CRYPTO_RsaPrivateKey *priv_copy;
44 struct GNUNET_CRYPTO_RsaPublicKey *pub; 44 struct GNUNET_CRYPTO_RsaPublicKey *pub;
45 struct GNUNET_CRYPTO_RsaPublicKey *pub_copy; 45 struct GNUNET_CRYPTO_RsaPublicKey *pub_copy;
46 struct GNUNET_CRYPTO_rsa_BlindingKey *bkey; 46 struct GNUNET_CRYPTO_RsaBlindingKey *bkey;
47 struct GNUNET_CRYPTO_RsaSignature *sig; 47 struct GNUNET_CRYPTO_RsaSignature *sig;
48 struct GNUNET_CRYPTO_RsaSignature *sig_copy; 48 struct GNUNET_CRYPTO_RsaSignature *sig_copy;
49 struct GNUNET_CRYPTO_RsaSignature *bsig; 49 struct GNUNET_CRYPTO_RsaSignature *bsig;