- char pt[size - sizeof (struct UBlock)];
- struct GNUNET_CRYPTO_AesSessionKey skey;
- struct GNUNET_CRYPTO_AesInitializationVector iv;
-
- GNUNET_CRYPTO_hash_to_aes_key (&uc->ukey, &skey, &iv);
- if (-1 ==
- GNUNET_CRYPTO_aes_decrypt (&ub[1], size - sizeof (struct UBlock), &skey,
- &iv, pt))
- {
- GNUNET_break (0);
- goto get_next;
- }
+ char pt[size - sizeof (struct UBlock)];
+ struct GNUNET_CRYPTO_EcdsaPublicKey anon_pub;
+ const char *keyword;
+
+ GNUNET_CRYPTO_ecdsa_key_get_public (GNUNET_CRYPTO_ecdsa_key_get_anonymous (),
+ &anon_pub);
+ keyword = &uc->ksk_uri->data.ksk.keywords[uc->ksk_offset][1];
+ GNUNET_FS_ublock_decrypt_ (&ub[1], size - sizeof (struct UBlock),
+ &anon_pub,
+ keyword,
+ pt);