kylef / JSONWebToken.swift

Swift implementation of JSON Web Token (JWT).
http://jwt.io
BSD 2-Clause "Simplified" License
762 stars 226 forks source link

Support ECDSA signatures #5

Open kylef opened 9 years ago

ColtonProvias commented 8 years ago

Is there any possibility of making use of OpenSSL or LibreSSL for this?

kylef commented 7 years ago

@ColtonProvias I wouldn't be against it. It would be nice to use a known security library under the hood. Providing we can 1) make installation simple, 2) support all Apple platforms, Linux, fBSD.

benaubin commented 7 years ago

@kylef I'm attempting to add support for ES256, using Apple's built in SecKeyRawSign (for Secure Enclave). Fair warning, the API doesn't work with MacOS, but works with all other platforms (iOS, tvOS and watchOS).

Would you like me to submit a PR?

kylef commented 7 years ago

@penne12 Do you think you think we could support ES256 on iOS, tvOS and watchOS using SecKeyRawSign and fallback to the current behaviour by not supporting ES256 on other platforms, this will keep the current support on Linux and macOS. If so I'd love a pull request.

benaubin commented 7 years ago

@kylef I could add in a build directive, maybe?

Not sure, I'm fairly new to the language (and I haven't worked with compiled languages in a while, either)

kylef commented 7 years ago

@penne12 yes that would work. Sounds great!

kylef commented 7 years ago

@penne12 If you hit any problems, feel free to make a PR with your work in progress and I can give you pointers if you get stuck with anything.

benaubin commented 7 years ago

@kylef Sounds good.

darer commented 7 years ago

@kylef, @benaubin any progress on this? ES256 is what I need to use.

bengottlieb commented 7 years ago

@benaubin Just a re-request for ES256 support, if you've got it working. Thanks!