aboutsummaryrefslogtreecommitdiff
path: root/src/util/crypto_ecc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/crypto_ecc.c')
-rw-r--r--src/util/crypto_ecc.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/util/crypto_ecc.c b/src/util/crypto_ecc.c
index a93512e38..122c1857d 100644
--- a/src/util/crypto_ecc.c
+++ b/src/util/crypto_ecc.c
@@ -446,6 +446,31 @@ GNUNET_CRYPTO_ecc_key_create ()
446 446
447 447
448/** 448/**
449 * Get the shared private key we use for anonymous users.
450 *
451 * @return "anonymous" private key
452 */
453const struct GNUNET_CRYPTO_EccPrivateKey *
454GNUNET_CRYPTO_ecc_key_get_anonymous ()
455{
456 /**
457 * 'anonymous' pseudonym (global static, d=1, public key = G
458 * (generator).
459 */
460 static struct GNUNET_CRYPTO_EccPrivateKey anonymous;
461 static int once;
462
463 if (once)
464 return &anonymous;
465 mpi_print (anonymous.d,
466 sizeof (anonymous.d),
467 GCRYMPI_CONST_ONE);
468 once = 1;
469 return &anonymous;
470}
471
472
473/**
449 * Wait for a short time (we're trying to lock a file or want 474 * Wait for a short time (we're trying to lock a file or want
450 * to give another process a shot at finishing a disk write, etc.). 475 * to give another process a shot at finishing a disk write, etc.).
451 * Sleeps for 100ms (as that should be long enough for virtually all 476 * Sleeps for 100ms (as that should be long enough for virtually all