Open
Conversation
sodium_init() will return 0 on success, -1 on failure, and 1 if sodium is already loaded and initialized (which is not an error). In the case where libsodium is already initialized and the system is restarted we may return 1 from onload nif function resulting in a crash. - change the call to sodium_init() to check for an error return (-1) and return -1 explicitly in this case, otherwise always return zero at the end of our onload function.
Fix NIF-load issue on init:restart
Merge upstream
9ef1baf to
af9a34d
Compare
af9a34d to
90226ab
Compare
on Darwin allow platform to decide arch
90226ab to
fb288f2
Compare
They are just a simplification of the secretbox API, thus it does not provide any new functionality. But it helps mapping function names to libsodium documentation.
Add access to secretbox_easy/easy_open functions
* .envrc is not for git * Fix c code - avoid warnings * Bump Erlang versions in Github workflows
This adds a low-level APIs to perform computations over the edwards25519 curve, only useful to implement custom constructions. Exposed functions: crypto_ed25519_scalarmult/2, crypto_ed25519_scalarmult_base/1, crypto_ed25519_scalarmult_noclamp/2, crypto_ed25519_scalarmult_base_noclamp/1, crypto_ed25519_add/2, crypto_ed25519_sub/2, crypto_ed25519_is_valid_point/1, crypto_ed25519_scalar_reduce/1, crypto_ed25519_scalar_negate/1, crypto_ed25519_scalar_add/2, crypto_ed25519_scalar_sub/2, crypto_ed25519_scalar_mul/2
5bae41c to
c47b1b2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds a low-level APIs to perform computations over the edwards25519
curve, only useful to implement custom constructions.
Exposed functions:
crypto_ed25519_scalarmult/2,
crypto_ed25519_scalarmult_base/1,
crypto_ed25519_scalarmult_noclamp/2,
crypto_ed25519_scalarmult_base_noclamp/1,
crypto_ed25519_add/2,
crypto_ed25519_sub/2,
crypto_ed25519_is_valid_point/1,
crypto_ed25519_scalar_reduce/1,
crypto_ed25519_scalar_negate/1,
crypto_ed25519_scalar_add/2,
crypto_ed25519_scalar_sub/2,
crypto_ed25519_scalar_mul/2