diff options
| author | Yawning Angel <yawning@schwanenlied.me> | 2023-11-17 19:18:45 +0900 |
|---|---|---|
| committer | Yawning Angel <yawning@schwanenlied.me> | 2023-11-17 19:32:11 +0900 |
| commit | 59950bcad6829d656fa58b1e1c10330535d2fef3 (patch) | |
| tree | 1243169fa38f63f19aa4f37c7d84cfc4af15bb2a /core/crypto | |
| parent | 4587a55486a1c0367778c67fec50d895bf0dbd13 (diff) | |
core/crypto: Exile keccak, md5 and sha1 to legacy
In an perfect world these would just be removed, but the world is
imperfect, and people are forced to interact/interface with things
that are broken.
Diffstat (limited to 'core/crypto')
| -rw-r--r-- | core/crypto/README.md | 6 | ||||
| -rw-r--r-- | core/crypto/legacy/README.md | 10 | ||||
| -rw-r--r-- | core/crypto/legacy/keccak/keccak.odin (renamed from core/crypto/keccak/keccak.odin) | 2 | ||||
| -rw-r--r-- | core/crypto/legacy/md5/md5.odin (renamed from core/crypto/md5/md5.odin) | 0 | ||||
| -rw-r--r-- | core/crypto/legacy/sha1/sha1.odin (renamed from core/crypto/sha1/sha1.odin) | 0 |
5 files changed, 14 insertions, 4 deletions
diff --git a/core/crypto/README.md b/core/crypto/README.md index 69f76b719..35ed9ca70 100644 --- a/core/crypto/README.md +++ b/core/crypto/README.md @@ -10,13 +10,13 @@ Please see the chart below for the options. |:-------------------------------------------------------------------------------------------------------------|:-----------------| | [BLAKE2B](https://datatracker.ietf.org/doc/html/rfc7693) | ✔️ | | [BLAKE2S](https://datatracker.ietf.org/doc/html/rfc7693) | ✔️ | -| [Keccak](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.202.pdf) | ✔️ | -| [MD5](https://datatracker.ietf.org/doc/html/rfc1321) | ✔️ | -| [SHA-1](https://datatracker.ietf.org/doc/html/rfc3174) | ✔️ | | [SHA-2](https://csrc.nist.gov/csrc/media/publications/fips/180/2/archive/2002-08-01/documents/fips180-2.pdf) | ✔️ | | [SHA-3](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.202.pdf) | ✔️ | | [SHAKE](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.202.pdf) | ✔️ | | [SM3](https://datatracker.ietf.org/doc/html/draft-sca-cfrg-sm3-02) | ✔️ | +| legacy/[Keccak](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.202.pdf) | ✔️ | +| legacy/[MD5](https://datatracker.ietf.org/doc/html/rfc1321) | ✔️ | +| legacy/[SHA-1](https://datatracker.ietf.org/doc/html/rfc3174) | ✔️ | #### High level API Each hash algorithm contains a procedure group named `hash`, or if the algorithm provides more than one digest size `hash_<size>`\*. diff --git a/core/crypto/legacy/README.md b/core/crypto/legacy/README.md new file mode 100644 index 000000000..e1ba6f54b --- /dev/null +++ b/core/crypto/legacy/README.md @@ -0,0 +1,10 @@ +# crypto/legacy + +These are algorithms that are shipped solely for the purpose of +interoperability with legacy systems. The use of these packages in +any other capacity is discouraged, especially those that are known +to be broken. + +- keccak - The draft version of the algorithm that became SHA-3 +- MD5 - Broken (https://eprint.iacr.org/2005/075) +- SHA-1 - Broken (https://eprint.iacr.org/2017/190) diff --git a/core/crypto/keccak/keccak.odin b/core/crypto/legacy/keccak/keccak.odin index a41befd6d..09db853a6 100644 --- a/core/crypto/keccak/keccak.odin +++ b/core/crypto/legacy/keccak/keccak.odin @@ -14,7 +14,7 @@ package keccak import "core:io" import "core:os" -import "../_sha3" +import "../../_sha3" /* High level API diff --git a/core/crypto/md5/md5.odin b/core/crypto/legacy/md5/md5.odin index 69ae087e4..69ae087e4 100644 --- a/core/crypto/md5/md5.odin +++ b/core/crypto/legacy/md5/md5.odin diff --git a/core/crypto/sha1/sha1.odin b/core/crypto/legacy/sha1/sha1.odin index 6c4407067..6c4407067 100644 --- a/core/crypto/sha1/sha1.odin +++ b/core/crypto/legacy/sha1/sha1.odin |