Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature / Keystore Extra Entropy #1295

Open
wants to merge 5 commits into
base: v2
Choose a base branch
from

Conversation

sonytooo
Copy link
Collaborator

@sonytooo sonytooo added the enhancement New feature or request label Feb 10, 2025
@sonytooo sonytooo self-assigned this Feb 10, 2025
@sonytooo sonytooo marked this pull request as draft February 10, 2025 12:44
@sonytooo sonytooo marked this pull request as ready for review February 10, 2025 14:37
@sonytooo sonytooo requested a review from Ivshti February 10, 2025 14:37

const hash = getBytes(keccak256(this.#entropyPool))
const randomBytesGenerated = randomBytes(length)
// ensures non-deterministic final output
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this comment is incorrect - not sure what you meant but it is deterministic - the same input will always generate the same output

}

#collectSystemNoiseEntropy(): void {
const systemNoise = randomBytes(16)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's not really system noise though

}

addEntropy(newEntropy: Uint8Array): void {
const combined = new Uint8Array(this.#entropyPool.length + newEntropy.length)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a better way to concat?

mainKey = {
key,
iv: randomBytes(16)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where do we take the extra entropy from?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants