20 #ifndef RIPPLE_OPENSSL_H
21 #define RIPPLE_OPENSSL_H
23 #include <ripple/basics/base_uint.h>
24 #include <ripple/crypto/impl/ec_key.h>
25 #include <openssl/bn.h>
26 #include <openssl/ec.h>
55 bignum(uint8_t
const* data,
size_t size)
95 return BN_is_zero(
ptr);
105 assign(uint8_t
const* data,
size_t size);
111 return BN_cmp(a.
get(), b.
get()) < 0;
126 BN_bn2bin(number.
get(), result.
end() - BN_num_bytes(number.
get()));
227 bn2point(EC_GROUP
const* group, BIGNUM
const* number);
BN_CTX const * get() const
bool operator>=(bignum const &a, bignum const &b)
ec_point & operator=(ec_point const &)=delete
bn_ctx & operator=(bn_ctx const &)
uint256 uint256_from_bignum_clear(bignum &number)
Integers of any length that is a multiple of 32-bits.
void serialize_ec_point(ec_point const &point, std::uint8_t *ptr)
void add_to(EC_GROUP const *group, ec_point const &a, ec_point &b, bn_ctx &ctx)
static ec_point acquire(pointer_t raw)
ec_point(ec_point &&that) noexcept
void assign_new(uint8_t const *data, size_t size)
bignum(bignum &&that) noexcept
BIGNUM const * get() const
bignum & operator=(bignum &&that) noexcept
bignum get_order(EC_GROUP const *group, bn_ctx &ctx)
bool operator<(bignum const &a, bignum const &b)
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
EC_POINT const * get() const
void assign(uint8_t const *data, size_t size)
bignum & operator=(bignum const &)=delete
ec_point bn2point(EC_GROUP const *group, BIGNUM const *number)
ec_point multiply(EC_GROUP const *group, bignum const &n, bn_ctx &ctx)
bignum(uint8_t const *data, size_t size)