argon2 implementation

- memory and time params customisable as well as "difficulty", default 1 iteration, 6000KB, 3 difficulty.
- updated the noscript bash method to work with argon2
- works in webworkers or main thread, capped at 8 threads (doesn't seem to crash firefox anymore -- we could go higher)
This commit is contained in:
Thomas Lynch
2022-09-24 22:54:07 +10:00
parent ea3f8bf291
commit a50b35b65d
8 changed files with 91 additions and 45 deletions

View File

@@ -88,10 +88,9 @@ STOPSIGNAL SIGUSR1
ADD haproxy/docker-entrypoint.sh /usr/local/bin/
RUN ln -s usr/local/bin/docker-entrypoint.sh / # backwards compat
# This is terrible mess but we need it for simple testing purposes of our POC
RUN apt-get update && apt-get install socat dnsutils -y
RUN apt update && apt install -y git lua5.3 liblua5.3-dev argon2 libargon2-dev luarocks
RUN git config --global url."https://".insteadOf git://
RUN luarocks install argon2
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
# no USER for backwards compatibility (to try to avoid breaking existing users)