Skip to content

Commit

Permalink
styling fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
aviadingo committed Nov 4, 2024
1 parent a52c6fd commit d40e485
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 15 deletions.
8 changes: 5 additions & 3 deletions icicle/include/hash/blake2s/blake2s.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
*/

#pragma once
typedef unsigned char BYTE;
typedef unsigned int WORD;
typedef unsigned long long LONG;

#include <stdlib.h>
#include <string.h>
Expand All @@ -23,6 +20,11 @@ typedef unsigned long long LONG;
using namespace hash;

namespace blake2s {

typedef unsigned char BYTE;
typedef unsigned int WORD;
typedef unsigned long long LONG;

#define BLAKE2S_ROUNDS 10
#define BLAKE2S_BLOCK_LENGTH 64
#define BLAKE2S_CHAIN_SIZE 8
Expand Down
7 changes: 0 additions & 7 deletions icicle/src/hash/blake2s/blake2s.cu
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,6 @@ namespace blake2s {
__device__ __forceinline__ void cuda_blake2s_init_state(cuda_blake2s_ctx_t* ctx)
{
memcpy(ctx->state, ctx->chain, BLAKE2S_CHAIN_LENGTH);
// ctx->state[8] = ctx->t0;
// ctx->state[9] = ctx->t1;
// ctx->state[10] = ctx->f0;
// ctx->state[11] = BLAKE2S_IVS[4];
ctx->state[8] = BLAKE2S_IVS[0];
ctx->state[9] = BLAKE2S_IVS[1];
ctx->state[10] = BLAKE2S_IVS[2];
Expand All @@ -102,9 +98,6 @@ namespace blake2s {
ctx->state[13] = ctx->t1 ^ BLAKE2S_IVS[5];
ctx->state[14] = ctx->f0 ^ BLAKE2S_IVS[6];
ctx->state[15] = BLAKE2S_IVS[7];
// ctx->state[12] = BLAKE2S_IVS[5];
// ctx->state[13] = BLAKE2S_IVS[6];
// ctx->state[14] = BLAKE2S_IVS[7];
}

__device__ __forceinline__ void cuda_blake2s_compress(cuda_blake2s_ctx_t* ctx, const BYTE* in, WORD inoffset)
Expand Down
5 changes: 0 additions & 5 deletions icicle/src/merkle-tree/merkle.cu
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,6 @@ namespace merkle_tree {
CHK_INIT_IF_RETURN();
cudaStream_t& stream = tree_config.ctx.stream;

// if (compression.preimage_max_length < tree_config.arity * tree_config.digest_elements)
// THROW_ICICLE_ERR(
// IcicleError_t::InvalidArgument,
// "Hash max preimage length does not match merkle tree arity multiplied by digest elements");

uint64_t number_of_bottom_layer_states = pow(tree_config.arity, height);

// This will determine how much splitting do we need to do
Expand Down

0 comments on commit d40e485

Please sign in to comment.