Skip to content

[BUG] Replace Manual Random Data Generation with Cryptographically Secure Random Values #232

Description

@durdana3105

Problem

The current implementation generates benchmark inputs and keys using Math.random(), which is not suitable for cryptographic benchmarking and may produce inconsistent randomness.

Proposed Solution
Replace Math.random() with the Web Crypto API (crypto.getRandomValues()).
Generate secure random input data and keys.
Preserve the existing API while improving randomness quality.
Benefits
More realistic cryptographic benchmarks.
Improved randomness quality.
Better alignment with security best practices.

File:
BenchmarkEngine.ts

Please assign this issue to me under eSOC.

Metadata

Metadata

Assignees

Labels

ECSoC26Elite Coders Summer of Code 2026bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions