diff options
| author | 2026-09-22 14:15:18 +0200 | |
|---|---|---|
| committer | 2026-09-22 23:05:45 +0200 | |
| commit | 6ece77bc487c8aa697e3c092197621c4f3e5ccb8 (patch) | |
| tree | be4200ff3977685360c4664593f1bf0aa81eafcb /locales/de | |
| parent | updater: compare hashes directly with crypto/subtle (diff) | |
| download | wireguard-windows-master.tar.xz wireguard-windows-master.zip | |
The Go crypto library used to be simple and nice and an example of how
to do things well. Unfortunately, the addition of FIPS140 to it has
brought disgusting enterprise patterns and gummed up the code. One place
this really comes out is in the insane infrastructure behind the RNG. It
really only should be calling the system random functions and nothing
more. But in contemporary Go, simply calling into the RNG brings along
with it in the binary:
- A bizarre voodoo magic userspace entropy collector
- A specialized SHA384 implementation for said entropy collector
- An AES implementation
- An AES-NI accelerated AES implementation
- A CTR implementation for AES
- A GCM implementation for AES
- Some CPU detection code
- An implementation of some FIPS-specified DRBG algorithm
- An HMAC implementation
- A SHA256 implementation
- An AVX2-accelerated SHA256 implementation
- A SHA3 implementation (including cSHAKE)
- An AVX2-accelerated SHA3 implementation
- A SHA512 implementation
- Some generic XOR-bytes routines
- The actual syscall wrappers for getting random numbers
Obviously this is completely insane. There's a tangled mess of
components including eachother, a disorganized patchwork of FIPS code
and BoringCrypto code and enterprisey API hooks and self checks and
auto-included initializers. It seems like a mess of a library these
days.
So, here we beat down this madness by using a Go build overlay to
replace various parts of the crypto library with stub functions. This is
pretty nasty. But at least it compiles out some of this junk.
I'm trying to fix this upstream in the meanwhile [1], and so we'll see
what comes of that.
Link: https://github.com/golang/go/issues/81639
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'locales/de')
0 files changed, 0 insertions, 0 deletions
