diff options
Diffstat (limited to 'src/include/gnunet_crypto_lib.h')
-rw-r--r-- | src/include/gnunet_crypto_lib.h | 82 |
1 files changed, 0 insertions, 82 deletions
diff --git a/src/include/gnunet_crypto_lib.h b/src/include/gnunet_crypto_lib.h index 2fd67ae1b..e886a561c 100644 --- a/src/include/gnunet_crypto_lib.h +++ b/src/include/gnunet_crypto_lib.h | |||
@@ -395,11 +395,6 @@ struct GNUNET_CRYPTO_PaillierCiphertext | |||
395 | unsigned char bits[GNUNET_CRYPTO_PAILLIER_BITS * 2 / 8]; | 395 | unsigned char bits[GNUNET_CRYPTO_PAILLIER_BITS * 2 / 8]; |
396 | }; | 396 | }; |
397 | 397 | ||
398 | /** | ||
399 | * @brief type for ABE master keys | ||
400 | */ | ||
401 | struct GNUNET_CRYPTO_AbeMasterKey; | ||
402 | |||
403 | 398 | ||
404 | /* **************** Functions and Macros ************* */ | 399 | /* **************** Functions and Macros ************* */ |
405 | 400 | ||
@@ -2142,83 +2137,6 @@ GNUNET_CRYPTO_rsa_verify (const struct GNUNET_HashCode *hash, | |||
2142 | const struct GNUNET_CRYPTO_RsaPublicKey *public_key); | 2137 | const struct GNUNET_CRYPTO_RsaPublicKey *public_key); |
2143 | 2138 | ||
2144 | 2139 | ||
2145 | /** | ||
2146 | * @ingroup crypto | ||
2147 | * Create a new CP-ABE master key. Caller must free return value. | ||
2148 | * | ||
2149 | * @return fresh private key; free using #GNUNET_free | ||
2150 | */ | ||
2151 | struct GNUNET_CRYPTO_AbeMasterKey * | ||
2152 | GNUNET_CRYPTO_cpabe_create_master_key (void); | ||
2153 | void | ||
2154 | GNUNET_CRYPTO_cpabe_delete_master_key (struct GNUNET_CRYPTO_AbeMasterKey *key); | ||
2155 | |||
2156 | /** | ||
2157 | * @ingroup crypto | ||
2158 | * Create a new CP-ABE key. Caller must free return value. | ||
2159 | * | ||
2160 | * @return fresh private key; free using #GNUNET_free | ||
2161 | */ | ||
2162 | struct GNUNET_CRYPTO_AbeKey * | ||
2163 | GNUNET_CRYPTO_cpabe_create_key (struct GNUNET_CRYPTO_AbeMasterKey *msk, | ||
2164 | char **attrs); | ||
2165 | void | ||
2166 | GNUNET_CRYPTO_cpabe_delete_key (struct GNUNET_CRYPTO_AbeKey *key, | ||
2167 | int delete_pub); | ||
2168 | |||
2169 | |||
2170 | /** | ||
2171 | * @ingroup crypto | ||
2172 | * Encrypt a block using sessionkey. | ||
2173 | * | ||
2174 | * @param block the block to encrypt | ||
2175 | * @param size the size of the @a block | ||
2176 | * @param sessionkey the key used to encrypt | ||
2177 | * @param iv the initialization vector to use, use INITVALUE | ||
2178 | * for streams. | ||
2179 | * @return the size of the encrypted block, -1 for errors | ||
2180 | */ | ||
2181 | ssize_t | ||
2182 | GNUNET_CRYPTO_cpabe_encrypt (const void *block, | ||
2183 | size_t size, | ||
2184 | const char *policy, | ||
2185 | const struct GNUNET_CRYPTO_AbeMasterKey *key, | ||
2186 | void **result); | ||
2187 | |||
2188 | /** | ||
2189 | * @ingroup crypto | ||
2190 | * Encrypt a block using sessionkey. | ||
2191 | * | ||
2192 | * @param block the block to encrypt | ||
2193 | * @param size the size of the @a block | ||
2194 | * @param sessionkey the key used to encrypt | ||
2195 | * @param iv the initialization vector to use, use INITVALUE | ||
2196 | * for streams. | ||
2197 | * @return the size of the encrypted block, -1 for errors | ||
2198 | */ | ||
2199 | ssize_t | ||
2200 | GNUNET_CRYPTO_cpabe_decrypt (const void *block, | ||
2201 | size_t size, | ||
2202 | const struct GNUNET_CRYPTO_AbeKey *key, | ||
2203 | void **result); | ||
2204 | |||
2205 | ssize_t | ||
2206 | GNUNET_CRYPTO_cpabe_serialize_key (const struct GNUNET_CRYPTO_AbeKey *key, | ||
2207 | void **result); | ||
2208 | |||
2209 | struct GNUNET_CRYPTO_AbeKey* | ||
2210 | GNUNET_CRYPTO_cpabe_deserialize_key (const void *data, | ||
2211 | size_t len); | ||
2212 | |||
2213 | ssize_t | ||
2214 | GNUNET_CRYPTO_cpabe_serialize_master_key (const struct GNUNET_CRYPTO_AbeMasterKey *key, | ||
2215 | void **result); | ||
2216 | |||
2217 | struct GNUNET_CRYPTO_AbeMasterKey* | ||
2218 | GNUNET_CRYPTO_cpabe_deserialize_master_key (const void *data, | ||
2219 | size_t len); | ||
2220 | |||
2221 | |||
2222 | #if 0 /* keep Emacsens' auto-indent happy */ | 2140 | #if 0 /* keep Emacsens' auto-indent happy */ |
2223 | { | 2141 | { |
2224 | #endif | 2142 | #endif |