File indexing completed on 2025-01-18 10:02:16
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034 #ifndef NETTLE_STREEBOG_H_INCLUDED
0035 #define NETTLE_STREEBOG_H_INCLUDED
0036
0037 #include "nettle-types.h"
0038
0039 #ifdef __cplusplus
0040 extern "C" {
0041 #endif
0042
0043
0044 #define streebog256_init nettle_streebog256_init
0045 #define streebog256_digest nettle_streebog256_digest
0046 #define streebog512_init nettle_streebog512_init
0047 #define streebog512_update nettle_streebog512_update
0048 #define streebog512_digest nettle_streebog512_digest
0049
0050
0051
0052 #define STREEBOG512_DIGEST_SIZE 64
0053 #define STREEBOG512_BLOCK_SIZE 64
0054
0055
0056 #define _STREEBOG512_DIGEST_LENGTH 8
0057
0058 struct streebog512_ctx
0059 {
0060 uint64_t state[_STREEBOG512_DIGEST_LENGTH];
0061 uint64_t count[_STREEBOG512_DIGEST_LENGTH];
0062 uint64_t sigma[_STREEBOG512_DIGEST_LENGTH];
0063 unsigned int index;
0064 uint8_t block[STREEBOG512_BLOCK_SIZE];
0065 };
0066
0067 void
0068 streebog512_init(struct streebog512_ctx *ctx);
0069
0070 void
0071 streebog512_update(struct streebog512_ctx *ctx,
0072 size_t length,
0073 const uint8_t *data);
0074
0075 void
0076 streebog512_digest(struct streebog512_ctx *ctx,
0077 size_t length,
0078 uint8_t *digest);
0079
0080
0081 #define STREEBOG256_DIGEST_SIZE 32
0082 #define STREEBOG256_BLOCK_SIZE STREEBOG512_BLOCK_SIZE
0083 #define streebog256_ctx streebog512_ctx
0084
0085 void
0086 streebog256_init(struct streebog256_ctx *ctx);
0087
0088 #define streebog256_update nettle_streebog512_update
0089
0090 void
0091 streebog256_digest(struct streebog256_ctx *ctx,
0092 size_t length,
0093 uint8_t *digest);
0094
0095 #ifdef __cplusplus
0096 }
0097 #endif
0098
0099 #endif