Rename constant to be in line with libsodium
This commit is contained in:
parent
41045fed85
commit
dea9ce62ed
@ -9,8 +9,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
||||
|
||||
- Go through all calls and make them return streamlined exceptions if applicable.
|
||||
Pretty large change, but OTOH, this ought to happen before a 1.0 release as well.
|
||||
- kx
|
||||
- Rename the key sizes so they follow libsodium.
|
||||
- secret
|
||||
- sign
|
||||
|
||||
@ -19,7 +17,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
||||
- Multi-part generic hash
|
||||
- pwhash
|
||||
- Extend with limit for ops and memory as well.
|
||||
- kx
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
@ -33,6 +30,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
||||
carefully as we have made changes to these functions. TL;DR: look for
|
||||
`aead_chacha20poly1305_ietf_*` but note it is *not* just a simple substitution
|
||||
into your code.
|
||||
- The `kx` constants have been renamed to follow libsodium one-to-one.
|
||||
|
||||
### Removed
|
||||
- The functions of the form `aead_chacha20poly1305_*` were removed. They implement
|
||||
|
@ -171,9 +171,9 @@
|
||||
kx_keypair/0,
|
||||
kx_client_session_keys/3,
|
||||
kx_server_session_keys/3,
|
||||
kx_public_key_size/0,
|
||||
kx_secret_key_size/0,
|
||||
kx_session_key_size/0
|
||||
kx_PUBLICKEYBYTES/0,
|
||||
kx_SECRETKEYBYTES/0,
|
||||
kx_SESSIONKEYBYTES/0
|
||||
]).
|
||||
|
||||
%% Internal verification of the system
|
||||
@ -1132,22 +1132,22 @@ kx_server_session_keys(ServerPk, ServerSk, ClientPk) ->
|
||||
{Rx, Tx} = enacl_nif:crypto_kx_server_session_keys(ServerPk, ServerSk, ClientPk),
|
||||
#{ server_rx => Rx, server_tx => Tx}.
|
||||
|
||||
%% @doc kx_session_key_size/0 returns the number of bytes of the generated during key exchange session key.
|
||||
%% @doc kx_SESSIONKEYBYTES/0 returns the number of bytes of the generated during key exchange session key.
|
||||
%% @end
|
||||
-spec kx_session_key_size() -> pos_integer().
|
||||
kx_session_key_size() ->
|
||||
-spec kx_SESSIONKEYBYTES() -> pos_integer().
|
||||
kx_SESSIONKEYBYTES() ->
|
||||
enacl_nif:crypto_kx_SESSIONKEYBYTES().
|
||||
|
||||
%% @doc kx_public_key_size/0 returns the number of bytes of the public key used in key exchange.
|
||||
%% @doc kx_PUBLICKEYBYTES/0 returns the number of bytes of the public key used in key exchange.
|
||||
%% @end
|
||||
-spec kx_public_key_size() -> pos_integer().
|
||||
kx_public_key_size() ->
|
||||
-spec kx_PUBLICKEYBYTES() -> pos_integer().
|
||||
kx_PUBLICKEYBYTES() ->
|
||||
enacl_nif:crypto_kx_PUBLICKEYBYTES().
|
||||
|
||||
%% @doc kx_secret_key_size/0 returns the number of bytes of the secret key used in key exchange.
|
||||
%% @doc kx_SECRETKEYBYTES/0 returns the number of bytes of the secret key used in key exchange.
|
||||
%% @end
|
||||
-spec kx_secret_key_size() -> pos_integer().
|
||||
kx_secret_key_size() ->
|
||||
-spec kx_SECRETKEYBYTES() -> pos_integer().
|
||||
kx_SECRETKEYBYTES() ->
|
||||
enacl_nif:crypto_kx_SECRETKEYBYTES().
|
||||
|
||||
%% AEAD ChaCha20 Poly1305
|
||||
|
@ -44,8 +44,7 @@ groups() ->
|
||||
aead_chacha20poly1305_ietf,
|
||||
pwhash,
|
||||
sign,
|
||||
kx,
|
||||
randombytes]},
|
||||
kx]},
|
||||
|
||||
[Neg, Pos].
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user