-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Curve25519 fixes #83
Curve25519 fixes #83
Conversation
Just noticed wolfCrypt tests are failing - didn't try that locally. I should turn that on by default. I'll investigate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for cleaning this up! I had a couple of questions about asn.h.
src/wh_crypto.c
Outdated
@@ -36,6 +36,7 @@ | |||
#include "wolfssl/wolfcrypt/types.h" | |||
#include "wolfssl/wolfcrypt/error-crypt.h" | |||
#include "wolfssl/wolfcrypt/asn.h" | |||
#include "wolfssl/wolfcrypt/asn_public.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
asn.h include asn_public.h. Were you getting a compile warning/error without asn_public.h explicitly included?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm dumb, removed
src/wh_crypto.c
Outdated
#ifdef HAVE_CURVE25519 | ||
#ifdef HAVE_CURVE25519_KEY_IMPORT | ||
WOLFSSL_API int wc_Curve25519PrivateKeyDecode( | ||
const byte* input, word32* inOutIdx, curve25519_key* key, word32 inSz); | ||
WOLFSSL_API int wc_Curve25519PublicKeyDecode( | ||
const byte* input, word32* inOutIdx, curve25519_key* key, word32 inSz); | ||
#endif | ||
#ifdef HAVE_CURVE25519_KEY_EXPORT | ||
WOLFSSL_API int wc_Curve25519PrivateKeyToDer( | ||
curve25519_key* key, byte* output, word32 inLen); | ||
WOLFSSL_API int wc_Curve25519PublicKeyToDer( | ||
curve25519_key* key, byte* output, word32 inLen, int withAlg); | ||
#endif | ||
#endif /* HAVE_CURVE25519 */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aren't these already declared in asn_public.h?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep, this should have been removed. fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent!
Curve25519 fixes
Fixes curve25519 implementation, changing it to use new wolfCrypt DER API for ser/de instead of raw keys