diff options
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/gnunet_crypto_lib.h | 13 |
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 | */ | ||
1279 | struct GNUNET_PeerIdentity * | ||
1280 | GNUNET_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'. |