Skip to content

Update insecure sha1 function to sha3 #2

@sinedied

Description

@sinedied

Privileged issue

  • I am a LangChain maintainer, or was asked directly by a LangChain maintainer to create an issue here.

Issue Content

The insecureHash function is currently based on sha1 algorithm, which may lead to security issues.

Its implementation should be replaced by a more secure and still fast version, sha3 being a good candidate. The sha3 code must be inlined as it needs to be portable (node, browser and more).

The insecureHash function and its usage should be renamed appropriately.

Since it's used in getCache function and also to generate UUIDs, a migration path should be provided to avoid breakage with existing codebases. Guidance and advices appreciated here.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions