aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorSupriti Singh <supritisingh08@gmail.com>2014-02-07 00:14:43 +0000
committerSupriti Singh <supritisingh08@gmail.com>2014-02-07 00:14:43 +0000
commitba430ff1fbce68a8940e448f0e0fe7266fa638b5 (patch)
tree88b3f2a2ded45cb4e0a06bbff8c90582a30f53e6 /src/include
parentd76a8b89e6ff8ab39f65e75ab4ff0c6f21a63a5f (diff)
downloadgnunet-ba430ff1fbce68a8940e448f0e0fe7266fa638b5.tar.gz
gnunet-ba430ff1fbce68a8940e448f0e0fe7266fa638b5.zip
Computing finger identity using libgcrypt functions.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gnunet_crypto_lib.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/include/gnunet_crypto_lib.h b/src/include/gnunet_crypto_lib.h
index 2e333bd17..3d9241b64 100644
--- a/src/include/gnunet_crypto_lib.h
+++ b/src/include/gnunet_crypto_lib.h
@@ -1268,6 +1268,19 @@ GNUNET_CRYPTO_ecdsa_private_key_derive (const struct GNUNET_CRYPTO_EcdsaPrivateK
1268 1268
1269 1269
1270/** 1270/**
1271 * Computes a new PeerIdentity using the Chord formula.
1272 * new_peer_identity = ((my_identity + pow(2,i)) mod (pow(2,m)
1273 * where m, size of struct GNUNET_PeerIdentity in bits.
1274 * i, 0 <= i <= m
1275 * @param my_identity original PeerIdentity
1276 * @param value of i.
1277 * @return finger_identity
1278 */
1279struct GNUNET_PeerIdentity *
1280GNUNET_CRYPTO_compute_finger(struct GNUNET_PeerIdentity *my_identity,unsigned int index);
1281
1282
1283/**
1271 * @ingroup crypto 1284 * @ingroup crypto
1272 * Derive a public key from a given public key and a label. 1285 * Derive a public key from a given public key and a label.
1273 * Essentially calculates a public key 'V = H(l,P) * P'. 1286 * Essentially calculates a public key 'V = H(l,P) * P'.