haskell-crypto / cryptonite

lowlevel set of cryptographic primitives for haskell
Other
226 stars 139 forks source link

Num instances for ECC scalars #296

Closed ocheron closed 5 years ago

ocheron commented 5 years ago

Adds missing scalar primitives as well as Num instances. Except abs and signum are not implemented because there could be multiple conventions for them.

vincenthz commented 5 years ago

Num instance makes me uneasy due to fitting too loosely the scalar group (sign, abs, ..). Would it make more sense to either:

The rest looks fine.

ocheron commented 5 years ago

Thank you. I think I gave a look to basement numerical classes but had same doubt. Because of the extra operations with polymorphic parameters. Opened haskell-foundation/foundation#529.