Add support for Ed25519 to NativeCrypto#1286
Closed
juergw wants to merge 12 commits intogoogle:masterfrom
Closed
Conversation
If the user wants to encrypt and calls doFinal(input, 123, 0); without a prior call to update, it currently fails with an array out of bounds exception. Instead, it should encrypt the empty string.
Some tests are now not run, because they use the same IV as the previous test case. And that results in an InvalidAlgorithmParameterException that gets ignored. To not re-use IVs twice, we now run init with a different IV first. And we don't ignore InvalidAlgorithmParameterException caused by IV reuse.
BoringSSL doesn't support Ed25519 with EVP_DigestUpdate, only with EVP_DigestSign and EVP_DigestVerify. So we have to add these to NativeCrypto.
Ed25519 doesn't use a hash function, so it doesn't need to be set.
Collaborator
Author
|
I'll close this and make a new pull request. I don't want to change the lines I didn't touch. |
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.
BoringSSL doesn't support Ed25519 with EVP_DigestUpdate, only
with EVP_DigestSign and EVP_DigestVerify. So we need to add wrappers
of these functions to NativeCrypto.