2 This file is part of GNUnet.
3 (C) 2010 Christian Grothoff (and other contributing authors)
5 GNUnet is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published
7 by the Free Software Foundation; either version 3, or (at your
8 option) any later version.
10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with GNUnet; see the file COPYING. If not, write to the
17 Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA.
22 * @file include/block_fs.h
23 * @brief fs block formats (shared between fs and block)
24 * @author Christian Grothoff
29 #include "gnunet_util_lib.h"
32 * @brief keyword block (advertising data under a keyword)
38 * GNUNET_RSA_Signature using RSA-key generated from search keyword.
40 struct GNUNET_CRYPTO_RsaSignature signature;
43 * What is being signed and why?
45 struct GNUNET_CRYPTO_RsaSignaturePurpose purpose;
48 * Key generated (!) from the H(keyword) as the seed!
50 struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded keyspace;
52 /* 0-terminated URI here */
54 /* variable-size Meta-Data follows here */
60 * @brief namespace content block (advertising data under an identifier in a namespace)
66 * GNUNET_RSA_Signature using RSA-key of the namespace
68 struct GNUNET_CRYPTO_RsaSignature signature;
71 * What is being signed and why?
73 struct GNUNET_CRYPTO_RsaSignaturePurpose purpose;
76 * Hash of the hash of the human-readable identifier used for
77 * this entry (the hash of the human-readable identifier is
78 * used as the key for decryption; the xor of this identifier
79 * and the hash of the "keyspace" is the datastore-query hash).
81 struct GNUNET_HashCode identifier;
84 * Public key of the namespace.
86 struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded subspace;
88 /* 0-terminated update-identifier here */
90 /* 0-terminated URI here (except for NBlocks) */
92 /* variable-size Meta-Data follows here */
98 * @brief namespace advertisement block (advertising root of a namespace)
104 * GNUNET_RSA_Signature using RSA-key generated from search keyword.
106 struct GNUNET_CRYPTO_RsaSignature ksk_signature;
109 * What is being signed and why?
111 struct GNUNET_CRYPTO_RsaSignaturePurpose ksk_purpose;
114 * Key generated (!) from the H(keyword) as the seed!
116 struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded keyspace;
119 * GNUNET_RSA_Signature using RSA-key of the namespace
121 struct GNUNET_CRYPTO_RsaSignature ns_signature;
124 * What is being signed and why?
126 struct GNUNET_CRYPTO_RsaSignaturePurpose ns_purpose;
129 * Public key of the namespace.
131 struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded subspace;
133 /* from here on, data is encrypted with H(keyword) */
135 /* 0-terminated root identifier here */
137 /* variable-size Meta-Data follows here */
142 GNUNET_NETWORK_STRUCT_BEGIN
145 * @brief index block (indexing a DBlock that
146 * can be obtained directly from reading
147 * the plaintext file)
152 * Hash code of the entire content of the
153 * file that was indexed (used to uniquely
154 * identify the plaintext file).
156 struct GNUNET_HashCode file_id;
159 * At which offset should we be able to find
160 * this on-demand encoded block? (in NBO)
162 uint64_t offset GNUNET_PACKED;
165 GNUNET_NETWORK_STRUCT_END