secp256k1-zkp/scalar.h

24 lines
491 B
C
Raw Normal View History

2013-03-08 01:20:41 +01:00
#ifndef _SECP256K1_SCALAR_
#define _SECP256K1_SCALAR_
#include "num.h"
2013-03-10 01:49:42 +01:00
#include "group.h"
2013-03-08 01:20:41 +01:00
namespace secp256k1 {
/** Implements arithmetic modulo FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFE BAAEDCE6 AF48A03B BFD25E8C D0364141,
* using OpenSSL's BIGNUM
*/
2013-03-09 22:47:40 +01:00
class Scalar : public Number {
2013-03-08 01:20:41 +01:00
public:
2013-03-09 22:47:40 +01:00
Scalar(Context &ctx) : Number(ctx) {}
2013-03-10 01:49:42 +01:00
void Multiply(Context &ctx, const Scalar &f) {
const GroupConstants &c = GetGroupConst();
SetModMul(ctx, f, c.order);
}
2013-03-08 01:20:41 +01:00
};
}
#endif