Skip to content
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

Alternative to cryptonite/crypton? #108

Open
hasufell opened this issue May 24, 2022 · 5 comments
Open

Alternative to cryptonite/crypton? #108

hasufell opened this issue May 24, 2022 · 5 comments

Comments

@hasufell
Copy link

I don't want to use cryptonite and other related libraries. There's some discussion about that here: https://mail.haskell.org/pipermail/libraries/2020-August/030671.html

So... can someone say if there's a way to switch out cryptonite for something else and maybe put it behind a cabal flag?

@frasertweedale
Copy link
Owner

Is there an alternative library that provides all the primitives JOSE needs?

That's the first question. Even if there is, it would be a huge undertaking to implement.
I would need to be paid (how much, I don't know, I can only scope the work after I see
the interface of the library(/ies) that offer all the types and primitives needed).

@hasufell
Copy link
Author

Is there an alternative library that provides all the primitives JOSE needs?

Probably the only one is https://hackage.haskell.org/package/HsOpenSSL

What primitives does JOSE need exactly?

@frasertweedale
Copy link
Owner

frasertweedale commented May 27, 2022

For JWS & signed JWT:

  • operations: signing, verification, hmac, keygen, read key
  • algs: RSASSA-PKCS1v1.5, RSASSA-PSS w/ MGF1, ECDSA (nistp256, nistp384, nistp521), SHA256, SHA384, SHA512, EdDSA (Ed25519, Ed448)

HsOpenSSL at this time seems only to support RSASSA-PKCS1v1.5 and HMAC (with all relevant digests). It also seems to be quite a nuisance to load keys (I might have missed something though).

What features and algorithms do you need?

If your company is willing to pay, please reach out and we can discuss in more detail (see my git commits for email address to use).

@geraldus
Copy link

See crypton
Снимок экрана 2024-07-19 в 7 23 07 PM

@frasertweedale frasertweedale changed the title Alternative to cryptonite? Alternative to cryptonite/crypton? Jul 20, 2024
@frasertweedale
Copy link
Owner

frasertweedale commented Jul 20, 2024

@geraldus jose already switched to crypton (which was a hard fork of cryptonite because it was unmaintained) in v0.11. The ask in this issue is to support fundamentally different backends (e.g. thunk to OpenSSL or some other verified or FIPS-certified crypto implementation).

It is a valid ask, but unless/until someone provides something with an interface substantially similar to or compatible with crypton[ite], it is too much work for me to do for free. If someone wants to pay, I am open to it.

*edit: * it looks like the botan effort will try to provide a crypton compat interface for drop-in replacement (see https://haskell-cryptography.org/blog/botan-first-milestone/#development-of-a-drop-in-interface-replacement-for-crypton). When this arrives, I will re-evaluate!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants