+/**
+ * Obtain the ego representing 'anonymous' users.
+ *
+ * @return handle for the anonymous user, must not be freed
+ */
+const struct GNUNET_IDENTITY_Ego *
+GNUNET_IDENTITY_ego_get_anonymous ()
+{
+ static struct GNUNET_IDENTITY_Ego anon;
+ struct GNUNET_CRYPTO_EcdsaPublicKey pub;
+
+ if (NULL != anon.pk)
+ return &anon;
+ anon.pk = (struct GNUNET_CRYPTO_EcdsaPrivateKey *) GNUNET_CRYPTO_ecdsa_key_get_anonymous ();
+ GNUNET_CRYPTO_ecdsa_key_get_public (anon.pk,
+ &pub);
+ GNUNET_CRYPTO_hash (&pub, sizeof (pub), &anon.id);
+ return &anon;
+}
+