This commit is contained in:
Dobromir Popov
2025-09-05 09:30:49 +03:00
parent e0c0d886f6
commit f907cbf795
8 changed files with 383 additions and 14 deletions

View File

@@ -809,7 +809,6 @@ __device__ void device_argon2d_hash(
block* memory,
const uint8_t* salt, size_t salt_len
) {
argon2_instance_t instance;
// 1. メモリサイズの調整
uint32_t memory_blocks = m_cost;
if (memory_blocks < 2 * ARGON2_SYNC_POINTS * lanes) {
@@ -819,16 +818,6 @@ __device__ void device_argon2d_hash(
uint32_t segment_length = memory_blocks / (lanes * ARGON2_SYNC_POINTS);
memory_blocks = segment_length * (lanes * ARGON2_SYNC_POINTS);
uint32_t lane_length = segment_length * ARGON2_SYNC_POINTS;
// Initialize instance with the provided memory pointer
instance.version = ARGON2_VERSION_13;
instance.memory = memory; // Use the provided memory pointer
instance.passes = t_cost;
instance.memory_blocks = memory_blocks;
instance.segment_length = segment_length;
instance.lane_length = lane_length;
instance.lanes = lanes;
instance.threads = 1;
// 2. 初期ハッシュの計算
uint8_t blockhash[ARGON2_PREHASH_DIGEST_LENGTH];