summaryrefslogtreecommitdiff
path: root/lib/nettle/gost/gost-wrap.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/nettle/gost/gost-wrap.c')
-rw-r--r--lib/nettle/gost/gost-wrap.c27
1 files changed, 11 insertions, 16 deletions
diff --git a/lib/nettle/gost/gost-wrap.c b/lib/nettle/gost/gost-wrap.c
index e4a616ed2c..d8a38f6173 100644
--- a/lib/nettle/gost/gost-wrap.c
+++ b/lib/nettle/gost/gost-wrap.c
@@ -24,7 +24,7 @@
*/
#if HAVE_CONFIG_H
-#include "config.h"
+# include "config.h"
#endif
#include <gnutls_int.h>
@@ -38,9 +38,7 @@
void
gost28147_kdf_cryptopro(const struct gost28147_param *param,
- const uint8_t *in,
- const uint8_t *ukm,
- uint8_t *out)
+ const uint8_t * in, const uint8_t * ukm, uint8_t * out)
{
struct gost28147_ctx ctx;
int i;
@@ -50,7 +48,7 @@ gost28147_kdf_cryptopro(const struct gost28147_param *param,
uint8_t mask;
uint8_t *p;
uint8_t iv[GOST28147_BLOCK_SIZE];
- uint32_t block[2] = {0, 0};
+ uint32_t block[2] = { 0, 0 };
uint32_t t;
for (p = out, mask = 1; mask; mask <<= 1) {
@@ -68,7 +66,7 @@ gost28147_kdf_cryptopro(const struct gost28147_param *param,
gost28147_set_key(&ctx, out);
gost28147_set_param(&ctx, param);
cfb_encrypt(&ctx,
- (nettle_cipher_func*)gost28147_encrypt_for_cfb,
+ (nettle_cipher_func *) gost28147_encrypt_for_cfb,
GOST28147_BLOCK_SIZE, iv,
GOST28147_KEY_SIZE, out, out);
}
@@ -76,11 +74,9 @@ gost28147_kdf_cryptopro(const struct gost28147_param *param,
void
gost28147_key_wrap_cryptopro(const struct gost28147_param *param,
- const uint8_t *kek,
- const uint8_t *ukm, size_t ukm_size,
- const uint8_t *cek,
- uint8_t *enc,
- uint8_t *imit)
+ const uint8_t * kek,
+ const uint8_t * ukm, size_t ukm_size,
+ const uint8_t * cek, uint8_t * enc, uint8_t * imit)
{
uint8_t kd[GOST28147_KEY_SIZE];
struct gost28147_ctx ctx;
@@ -102,11 +98,10 @@ gost28147_key_wrap_cryptopro(const struct gost28147_param *param,
int
gost28147_key_unwrap_cryptopro(const struct gost28147_param *param,
- const uint8_t *kek,
- const uint8_t *ukm, size_t ukm_size,
- const uint8_t *enc,
- const uint8_t *imit,
- uint8_t *cek)
+ const uint8_t * kek,
+ const uint8_t * ukm, size_t ukm_size,
+ const uint8_t * enc,
+ const uint8_t * imit, uint8_t * cek)
{
uint8_t kd[GOST28147_KEY_SIZE];
uint8_t mac[GOST28147_IMIT_DIGEST_SIZE];