diff options
author | Hans Nilsson <[email protected]> | 2019-05-14 17:01:17 +0200 |
---|---|---|
committer | Hans Nilsson <[email protected]> | 2019-06-14 13:33:07 +0200 |
commit | 160cea3f655913b370650f93b0c8f6c1bd163e32 (patch) | |
tree | e03013d6f39625ac2bac84ddc2cd7b9757328fbb /lib/crypto/c_src/atoms.c | |
parent | ae4c8e6ee26e3c606054e4a845ac06f95ade1e57 (diff) | |
download | otp-160cea3f655913b370650f93b0c8f6c1bd163e32.tar.gz otp-160cea3f655913b370650f93b0c8f6c1bd163e32.tar.bz2 otp-160cea3f655913b370650f93b0c8f6c1bd163e32.zip |
crypto: MAC nif unifying HMAC, CMAC and POLY1305
into one nif using the EVP_DigestSign interface. This
enables acceleration if available in lower layers, that is,
in cryptolib and lower.
However, for older cryptolibs the old HMAC and CMAC low-level
interfaces are used, but moved from hmac.c and cmac.c into
mac.c.
Diffstat (limited to 'lib/crypto/c_src/atoms.c')
-rw-r--r-- | lib/crypto/c_src/atoms.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/crypto/c_src/atoms.c b/lib/crypto/c_src/atoms.c index 059c14690f..bbeb329fa2 100644 --- a/lib/crypto/c_src/atoms.c +++ b/lib/crypto/c_src/atoms.c @@ -30,6 +30,10 @@ ERL_NIF_TERM atom_rsa_no_padding; ERL_NIF_TERM atom_signature_md; ERL_NIF_TERM atom_undefined; +ERL_NIF_TERM atom_hmac; +ERL_NIF_TERM atom_cmac; +ERL_NIF_TERM atom_poly1305; + ERL_NIF_TERM atom_ok; ERL_NIF_TERM atom_none; ERL_NIF_TERM atom_notsup; @@ -155,6 +159,11 @@ int init_atoms(ErlNifEnv *env, const ERL_NIF_TERM fips_mode, const ERL_NIF_TERM atom_rsa_no_padding = enif_make_atom(env,"rsa_no_padding"); atom_signature_md = enif_make_atom(env,"signature_md"); atom_undefined = enif_make_atom(env,"undefined"); + + atom_hmac = enif_make_atom(env,"hmac"); + atom_cmac = enif_make_atom(env,"cmac"); + atom_poly1305 = enif_make_atom(env,"poly1305"); + atom_ok = enif_make_atom(env,"ok"); atom_none = enif_make_atom(env,"none"); atom_notsup = enif_make_atom(env,"notsup"); |