cryptosphere/rbnacl — pull request #19 by tarcieri (2013-02-06 03:57:01+00:00)
Title: Crypto::Scalar

I'm trying to expose the scalar multiplication functions in NaCl, most notably #mult_base which (unless I'm confused, which maybe I am) is the one needed to compute public keys from private keys.

This is an initial first shot, which uses a Crypto::Scalar class. The more I look at this the less sure I am that a class is even necessary. It might make more sense to implement the entire API with modules. However, this does nicely mimic the existing key APIs, I think.

Right now I've written #mult_base to return a serialized result as that's the main use case I can imagine. However, it might make sense for it to return another Crypto::Scalar (I'm not sure if a group is technically a scalar in this context but I think it is)