Skip to content

proposal: x/crypto/argon2: add API variants to support a buffer pool #36634

Open
@networkimprov

Description

@networkimprov

argon2.Key() & .IDKey() appear to thrash memory by allocating a (typically) large buffer and using it once.
https://github.com/golang/crypto/blob/master/argon2/argon2.go#L157

This might not scale well where every login on a high-traffic site calls this API to check a password.

Could API variants be added which take a config struct that optionally contains a buffer, so we can use a buffer pool?

@aead @mark-rushakoff @bradfitz

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Hold

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions