- char pt[size - sizeof (struct KBlock)];
- struct GNUNET_CRYPTO_AesSessionKey skey;
- struct GNUNET_CRYPTO_AesInitializationVector iv;
-
- GNUNET_CRYPTO_hash_to_aes_key (&uc->key, &skey, &iv);
- if (-1 ==
- GNUNET_CRYPTO_aes_decrypt (&kb[1], size - sizeof (struct KBlock), &skey,
- &iv, pt))
- {
- GNUNET_break (0);
- goto get_next;
- }
- if (NULL == memchr (pt, 0, sizeof (pt)))
+ /* result does not match our keyword, skip */
+ 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);
+ if (NULL == memchr (&pt[1], 0, sizeof (pt) - 1))