Skip to content

Commit 49e9936

Browse files
committed
fix: Added missing file
1 parent 8cdfcaf commit 49e9936

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

benchmark/zig_benchmark/src/cross_lang_zig_tool.zig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -262,11 +262,11 @@ fn signCommand(allocator: Allocator, message: []const u8, epoch: u32, lifetime:
262262
// Tree structure: [depth:8][lowest_layer:8]...
263263
if (sk_ssz.len < 96) return error.InvalidLength; // Need at least header + tree depth
264264
const top_tree_offset = std.mem.readInt(u32, sk_ssz[68..72], .little);
265-
265+
266266
// Validate top_tree_offset to prevent overflow and out-of-bounds access
267267
if (top_tree_offset < 88 or top_tree_offset >= sk_ssz.len) return error.InvalidOffset;
268268
if (sk_ssz.len - top_tree_offset < 8) return error.InvalidLength;
269-
269+
270270
const tree_depth = std.mem.readInt(u64, sk_ssz[top_tree_offset .. top_tree_offset + 8][0..8], .little);
271271

272272
const actual_lifetime: KeyLifetime = switch (tree_depth) {
@@ -297,7 +297,7 @@ fn signCommand(allocator: Allocator, message: []const u8, epoch: u32, lifetime:
297297
};
298298
const public_key = hash_zig.GeneralizedXMSSPublicKey.init(top_tree_root, secret_key.parameter, hash_len_fe);
299299

300-
std.debug.print("✅ Loaded pre-generated key (lifetime 2^{}, {} active epochs)\n", .{tree_depth, secret_key.num_active_epochs});
300+
std.debug.print("✅ Loaded pre-generated key (lifetime 2^{}, {} active epochs)\n", .{ tree_depth, secret_key.num_active_epochs });
301301

302302
// Initialize scheme with just the lifetime - we don't need to pass PRF key as seed!
303303
// The secret key already contains the PRF key, parameter, and all trees.

0 commit comments

Comments
 (0)