Plug.Crypto
Namespace and module for crypto functionality.
Summary↑
mask(left, right) | Masks the token on the left with the token on the right |
masked_compare(left, right, mask) | Compares the two binaries (one being masked) in constant-time to avoid timing attacks |
secure_compare(left, right) | Compares the two binaries in constant-time to avoid timing attacks |
Functions
Masks the token on the left with the token on the right.
Both tokens are required to have the same size.
Compares the two binaries (one being masked) in constant-time to avoid timing attacks.
It is assumed the right token is masked according to the given mask.
Compares the two binaries in constant-time to avoid timing attacks.