Skip to content

Commit

Permalink
[chore] Update OTTL hash function recommendations (#34359)
Browse files Browse the repository at this point in the history
**Description:**

* FNV is a non-cryptographic hash function, which makes it inadequate to
replace cryptographic hash functions like SHA-1.
* SHA-256 is still a recommended hash function by NIST. I've added a
link to the official list of recommended hash functions as a citation.
  • Loading branch information
evan-bradley authored Jul 31, 2024
1 parent 9d55329 commit 2571dcd
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pkg/ottl/ottlfuncs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1185,7 +1185,7 @@ Examples:

- `SHA1("name")`

**Note:** According to the National Institute of Standards and Technology (NIST), SHA1 is no longer a recommended hash function. It should be avoided except when required for compatibility. New uses should prefer FNV whenever possible.
**Note:** [According to the National Institute of Standards and Technology (NIST)](https://csrc.nist.gov/projects/hash-functions), SHA1 is no longer a recommended hash function. It should be avoided except when required for compatibility. New uses should prefer a SHA-2 family function (such as SHA-256 or SHA-512) whenever possible.

### SHA256

Expand All @@ -1206,8 +1206,6 @@ Examples:

- `SHA256("name")`

**Note:** According to the National Institute of Standards and Technology (NIST), SHA256 is no longer a recommended hash function. It should be avoided except when required for compatibility. New uses should prefer FNV whenever possible.

### SpanID

`SpanID(bytes)`
Expand Down

0 comments on commit 2571dcd

Please sign in to comment.