uint64_t u64;
};
-/* Randomness. Used by key generation and dsa signature creation. */
-typedef void nettle_random_func(void *ctx,
+
+/* Used for generating randomness, as well as for extendable output
+ functions like shake. */
+typedef void nettle_output_func(void *ctx,
size_t length, uint8_t *dst);
+/* Old name used for key generation and (ec)dsa signature creation. */
+typedef nettle_output_func nettle_random_func;
/* Progress report function, mainly for key generation. */
typedef void nettle_progress_func(void *ctx, int c);
SHA3_128_BLOCK_SIZE,
(nettle_hash_init_func *) sha3_128_init,
(nettle_hash_update_func *) sha3_128_update,
- (nettle_random_func *) sha3_128_shake,
- (nettle_random_func *) sha3_128_shake_output,
+ (nettle_output_func *) sha3_128_shake,
+ (nettle_output_func *) sha3_128_shake_output,
};
void
SHA3_256_BLOCK_SIZE,
(nettle_hash_init_func *) sha3_256_init,
(nettle_hash_update_func *) sha3_256_update,
- (nettle_random_func *) sha3_256_shake,
- (nettle_random_func *) sha3_256_shake_output,
+ (nettle_output_func *) sha3_256_shake,
+ (nettle_output_func *) sha3_256_shake_output,
};
void
unsigned block_size;
nettle_hash_init_func *init;
nettle_hash_update_func *update;
- /* FIXME: Rename to, e.g., nettle_output_func. */
- nettle_random_func *digest;
- nettle_random_func *output;
+ nettle_output_func *digest;
+ nettle_output_func *output;
};
void