-
Notifications
You must be signed in to change notification settings - Fork 6
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
base: v2
Are you sure you want to change the base?
Conversation
|
||
const hash = getBytes(keccak256(this.#entropyPool)) | ||
const randomBytesGenerated = randomBytes(length) | ||
// ensures non-deterministic final output |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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?
Resolves: https://github.com/AmbireTech/ambire-app/issues/1306