chromium/third_party/private-join-and-compute/src/crypto/big_num.cc

/*
 * Copyright 2019 Google Inc.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include "third_party/private-join-and-compute/src/crypto/big_num.h"

#include <cmath>
#include <vector>

#include "third_party/private-join-and-compute/src/chromium_patch.h"
#include "third_party/private-join-and-compute/src/crypto/context.h"
#include "third_party/private-join-and-compute/src/crypto/openssl.inc"
#include "third_party/private-join-and-compute/src/util/status.inc"

namespace private_join_and_compute {

BigNum::BigNum(const BigNum& other)
    :{}

BigNum& BigNum::operator=(const BigNum& other) {}

BigNum::BigNum(BigNum&& other)
    :{}

BigNum& BigNum::operator=(BigNum&& other) {}

BigNum::BigNum(BN_CTX* bn_ctx, uint64_t number) :{}

BigNum::BigNum(BN_CTX* bn_ctx, const std::string& bytes)
    :{}

BigNum::BigNum(BN_CTX* bn_ctx, const unsigned char* bytes, int length)
    :{}

BigNum::BigNum(BN_CTX* bn_ctx) {}

BigNum::BigNum(BN_CTX* bn_ctx, BignumPtr bn) {}

const BIGNUM* BigNum::GetConstBignumPtr() const {}

std::string BigNum::ToBytes() const {}

StatusOr<uint64_t> BigNum::ToIntValue() const {}

int BigNum::BitLength() const {}

bool BigNum::IsPrime(double prime_error_probability) const {}

bool BigNum::IsSafePrime(double prime_error_probability) const {}

bool BigNum::IsZero() const {}

bool BigNum::IsOne() const {}

bool BigNum::IsNonNegative() const {}

BigNum BigNum::GetLastNBits(int n) const {}

bool BigNum::IsBitSet(int n) const {}

// Returns a BigNum whose value is (- *this).
// Causes a check failure if the operation fails.
BigNum BigNum::Neg() const {}

BigNum BigNum::Add(const BigNum& val) const {}

BigNum BigNum::Mul(const BigNum& val) const {}

BigNum BigNum::Sub(const BigNum& val) const {}

BigNum BigNum::Div(const BigNum& val) const {}

BigNum BigNum::DivAndTruncate(const BigNum& val) const {}

int BigNum::CompareTo(const BigNum& val) const {}

BigNum BigNum::Exp(const BigNum& exponent) const {}

BigNum BigNum::Mod(const BigNum& m) const {}

BigNum BigNum::ModAdd(const BigNum& val, const BigNum& m) const {}

BigNum BigNum::ModSub(const BigNum& val, const BigNum& m) const {}

BigNum BigNum::ModMul(const BigNum& val, const BigNum& m) const {}

BigNum BigNum::ModExp(const BigNum& exponent, const BigNum& m) const {}

BigNum BigNum::ModSqr(const BigNum& m) const {}

BigNum BigNum::ModInverse(const BigNum& m) const {}

BigNum BigNum::ModSqrt(const BigNum& m) const {}

BigNum BigNum::ModNegate(const BigNum& m) const {}

BigNum BigNum::Lshift(int n) const {}

BigNum BigNum::Rshift(int n) const {}

BigNum BigNum::Gcd(const BigNum& val) const {}

}  // namespace private_join_and_compute