diff --git a/icicle/include/hash/blake2s/blake2s.cuh b/icicle/include/hash/blake2s/blake2s.cuh index 07059f0cd..1a9e132ca 100644 --- a/icicle/include/hash/blake2s/blake2s.cuh +++ b/icicle/include/hash/blake2s/blake2s.cuh @@ -8,9 +8,6 @@ */ #pragma once -typedef unsigned char BYTE; -typedef unsigned int WORD; -typedef unsigned long long LONG; #include #include @@ -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 diff --git a/icicle/src/hash/blake2s/blake2s.cu b/icicle/src/hash/blake2s/blake2s.cu index 9d1b1a44b..7a976bd3a 100644 --- a/icicle/src/hash/blake2s/blake2s.cu +++ b/icicle/src/hash/blake2s/blake2s.cu @@ -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]; @@ -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) diff --git a/icicle/src/merkle-tree/merkle.cu b/icicle/src/merkle-tree/merkle.cu index 6ecd12c9e..ce96daf09 100644 --- a/icicle/src/merkle-tree/merkle.cu +++ b/icicle/src/merkle-tree/merkle.cu @@ -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