purify
C++ Purify implementation with native circuit and BPP support
Loading...
Searching...
No Matches
numeric.cpp File Reference

Compiled FieldElement implementation for Purify numeric helpers. More...

#include "purify/numeric.hpp"
#include "field.h"

Go to the source code of this file.

Namespaces

namespace  purify
 

Functions

bool purify::operator== (const FieldElement &lhs, const FieldElement &rhs)
 
bool purify::operator!= (const FieldElement &lhs, const FieldElement &rhs)
 
FieldElement purify::operator+ (const FieldElement &lhs, const FieldElement &rhs)
 
FieldElement purify::operator- (const FieldElement &lhs, const FieldElement &rhs)
 
FieldElement purify::operator* (const FieldElement &lhs, const FieldElement &rhs)
 
FieldElement purify::square (const FieldElement &value)
 Squares a field element.
 
int purify::legendre_symbol (const FieldElement &value)
 Returns 0 for zero, 1 for quadratic residues, and -1 for non-residues.