nil::crypto3 Namespace Reference

Namespaces

 accumulators
 
 adaptors
 
 algebra
 
 block
 
 codec
 
 detail
 
 fft
 
 hash
 
 hashes
 
 kdf
 
 mac
 
 passhash
 
 pbkdf
 
 pubkey
 
 stream
 
 stream_endian
 
 vdf
 
 zk
 

Classes

struct  agreement_key
 
class  cpuid
 
struct  digest
 
struct  emsa
 EMSA, from IEEE 1363s Encoding Method for Signatures, Appendix. More...
 
struct  ge_cached
 
struct  ge_p1p1
 
struct  ge_p2
 
struct  ge_p3
 
struct  ge_precomp
 
struct  iso_9796
 
struct  iso_9796_ds2
 
struct  iso_9796_ds3
 
class  memory_pool
 
class  mlock_allocator
 
class  pk_decryptor
 
class  pk_decryptor_eme
 
class  pk_encryptor
 
class  pk_encryptor_eme
 
class  pk_kem_decryptor
 
class  pk_kem_encryptor
 
class  pk_key_agreement
 
class  pk_signer
 
class  pk_verifier
 
class  polyn_gf2m
 
struct  private_key
 
struct  public_key
 
class  secure_allocator
 
class  static_digest
 

Typedefs

template<typename Hash , typename = typename std::enable_if<detail::is_hash<Hash>::value>::type>
using accumulator_set = boost::accumulators::accumulator_set< static_digest< Hash::digest_bits >, boost::accumulators::features< accumulators::tag::hash< Hash > >, std::size_t >
 
template<std::size_t DigestBits>
using digest = boost::container::small_vector< octet_type, DigestBits/octet_bits >
 
typedef boost::uint_t< octet_bits >::least octet_type
 

Enumerations

enum  signature_format { IEEE_1363, DER_SEQUENCE }
 

Functions

template<typename Scheme , typename SinglePassRange , typename SchemeAccumulator = typename pubkey::accumulator_set<typename pubkey::modes::isomorphic< Scheme, pubkey::nop_padding>::template bind<pubkey::agreement_policy<Scheme>>::type>>
pubkey::detail::range_scheme_impl< pubkey::detail::value_scheme_impl< SchemeAccumulator > > agree (const SinglePassRange &r, const agreement_key< Scheme > &key)
 
template<typename SchemeMode , typename SinglePassRange , typename SchemeAccumulator = typename pubkey::accumulator_set<typename SchemeMode::template bind< pubkey::agreement_policy<typename SchemeMode::scheme_type>>::type>>
pubkey::detail::range_scheme_impl< pubkey::detail::value_scheme_impl< SchemeAccumulator > > agree (const SinglePassRange &r, const agreement_key< typename SchemeMode::scheme_type > &key)
 
template<typename SchemeMode , typename SinglePassRange , typename KeySinglePassRange , typename SchemeAccumulator = typename pubkey::accumulator_set<typename SchemeMode::template bind< pubkey::agreement_policy<typename SchemeMode::scheme_type>>::type>>
pubkey::detail::range_scheme_impl< pubkey::detail::value_scheme_impl< SchemeAccumulator > > agree (const SinglePassRange &r, const KeySinglePassRange &key)
 
template<typename SchemeMode , typename SinglePassRange , typename OutputAccumulator = typename pubkey::accumulator_set< typename SchemeMode::template bind<typename SchemeMode::agreement_policy>::type>>
std::enable_if< boost::accumulators::detail::is_accumulator_set< OutputAccumulator >::value, OutputAccumulator >::type & agree (const SinglePassRange &r, OutputAccumulator &acc)
 
template<typename Scheme , typename SinglePassRange , typename OutputIterator >
OutputIterator agree (const SinglePassRange &rng, const agreement_key< Scheme > &key, OutputIterator out)
 
template<typename Scheme , typename SinglePassRange , typename OutputRange >
OutputRange & agree (const SinglePassRange &rng, const agreement_key< Scheme > &key, OutputRange &out)
 
template<typename SchemeMode , typename SinglePassRange , typename OutputIterator >
OutputIterator agree (const SinglePassRange &rng, const agreement_key< typename SchemeMode::scheme_type > &key, OutputIterator out)
 
template<typename SchemeMode , typename SinglePassRange , typename OutputRange >
OutputRange & agree (const SinglePassRange &rng, const agreement_key< typename SchemeMode::scheme_type > &key, OutputRange &out)
 
template<typename SchemeMode , typename SinglePassRange , typename KeySinglePassRange , typename OutputIterator >
OutputIterator agree (const SinglePassRange &rng, const KeySinglePassRange &key, OutputIterator out)
 
template<typename SchemeMode , typename SinglePassRange , typename KeySinglePassRange , typename OutputRange >
OutputRange & agree (const SinglePassRange &rng, const KeySinglePassRange &key, OutputRange &out)
 
template<typename Scheme , typename InputIterator , typename SchemeAccumulator = typename pubkey::accumulator_set<typename pubkey::modes::isomorphic< Scheme, pubkey::nop_padding>::template bind<pubkey::agreement_policy<Scheme>>::type>>
pubkey::detail::range_scheme_impl< pubkey::detail::value_scheme_impl< SchemeAccumulator > > agree (InputIterator first, InputIterator last, const agreement_key< Scheme > &key)
 
template<typename Scheme , typename InputIterator , typename OutputIterator >
OutputIterator agree (InputIterator first, InputIterator last, const agreement_key< Scheme > &key, OutputIterator out)
 
template<typename SchemeMode , typename InputIterator , typename SchemeAccumulator = typename pubkey::accumulator_set<typename SchemeMode::template bind< pubkey::agreement_policy<typename SchemeMode::scheme_type>>::type>>
pubkey::detail::range_scheme_impl< pubkey::detail::value_scheme_impl< SchemeAccumulator > > agree (InputIterator first, InputIterator last, const agreement_key< typename SchemeMode::scheme_type > &key)
 
template<typename SchemeMode , typename InputIterator , typename OutputIterator >
OutputIterator agree (InputIterator first, InputIterator last, const agreement_key< typename SchemeMode::scheme_type > &key, OutputIterator out)
 
template<typename SchemeMode , typename InputIterator , typename KeySinglePassRange , typename SchemeAccumulator = typename pubkey::accumulator_set<typename SchemeMode::template bind< pubkey::agreement_policy<typename SchemeMode::scheme_type>>::type>>
pubkey::detail::range_scheme_impl< pubkey::detail::value_scheme_impl< SchemeAccumulator > > agree (InputIterator first, InputIterator last, const KeySinglePassRange &key)
 
template<typename SchemeMode , typename InputIterator , typename KeySinglePassRange , typename OutputIterator >
OutputIterator agree (InputIterator first, InputIterator last, const KeySinglePassRange &key, OutputIterator out)
 
template<typename SchemeMode , typename InputIterator , typename KeyInputIterator , typename SchemeAccumulator = typename pubkey::accumulator_set<typename SchemeMode::template bind< pubkey::agreement_policy<typename SchemeMode::scheme_type>>::type>>
pubkey::detail::range_scheme_impl< pubkey::detail::value_scheme_impl< SchemeAccumulator > > agree (InputIterator first, InputIterator last, KeyInputIterator key_first, KeyInputIterator key_last)
 
template<typename SchemeMode , typename InputIterator , typename KeyInputIterator , typename OutputIterator >
OutputIterator agree (InputIterator first, InputIterator last, KeyInputIterator key_first, KeyInputIterator key_last, OutputIterator out)
 
template<typename SchemeMode , typename InputIterator , typename OutputAccumulator = typename pubkey::accumulator_set<typename SchemeMode::template bind< pubkey::agreement_policy<typename SchemeMode::scheme_type>>::type>>
std::enable_if< boost::accumulators::detail::is_accumulator_set< OutputAccumulator >::value, OutputAccumulator >::type & agree (InputIterator first, InputIterator last, OutputAccumulator &acc)
 
BOOST_ATTRIBUTE_MALLOC_FUNCTION void * allocate_memory (size_t elems, size_t elem_size)
 
template<size_t S, int64_t MUL = 1>
void carry (int64_t &h0, int64_t &h1)
 
template<size_t S>
void carry0 (int32_t &h0, int32_t &h1)
 
template<size_t S>
void carry0 (int64_t &h0, int64_t &h1)
 
uint8_t * cast_char_ptr_to_uint8 (char *s)
 
const uint8_t * cast_char_ptr_to_uint8 (const char *s)
 
const char * cast_uint8_ptr_to_char (const uint8_t *b)
 
char * cast_uint8_ptr_to_char (uint8_t *b)
 
bool check_bcrypt (const std::string &password, const std::string &hash)
 
void clear_bytes (void *ptr, size_t bytes)
 
template<typename T >
void clear_mem (T *ptr, size_t n)
 
bool constant_time_compare (const uint8_t x[], const uint8_t y[], size_t len)
 
template<typename T >
void copy_mem (T *out, const T *in, size_t n)
 
void deallocate_memory (void *p, size_t elems, size_t elem_size)
 
template<typename Decoder , typename SinglePassRange , typename CodecAccumulator = typename codec::accumulator_set<typename Decoder::stream_decoder_type>>
codec::detail::range_codec_impl< codec::detail::value_codec_impl< CodecAccumulator > > decode (const SinglePassRange &r)
 Decodes the elements with particular codec defined with Decoder in the range, defined by rng and returns the result with any type convertible to the type satisfying SequenceContainer with the value type satisfying Integral concept requirements. More...
 
template<typename Decoder , typename SinglePassRange , typename CodecAccumulator = typename codec::accumulator_set<typename Decoder::stream_decoder_type>>
std::enable_if< boost::accumulators::detail::is_accumulator_set< CodecAccumulator >::value, CodecAccumulator >::type & decode (const SinglePassRange &rng, CodecAccumulator &acc)
 Decodes the elements with particular codec defined with Decoder in the range, defined by rng and inserts the result to destination range beginning at out. More...
 
template<typename Decoder , typename SinglePassRange , typename OutputIterator >
std::enable_if< detail::is_iterator< OutputIterator >::value, OutputIterator >::type decode (const SinglePassRange &rng, OutputIterator out)
 Decodes the elements with particular codec defined with Decoder in the range, defined by rng and inserts the result to destination range beginning at out. More...
 
template<typename Decoder , typename InputIterator , typename CodecAccumulator = typename codec::accumulator_set<typename Decoder::stream_decoder_type>>
codec::detail::range_codec_impl< codec::detail::value_codec_impl< CodecAccumulator > > decode (InputIterator first, InputIterator last)
 Decodes the elements with particular codec defined with Decoder in the range, defined by [first, last) and returns the result with any type convertible to the type satisfying SequenceContainer with the value type satisfying Integral concept requirements. More...
 
template<typename Decoder , typename InputIterator , typename CodecAccumulator = typename codec::accumulator_set<typename Decoder::stream_decoder_type>>
std::enable_if< boost::accumulators::detail::is_accumulator_set< CodecAccumulator >::value, CodecAccumulator >::type & decode (InputIterator first, InputIterator last, CodecAccumulator &acc)
 Decodes the elements with particular codec defined with Decoder in the range, defined by rng and inserts the result to destination range beginning at out. More...
 
template<typename Decoder , typename InputIterator , typename OutputIterator >
std::enable_if< detail::is_iterator< OutputIterator >::value, OutputIterator >::type decode (InputIterator first, InputIterator last, OutputIterator out)
 Decodes the elements with particular codec defined with Decoder in the range, defined by [first, last), and inserts the result to another range beginning at out. More...
 
template<typename BlockCipher , typename SinglePassRange , typename CipherAccumulator = typename block::accumulator_set<typename block::modes::isomorphic< BlockCipher, block::nop_padding>::template bind<block::decryption_policy<BlockCipher>>::type>, typename = typename std::enable_if<detail::is_range<SinglePassRange>::value>::type>
block::detail::range_cipher_impl< block::detail::value_cipher_impl< CipherAccumulator > > decrypt (const SinglePassRange &r, const block::cipher_key< BlockCipher > &key)
 
template<typename BlockCipher , typename SinglePassRange , typename KeyPassRange , typename CipherAccumulator = typename block::accumulator_set<typename block::modes::isomorphic< BlockCipher, block::nop_padding>::template bind<block::decryption_policy<BlockCipher>>::type>>
block::detail::range_cipher_impl< block::detail::value_cipher_impl< CipherAccumulator > > decrypt (const SinglePassRange &r, const KeyPassRange &key)
 
template<typename StreamCipher , typename SinglePassRange , typename KeyRange , typename CipherAccumulator = typename stream::stream_accumulator<typename StreamCipher::stream_decrypter_type>>
stream::detail::range_cipher_impl< stream::detail::value_cipher_impl< CipherAccumulator > > decrypt (const SinglePassRange &r, const KeyRange &key)
 
template<typename BlockCipher , typename SinglePassRange , typename KeySinglePassRange , typename CipherAccumulator = typename block::accumulator_set<typename block::modes::isomorphic< BlockCipher, block::nop_padding>::template bind<block::decryption_policy<BlockCipher>>::type>, typename = typename std::enable_if<detail::is_range<SinglePassRange>::value>::type>
block::detail::range_cipher_impl< block::detail::value_cipher_impl< CipherAccumulator > > decrypt (const SinglePassRange &r, const KeySinglePassRange &key)
 
template<typename SchemeMode , typename SinglePassRange , typename KeySinglePassRange , typename SchemeAccumulator = typename pubkey::accumulator_set<typename SchemeMode::template bind< pubkey::decryption_policy<typename SchemeMode::scheme_type>>::type>>
pubkey::detail::range_scheme_impl< pubkey::detail::value_scheme_impl< SchemeAccumulator > > decrypt (const SinglePassRange &r, const KeySinglePassRange &key)
 
template<typename Scheme , typename SinglePassRange , typename SchemeAccumulator = typename pubkey::accumulator_set<typename pubkey::modes::isomorphic< Scheme, pubkey::nop_padding>::template bind<pubkey::decryption_policy<Scheme>>::type>>
pubkey::detail::range_scheme_impl< pubkey::detail::value_scheme_impl< SchemeAccumulator > > decrypt (const SinglePassRange &r, const private_key< Scheme > &key)
 
template<typename SchemeMode , typename SinglePassRange , typename SchemeAccumulator = typename pubkey::accumulator_set<typename SchemeMode::template bind< pubkey::decryption_policy<typename SchemeMode::scheme_type>>::type>>
pubkey::detail::range_scheme_impl< pubkey::detail::value_scheme_impl< SchemeAccumulator > > decrypt (const SinglePassRange &r, const private_key< typename SchemeMode::scheme_type > &key)
 
template<typename BlockCipher , typename SinglePassRange , typename OutputAccumulator = typename block::accumulator_set< typename block::modes::isomorphic<BlockCipher, block::nop_padding>::template bind< typename block::modes::isomorphic<BlockCipher, block::nop_padding>::decryption_policy>::type>, typename = typename std::enable_if<detail::is_range<SinglePassRange>::value>::type>
std::enable_if< boost::accumulators::detail::is_accumulator_set< OutputAccumulator >::value, OutputAccumulator >::type & decrypt (const SinglePassRange &r, OutputAccumulator &acc)
 
template<typename CipherMode , typename SinglePassRange , typename OutputAccumulator = typename block::accumulator_set< typename CipherMode::template bind<typename CipherMode::decryption_policy>::type>>
std::enable_if< boost::accumulators::detail::is_accumulator_set< OutputAccumulator >::value, OutputAccumulator >::type & decrypt (const SinglePassRange &r, OutputAccumulator &acc)
 
template<typename StreamCipher , typename SinglePassRange , typename OutputAccumulator = typename stream::stream_accumulator<typename StreamCipher::stream_decrypter_type>>
OutputAccumulator & decrypt (const SinglePassRange &r, OutputAccumulator &acc)
 
template<typename BlockCipher , typename SinglePassRange , typename OutputIterator , typename = typename std::enable_if<detail::is_range<SinglePassRange>::value>::type>
OutputIterator decrypt (const SinglePassRange &rng, const block::cipher_key< BlockCipher > &key, OutputIterator out)
 
template<typename BlockCipher , typename SinglePassRange , typename OutputRange , typename = typename std::enable_if<detail::is_range<SinglePassRange>::value>::type>
OutputRange & decrypt (const SinglePassRange &rng, const block::cipher_key< BlockCipher > &key, OutputRange &out)
 
template<typename CipherMode , typename SinglePassRange , typename KeyPassRange , typename OutputIterator >
OutputIterator decrypt (const SinglePassRange &rng, const KeyPassRange &key, OutputIterator out)
 
template<typename CipherMode , typename SinglePassRange , typename KeyPassRange , typename OutputRange >
OutputRange & decrypt (const SinglePassRange &rng, const KeyPassRange &key, OutputRange &out)
 
template<typename StreamCipher , typename SinglePassRange , typename KeyRange , typename OutputIterator >
OutputIterator decrypt (const SinglePassRange &rng, const KeyRange &key, OutputIterator out)
 
template<typename BlockCipher , typename SinglePassRange , typename KeySinglePassRange , typename OutputIterator , typename = typename std::enable_if<detail::is_range<SinglePassRange>::value>::type>
OutputIterator decrypt (const SinglePassRange &rng, const KeySinglePassRange &key, OutputIterator out)
 
template<typename SchemeMode , typename SinglePassRange , typename KeySinglePassRange , typename OutputIterator >
OutputIterator decrypt (const SinglePassRange &rng, const KeySinglePassRange &key, OutputIterator out)
 
template<typename BlockCipher , typename SinglePassRange , typename KeySinglePassRange , typename OutputRange , typename = typename std::enable_if<detail::is_range<SinglePassRange>::value>::type>
OutputRange & decrypt (const SinglePassRange &rng, const KeySinglePassRange &key, OutputRange &out)
 
template<typename SchemeMode , typename SinglePassRange , typename KeySinglePassRange , typename OutputRange >
OutputRange & decrypt (const SinglePassRange &rng, const KeySinglePassRange &key, OutputRange &out)
 
template<typename Scheme , typename SinglePassRange , typename OutputIterator >
OutputIterator decrypt (const SinglePassRange &rng, const private_key< Scheme > &key, OutputIterator out)
 
template<typename Scheme , typename SinglePassRange , typename OutputRange >
OutputRange & decrypt (const SinglePassRange &rng, const private_key< Scheme > &key, OutputRange &out)
 
template<typename SchemeMode , typename SinglePassRange , typename OutputIterator >
OutputIterator decrypt (const SinglePassRange &rng, const private_key< typename SchemeMode::scheme_type > &key, OutputIterator out)
 
template<typename SchemeMode , typename SinglePassRange , typename OutputRange >
OutputRange & decrypt (const SinglePassRange &rng, const private_key< typename SchemeMode::scheme_type > &key, OutputRange &out)
 
template<typename BlockCipher , typename InputIterator , typename CipherAccumulator = typename block::accumulator_set<typename block::modes::isomorphic< BlockCipher, block::nop_padding>::template bind<block::decryption_policy<BlockCipher>>::type>, typename = typename std::enable_if<detail::is_iterator<InputIterator>::value>::type>
block::detail::range_cipher_impl< block::detail::value_cipher_impl< CipherAccumulator > > decrypt (InputIterator first, InputIterator last, const block::cipher_key< BlockCipher > &key)
 
template<typename BlockCipher , typename InputIterator , typename OutputIterator , typename = typename std::enable_if<detail::is_iterator<InputIterator>::value>::type>
OutputIterator decrypt (InputIterator first, InputIterator last, const block::cipher_key< BlockCipher > &key, OutputIterator out)
 
template<typename BlockCipher , typename InputIterator , typename KeySinglePassRange , typename CipherAccumulator = typename block::accumulator_set<typename block::modes::isomorphic< BlockCipher, block::nop_padding>::template bind<block::decryption_policy<BlockCipher>>::type>, typename = typename std::enable_if<detail::is_iterator<InputIterator>::value>::type>
block::detail::range_cipher_impl< block::detail::value_cipher_impl< CipherAccumulator > > decrypt (InputIterator first, InputIterator last, const KeySinglePassRange &key)
 
template<typename CipherMode , typename InputIterator , typename KeySinglePassRange , typename CipherAccumulator = typename block::accumulator_set< typename CipherMode::template bind<block::decryption_policy<CipherMode>>::type>>
block::detail::range_cipher_impl< block::detail::value_cipher_impl< CipherAccumulator > > decrypt (InputIterator first, InputIterator last, const KeySinglePassRange &key)
 
template<typename SchemeMode , typename InputIterator , typename KeySinglePassRange , typename SchemeAccumulator = typename pubkey::accumulator_set<typename SchemeMode::template bind< pubkey::decryption_policy<typename SchemeMode::scheme_type>>::type>>
pubkey::detail::range_scheme_impl< pubkey::detail::value_scheme_impl< SchemeAccumulator > > decrypt (InputIterator first, InputIterator last, const KeySinglePassRange &key)
 
template<typename BlockCipher , typename InputIterator , typename KeySinglePassRange , typename OutputIterator , typename = typename std::enable_if<detail::is_iterator<InputIterator>::value>::type>
OutputIterator decrypt (InputIterator first, InputIterator last, const KeySinglePassRange &key, OutputIterator out)
 
template<typename CipherMode , typename InputIterator , typename KeySinglePassRange , typename OutputIterator >
OutputIterator decrypt (InputIterator first, InputIterator last, const KeySinglePassRange &key, OutputIterator out)
 
template<typename Scheme , typename InputIterator , typename SchemeAccumulator = typename pubkey::accumulator_set<typename pubkey::modes::isomorphic< Scheme, pubkey::nop_padding>::template bind<pubkey::decryption_policy<Scheme>>::type>>
pubkey::detail::range_scheme_impl< pubkey::detail::value_scheme_impl< SchemeAccumulator > > decrypt (InputIterator first, InputIterator last, const private_key< Scheme > &key)
 
template<typename Scheme , typename InputIterator , typename OutputIterator >
OutputIterator decrypt (InputIterator first, InputIterator last, const private_key< Scheme > &key, OutputIterator out)
 
template<typename SchemeMode , typename InputIterator , typename SchemeAccumulator = typename pubkey::accumulator_set<typename SchemeMode::template bind< pubkey::decryption_policy<typename SchemeMode::scheme_type>>::type>>
pubkey::detail::range_scheme_impl< pubkey::detail::value_scheme_impl< SchemeAccumulator > > decrypt (InputIterator first, InputIterator last, const private_key< typename SchemeMode::scheme_type > &key)
 
template<typename SchemeMode , typename InputIterator , typename OutputIterator >
OutputIterator decrypt (InputIterator first, InputIterator last, const private_key< typename SchemeMode::scheme_type > &key, OutputIterator out)
 
template<typename BlockCipher , typename InputIterator , typename KeyInputIterator , typename CipherAccumulator = typename block::accumulator_set<typename block::modes::isomorphic< BlockCipher, block::nop_padding>::template bind<block::decryption_policy<BlockCipher>>::type>, typename = typename std::enable_if<detail::is_iterator<InputIterator>::value>::type>
block::detail::range_cipher_impl< block::detail::value_cipher_impl< CipherAccumulator > > decrypt (InputIterator first, InputIterator last, KeyInputIterator key_first, KeyInputIterator key_last)
 
template<typename CipherMode , typename InputIterator , typename KeyInputIterator , typename CipherAccumulator = typename block::accumulator_set< typename CipherMode::template bind<block::decryption_policy<CipherMode>>::type>>
block::detail::range_cipher_impl< block::detail::value_cipher_impl< CipherAccumulator > > decrypt (InputIterator first, InputIterator last, KeyInputIterator key_first, KeyInputIterator key_last)
 
template<typename SchemeMode , typename InputIterator , typename KeyInputIterator , typename SchemeAccumulator = typename pubkey::accumulator_set<typename SchemeMode::template bind< pubkey::decryption_policy<typename SchemeMode::scheme_type>>::type>>
pubkey::detail::range_scheme_impl< pubkey::detail::value_scheme_impl< SchemeAccumulator > > decrypt (InputIterator first, InputIterator last, KeyInputIterator key_first, KeyInputIterator key_last)
 
template<typename BlockCipher , typename InputIterator , typename KeyInputIterator , typename OutputIterator , typename = typename std::enable_if<detail::is_iterator<InputIterator>::value>::type>
OutputIterator decrypt (InputIterator first, InputIterator last, KeyInputIterator key_first, KeyInputIterator key_last, OutputIterator out)
 
template<typename CipherMode , typename InputIterator , typename KeyInputIterator , typename OutputIterator >
OutputIterator decrypt (InputIterator first, InputIterator last, KeyInputIterator key_first, KeyInputIterator key_last, OutputIterator out)
 
template<typename StreamCipher , typename InputIterator , typename KeyIterator , typename CipherAccumulator = typename stream::stream_accumulator<typename StreamCipher::stream_decrypter_type>>
stream::detail::range_cipher_impl< stream::detail::value_cipher_impl< CipherAccumulator > > decrypt (InputIterator first, InputIterator last, KeyIterator key_first, KeyIterator key_last)
 
template<typename StreamCipher , typename InputIterator , typename KeyIterator , typename OutputIterator >
OutputIterator decrypt (InputIterator first, InputIterator last, KeyIterator key_first, KeyIterator key_last, OutputIterator out)
 
template<typename BlockCipher , typename InputIterator , typename OutputAccumulator = typename block::accumulator_set<typename block::modes::isomorphic< BlockCipher, block::nop_padding>::template bind<block::decryption_policy<BlockCipher>>::type>, typename = typename std::enable_if<detail::is_iterator<InputIterator>::value>::type>
std::enable_if< boost::accumulators::detail::is_accumulator_set< OutputAccumulator >::value, OutputAccumulator >::type & decrypt (InputIterator first, InputIterator last, OutputAccumulator &acc)
 
template<typename CipherMode , typename InputIterator , typename OutputAccumulator = typename block::accumulator_set< typename CipherMode::template bind<block::decryption_policy<CipherMode>>::type>>
std::enable_if< boost::accumulators::detail::is_accumulator_set< OutputAccumulator >::value, OutputAccumulator >::type & decrypt (InputIterator first, InputIterator last, OutputAccumulator &acc)
 
template<typename StreamCipher , typename InputIterator , typename OutputAccumulator = typename stream::stream_accumulator<typename StreamCipher::stream_decrypter_type>>
OutputAccumulator & decrypt (InputIterator first, InputIterator last, OutputAccumulator &acc)
 
template<typename Encoder , typename SinglePassRange , typename CodecAccumulator = typename codec::accumulator_set<typename Encoder::stream_encoder_type>>
codec::detail::range_codec_impl< codec::detail::value_codec_impl< CodecAccumulator > > encode (const SinglePassRange &r)
 Encodes the elements with particular codec defined with Encoder in the range, defined by rng and returns the result with any type convertible to the type satisfying SequenceContainer with the value type satisfying Integral concept requirements. More...
 
template<typename Encoder , typename SinglePassRange , typename CodecAccumulator = typename codec::accumulator_set<typename Encoder::stream_encoder_type>>
std::enable_if< boost::accumulators::detail::is_accumulator_set< CodecAccumulator >::value, CodecAccumulator >::type & encode (const SinglePassRange &rng, CodecAccumulator &acc)
 Encodes the elements with particular codec defined with Encoder in the range, defined by rng and inserts the result to destination range beginning at out. More...
 
template<typename Encoder , typename SinglePassRange , typename OutputIterator >
std::enable_if< detail::is_iterator< OutputIterator >::value, OutputIterator >::type encode (const SinglePassRange &rng, OutputIterator out)
 Encodes the elements with particular codec defined with Encoder in the range, defined by rng and inserts the result to destination range beginning at out. More...
 
template<typename Encoder , typename InputIterator , typename CodecAccumulator = typename codec::accumulator_set<typename Encoder::stream_encoder_type>>
codec::detail::range_codec_impl< codec::detail::value_codec_impl< CodecAccumulator > > encode (InputIterator first, InputIterator last)
 Encodes the elements with particular codec defined with Encoder in the range, defined by [first, last) and returns the result with any type convertible to the type satisfying SequenceContainer with the value type satisfying Integral concept requirements. More...
 
template<typename Encoder , typename InputIterator , typename CodecAccumulator = typename codec::accumulator_set<typename Encoder::stream_encoder_type>>
std::enable_if< boost::accumulators::detail::is_accumulator_set< CodecAccumulator >::value, CodecAccumulator >::type & encode (InputIterator first, InputIterator last, CodecAccumulator &acc)
 Encodes the elements with particular codec defined with Encoder in the range, defined by [first, last) and returns the result with type satisfying AccumulatorSet requirements. More...
 
template<typename Encoder , typename InputIterator , typename OutputIterator >
std::enable_if< detail::is_iterator< OutputIterator >::value, OutputIterator >::type encode (InputIterator first, InputIterator last, OutputIterator out)
 Encodes the elements with particular codec defined with Encoder in the range, defined by [first, last), and inserts the result to another range beginning at out. More...
 
template<typename BlockCipher , typename SinglePassRange , typename CipherAccumulator = typename block::accumulator_set<typename block::modes::isomorphic< BlockCipher, block::nop_padding>::template bind<block::encryption_policy<BlockCipher>>::type>, typename = typename std::enable_if<detail::is_range<SinglePassRange>::value>::type>
block::detail::range_cipher_impl< block::detail::value_cipher_impl< CipherAccumulator > > encrypt (const SinglePassRange &r, const block::cipher_key< BlockCipher > &key)
 
template<typename BlockCipher , typename SinglePassRange , typename KeyPassRange , typename CipherAccumulator = typename block::accumulator_set<typename block::modes::isomorphic< BlockCipher, block::nop_padding>::template bind<block::encryption_policy<BlockCipher>>::type>>
block::detail::range_cipher_impl< block::detail::value_cipher_impl< CipherAccumulator > > encrypt (const SinglePassRange &r, const KeyPassRange &key)
 
template<typename StreamCipher , typename SinglePassRange , typename KeyRange , typename CipherAccumulator = typename stream::stream_accumulator<typename StreamCipher::stream_encrypter_type>>
stream::detail::range_cipher_impl< stream::detail::value_cipher_impl< CipherAccumulator > > encrypt (const SinglePassRange &r, const KeyRange &key)
 
template<typename BlockCipher , typename SinglePassRange , typename KeySinglePassRange , typename CipherAccumulator = typename block::accumulator_set<typename block::modes::isomorphic< BlockCipher, block::nop_padding>::template bind<block::encryption_policy<BlockCipher>>::type>, typename = typename std::enable_if<detail::is_range<SinglePassRange>::value>::type>
block::detail::range_cipher_impl< block::detail::value_cipher_impl< CipherAccumulator > > encrypt (const SinglePassRange &r, const KeySinglePassRange &key)
 
template<typename SchemeMode , typename SinglePassRange , typename KeySinglePassRange , typename SchemeAccumulator = typename pubkey::accumulator_set<typename SchemeMode::template bind< pubkey::encryption_policy<typename SchemeMode::scheme_type>>::type>>
pubkey::detail::range_scheme_impl< pubkey::detail::value_scheme_impl< SchemeAccumulator > > encrypt (const SinglePassRange &r, const KeySinglePassRange &key)
 
template<typename Scheme , typename SinglePassRange , typename SchemeAccumulator = typename pubkey::accumulator_set<typename pubkey::modes::isomorphic< Scheme, pubkey::nop_padding>::template bind<pubkey::encryption_policy<Scheme>>::type>>
pubkey::detail::range_scheme_impl< pubkey::detail::value_scheme_impl< SchemeAccumulator > > encrypt (const SinglePassRange &r, const public_key< Scheme > &key)
 
template<typename SchemeMode , typename SinglePassRange , typename SchemeAccumulator = typename pubkey::accumulator_set<typename SchemeMode::template bind< pubkey::encryption_policy<typename SchemeMode::scheme_type>>::type>>
pubkey::detail::range_scheme_impl< pubkey::detail::value_scheme_impl< SchemeAccumulator > > encrypt (const SinglePassRange &r, const public_key< typename SchemeMode::scheme_type > &key)
 
template<typename BlockCipher , typename SinglePassRange , typename OutputAccumulator = typename block::accumulator_set< typename block::modes::isomorphic<BlockCipher, block::nop_padding>::template bind< typename block::modes::isomorphic<BlockCipher, block::nop_padding>::encryption_policy>::type>, typename = typename std::enable_if<detail::is_range<SinglePassRange>::value>::type>
std::enable_if< boost::accumulators::detail::is_accumulator_set< OutputAccumulator >::value, OutputAccumulator >::type & encrypt (const SinglePassRange &r, OutputAccumulator &acc)
 
template<typename CipherMode , typename SinglePassRange , typename OutputAccumulator = typename block::accumulator_set< typename CipherMode::template bind<typename CipherMode::encryption_policy>::type>>
std::enable_if< boost::accumulators::detail::is_accumulator_set< OutputAccumulator >::value, OutputAccumulator >::type & encrypt (const SinglePassRange &r, OutputAccumulator &acc)
 
template<typename StreamCipher , typename SinglePassRange , typename OutputAccumulator = typename stream::stream_accumulator<typename StreamCipher::stream_encrypter_type>>
OutputAccumulator & encrypt (const SinglePassRange &r, OutputAccumulator &acc)
 
template<typename BlockCipher , typename SinglePassRange , typename OutputIterator , typename = typename std::enable_if<detail::is_range<SinglePassRange>::value>::type>
OutputIterator encrypt (const SinglePassRange &rng, const block::cipher_key< BlockCipher > &key, OutputIterator out)
 
template<typename BlockCipher , typename SinglePassRange , typename OutputRange , typename = typename std::enable_if<detail::is_range<SinglePassRange>::value>::type>
OutputRange & encrypt (const SinglePassRange &rng, const block::cipher_key< BlockCipher > &key, OutputRange &out)
 
template<typename CipherMode , typename SinglePassRange , typename KeyPassRange , typename OutputIterator >
OutputIterator encrypt (const SinglePassRange &rng, const KeyPassRange &key, OutputIterator out)
 
template<typename CipherMode , typename SinglePassRange , typename KeyPassRange , typename OutputRange >
OutputRange & encrypt (const SinglePassRange &rng, const KeyPassRange &key, OutputRange &out)
 
template<typename StreamCipher , typename SinglePassRange , typename KeyRange , typename OutputIterator >
OutputIterator encrypt (const SinglePassRange &rng, const KeyRange &key, OutputIterator out)
 
template<typename BlockCipher , typename SinglePassRange , typename KeySinglePassRange , typename OutputIterator , typename = typename std::enable_if<detail::is_range<SinglePassRange>::value>::type>
OutputIterator encrypt (const SinglePassRange &rng, const KeySinglePassRange &key, OutputIterator out)
 
template<typename SchemeMode , typename SinglePassRange , typename KeySinglePassRange , typename OutputIterator >
OutputIterator encrypt (const SinglePassRange &rng, const KeySinglePassRange &key, OutputIterator out)
 
template<typename BlockCipher , typename SinglePassRange , typename KeySinglePassRange , typename OutputRange , typename = typename std::enable_if<detail::is_range<SinglePassRange>::value>::type>
OutputRange & encrypt (const SinglePassRange &rng, const KeySinglePassRange &key, OutputRange &out)
 
template<typename SchemeMode , typename SinglePassRange , typename KeySinglePassRange , typename OutputRange >
OutputRange & encrypt (const SinglePassRange &rng, const KeySinglePassRange &key, OutputRange &out)
 
template<typename Scheme , typename SinglePassRange , typename OutputIterator >
OutputIterator encrypt (const SinglePassRange &rng, const public_key< Scheme > &key, OutputIterator out)
 
template<typename Scheme , typename SinglePassRange , typename OutputRange >
OutputRange & encrypt (const SinglePassRange &rng, const public_key< Scheme > &key, OutputRange &out)
 
template<typename SchemeMode , typename SinglePassRange , typename OutputIterator >
OutputIterator encrypt (const SinglePassRange &rng, const public_key< typename SchemeMode::scheme_type > &key, OutputIterator out)
 
template<typename SchemeMode , typename SinglePassRange , typename OutputRange >
OutputRange & encrypt (const SinglePassRange &rng, const public_key< typename SchemeMode::scheme_type > &key, OutputRange &out)
 
template<typename BlockCipher , typename InputIterator , typename CipherAccumulator = typename block::accumulator_set<typename block::modes::isomorphic< BlockCipher, block::nop_padding>::template bind<block::encryption_policy<BlockCipher>>::type>, typename = typename std::enable_if<detail::is_iterator<InputIterator>::value>::type>
block::detail::range_cipher_impl< block::detail::value_cipher_impl< CipherAccumulator > > encrypt (InputIterator first, InputIterator last, const block::cipher_key< BlockCipher > &key)
 
template<typename BlockCipher , typename InputIterator , typename OutputIterator , typename = typename std::enable_if<detail::is_iterator<InputIterator>::value>::type>
OutputIterator encrypt (InputIterator first, InputIterator last, const block::cipher_key< BlockCipher > &key, OutputIterator out)
 
template<typename BlockCipher , typename InputIterator , typename KeySinglePassRange , typename CipherAccumulator = typename block::accumulator_set<typename block::modes::isomorphic< BlockCipher, block::nop_padding>::template bind<block::encryption_policy<BlockCipher>>::type>, typename = typename std::enable_if<detail::is_iterator<InputIterator>::value>::type>
block::detail::range_cipher_impl< block::detail::value_cipher_impl< CipherAccumulator > > encrypt (InputIterator first, InputIterator last, const KeySinglePassRange &key)
 
template<typename CipherMode , typename InputIterator , typename KeySinglePassRange , typename CipherAccumulator = typename block::accumulator_set< typename CipherMode::template bind<block::encryption_policy<CipherMode>>::type>>
block::detail::range_cipher_impl< block::detail::value_cipher_impl< CipherAccumulator > > encrypt (InputIterator first, InputIterator last, const KeySinglePassRange &key)
 
template<typename SchemeMode , typename InputIterator , typename KeySinglePassRange , typename SchemeAccumulator = typename pubkey::accumulator_set<typename SchemeMode::template bind< pubkey::encryption_policy<typename SchemeMode::scheme_type>>::type>>
pubkey::detail::range_scheme_impl< pubkey::detail::value_scheme_impl< SchemeAccumulator > > encrypt (InputIterator first, InputIterator last, const KeySinglePassRange &key)
 
template<typename BlockCipher , typename InputIterator , typename KeySinglePassRange , typename OutputIterator , typename = typename std::enable_if<detail::is_iterator<InputIterator>::value>::type>
OutputIterator encrypt (InputIterator first, InputIterator last, const KeySinglePassRange &key, OutputIterator out)
 
template<typename CipherMode , typename InputIterator , typename KeySinglePassRange , typename OutputIterator >
OutputIterator encrypt (InputIterator first, InputIterator last, const KeySinglePassRange &key, OutputIterator out)
 
template<typename Scheme , typename InputIterator , typename SchemeAccumulator = typename pubkey::accumulator_set<typename pubkey::modes::isomorphic< Scheme, pubkey::nop_padding>::template bind<pubkey::encryption_policy<Scheme>>::type>>
pubkey::detail::range_scheme_impl< pubkey::detail::value_scheme_impl< SchemeAccumulator > > encrypt (InputIterator first, InputIterator last, const public_key< Scheme > &key)
 
template<typename Scheme , typename InputIterator , typename OutputIterator >
OutputIterator encrypt (InputIterator first, InputIterator last, const public_key< Scheme > &key, OutputIterator out)
 
template<typename SchemeMode , typename InputIterator , typename SchemeAccumulator = typename pubkey::accumulator_set<typename SchemeMode::template bind< pubkey::encryption_policy<typename SchemeMode::scheme_type>>::type>>
pubkey::detail::range_scheme_impl< pubkey::detail::value_scheme_impl< SchemeAccumulator > > encrypt (InputIterator first, InputIterator last, const public_key< typename SchemeMode::scheme_type > &key)
 
template<typename SchemeMode , typename InputIterator , typename OutputIterator >
OutputIterator encrypt (InputIterator first, InputIterator last, const public_key< typename SchemeMode::scheme_type > &key, OutputIterator out)
 
template<typename BlockCipher , typename InputIterator , typename KeyInputIterator , typename CipherAccumulator = typename block::accumulator_set<typename block::modes::isomorphic< BlockCipher, block::nop_padding>::template bind<block::encryption_policy<BlockCipher>>::type>, typename = typename std::enable_if<detail::is_iterator<InputIterator>::value>::type>
block::detail::range_cipher_impl< block::detail::value_cipher_impl< CipherAccumulator > > encrypt (InputIterator first, InputIterator last, KeyInputIterator key_first, KeyInputIterator key_last)
 
template<typename CipherMode , typename InputIterator , typename KeyInputIterator , typename CipherAccumulator = typename block::accumulator_set< typename CipherMode::template bind<block::encryption_policy<CipherMode>>::type>>
block::detail::range_cipher_impl< block::detail::value_cipher_impl< CipherAccumulator > > encrypt (InputIterator first, InputIterator last, KeyInputIterator key_first, KeyInputIterator key_last)
 
template<typename SchemeMode , typename InputIterator , typename KeyInputIterator , typename SchemeAccumulator = typename pubkey::accumulator_set<typename SchemeMode::template bind< pubkey::encryption_policy<typename SchemeMode::scheme_type>>::type>>
pubkey::detail::range_scheme_impl< pubkey::detail::value_scheme_impl< SchemeAccumulator > > encrypt (InputIterator first, InputIterator last, KeyInputIterator key_first, KeyInputIterator key_last)
 
template<typename BlockCipher , typename InputIterator , typename KeyInputIterator , typename OutputIterator , typename = typename std::enable_if<detail::is_iterator<InputIterator>::value>::type>
OutputIterator encrypt (InputIterator first, InputIterator last, KeyInputIterator key_first, KeyInputIterator key_last, OutputIterator out)
 
template<typename CipherMode , typename InputIterator , typename KeyInputIterator , typename OutputIterator >
OutputIterator encrypt (InputIterator first, InputIterator last, KeyInputIterator key_first, KeyInputIterator key_last, OutputIterator out)
 
template<typename StreamCipher , typename InputIterator , typename KeyIterator , typename CipherAccumulator = typename stream::stream_accumulator<typename StreamCipher::stream_encrypter_type>>
stream::detail::range_cipher_impl< stream::detail::value_cipher_impl< CipherAccumulator > > encrypt (InputIterator first, InputIterator last, KeyIterator key_first, KeyIterator key_last)
 
template<typename StreamCipher , typename InputIterator , typename KeyIterator , typename OutputIterator >
OutputIterator encrypt (InputIterator first, InputIterator last, KeyIterator key_first, KeyIterator key_last, OutputIterator out)
 
template<typename BlockCipher , typename InputIterator , typename OutputAccumulator = typename block::accumulator_set<typename block::modes::isomorphic< BlockCipher, block::nop_padding>::template bind<block::encryption_policy<BlockCipher>>::type>, typename = typename std::enable_if<detail::is_iterator<InputIterator>::value>::type>
std::enable_if< boost::accumulators::detail::is_accumulator_set< OutputAccumulator >::value, OutputAccumulator >::type & encrypt (InputIterator first, InputIterator last, OutputAccumulator &acc)
 
template<typename CipherMode , typename InputIterator , typename OutputAccumulator = typename block::accumulator_set< typename CipherMode::template bind<block::encryption_policy<CipherMode>>::type>>
std::enable_if< boost::accumulators::detail::is_accumulator_set< OutputAccumulator >::value, OutputAccumulator >::type & encrypt (InputIterator first, InputIterator last, OutputAccumulator &acc)
 
template<typename StreamCipher , typename InputIterator , typename OutputAccumulator = typename stream::stream_accumulator<typename StreamCipher::stream_encrypter_type>>
OutputAccumulator & encrypt (InputIterator first, InputIterator last, OutputAccumulator &acc)
 
secure_vector< gf2m > find_roots_gf2m_decomp (const polyn_gf2m &polyn, uint32_t code_length)
 
void ge_add (ge_p1p1 *r, const ge_p3 *p, const ge_cached *q)
 
void ge_double_scalarmult_vartime (uint8_t out[32], const uint8_t a[], const ge_p3 *A, const uint8_t b[])
 
int ge_frombytes_negate_vartime (ge_p3 *, const uint8_t *)
 
void ge_madd (ge_p1p1 *r, const ge_p3 *p, const ge_precomp *q)
 
void ge_msub (ge_p1p1 *r, const ge_p3 *p, const ge_precomp *q)
 
void ge_p1p1_to_p2 (ge_p2 *r, const ge_p1p1 *p)
 
void ge_p1p1_to_p3 (ge_p3 *r, const ge_p1p1 *p)
 
void ge_p2_0 (ge_p2 *h)
 
void ge_p2_dbl (ge_p1p1 *r, const ge_p2 *p)
 
void ge_p3_0 (ge_p3 *h)
 
void ge_p3_dbl (ge_p1p1 *r, const ge_p3 *p)
 
void ge_p3_to_cached (ge_cached *r, const ge_p3 *p)
 
void ge_scalarmult_base (uint8_t out[32], const uint8_t in[32])
 
void ge_sub (ge_p1p1 *r, const ge_p3 *p, const ge_cached *q)
 
void ge_tobytes (uint8_t *s, const ge_p2 *h)
 
template<typename UniformRandomGenerator >
std::string generate_bcrypt (const std::string &password, UniformRandomGenerator &rng, uint16_t work_factor=10)
 
mceliece_private_key generate_mceliece_key (random_number_generator &rng, uint32_t ext_deg, uint32_t code_length, uint32_t t)
 
template<typename Hash , typename SinglePassRange , typename HashAccumulator = accumulator_set<Hash>>
hashes::detail::range_hash_impl< hashes::detail::value_hash_impl< HashAccumulator > > hash (const SinglePassRange &r)
 
template<typename Hash , typename SinglePassRange , typename HashAccumulator = accumulator_set<Hash>>
std::enable_if< boost::accumulators::detail::is_accumulator_set< HashAccumulator >::value, HashAccumulator >::type & hash (const SinglePassRange &rng, HashAccumulator &sh)
 
template<typename Hash , typename SinglePassRange , typename OutputIterator >
std::enable_if<::nil::crypto3::detail::is_iterator< OutputIterator >::value, OutputIterator >::type hash (const SinglePassRange &rng, OutputIterator out)
 
template<typename Hash , typename InputIterator , typename HashAccumulator = accumulator_set<Hash>>
hashes::detail::range_hash_impl< hashes::detail::value_hash_impl< typename std::enable_if< boost::accumulators::detail::is_accumulator_set< HashAccumulator >::value, HashAccumulator >::type > > hash (InputIterator first, InputIterator last)
 
template<typename Hash , typename InputIterator , typename HashAccumulator = accumulator_set<Hash>>
std::enable_if< boost::accumulators::detail::is_accumulator_set< HashAccumulator >::value, HashAccumulator >::type & hash (InputIterator first, InputIterator last, HashAccumulator &sh)
 
template<typename Hash , typename InputIterator , typename OutputIterator >
std::enable_if<!boost::accumulators::detail::is_accumulator_set< OutputIterator >::value, OutputIterator >::type hash (InputIterator first, InputIterator last, OutputIterator out)
 
void initialize_allocator ()
 
template<typename SchemeMode , typename SinglePassRange , typename KeySinglePassRange , typename SchemeAccumulator = typename pubkey::accumulator_set<typename SchemeMode::template bind< pubkey::kem_decryption_policy<typename SchemeMode::scheme_type>>::type>>
pubkey::detail::range_scheme_impl< pubkey::detail::value_scheme_impl< SchemeAccumulator > > kem_decrypt (const SinglePassRange &r, const KeySinglePassRange &key)
 
template<typename Scheme , typename SinglePassRange , typename SchemeAccumulator = typename pubkey::accumulator_set<typename pubkey::modes::isomorphic< Scheme, pubkey::nop_padding>::template bind<pubkey::kem_decryption_policy<Scheme>>::type>>
pubkey::detail::range_scheme_impl< pubkey::detail::value_scheme_impl< SchemeAccumulator > > kem_decrypt (const SinglePassRange &r, const private_key< Scheme > &key)
 
template<typename SchemeMode , typename SinglePassRange , typename SchemeAccumulator = typename pubkey::accumulator_set<typename SchemeMode::template bind< pubkey::kem_decryption_policy<typename SchemeMode::scheme_type>>::type>>
pubkey::detail::range_scheme_impl< pubkey::detail::value_scheme_impl< SchemeAccumulator > > kem_decrypt (const SinglePassRange &r, const private_key< typename SchemeMode::scheme_type > &key)
 
template<typename SchemeMode , typename SinglePassRange , typename OutputAccumulator = typename pubkey::accumulator_set< typename SchemeMode::template bind<typename SchemeMode::kem_decryption_policy>::type>>
std::enable_if< boost::accumulators::detail::is_accumulator_set< OutputAccumulator >::value, OutputAccumulator >::type & kem_decrypt (const SinglePassRange &r, OutputAccumulator &acc)
 
template<typename SchemeMode , typename SinglePassRange , typename KeySinglePassRange , typename OutputIterator >
OutputIterator kem_decrypt (const SinglePassRange &rng, const KeySinglePassRange &key, OutputIterator out)
 
template<typename SchemeMode , typename SinglePassRange , typename KeySinglePassRange , typename OutputRange >
OutputRange & kem_decrypt (const SinglePassRange &rng, const KeySinglePassRange &key, OutputRange &out)
 
template<typename Scheme , typename SinglePassRange , typename OutputIterator >
OutputIterator kem_decrypt (const SinglePassRange &rng, const private_key< Scheme > &key, OutputIterator out)
 
template<typename Scheme , typename SinglePassRange , typename OutputRange >
OutputRange & kem_decrypt (const SinglePassRange &rng, const private_key< Scheme > &key, OutputRange &out)
 
template<typename SchemeMode , typename SinglePassRange , typename OutputIterator >
OutputIterator kem_decrypt (const SinglePassRange &rng, const private_key< typename SchemeMode::scheme_type > &key, OutputIterator out)
 
template<typename SchemeMode , typename SinglePassRange , typename OutputRange >
OutputRange & kem_decrypt (const SinglePassRange &rng, const private_key< typename SchemeMode::scheme_type > &key, OutputRange &out)
 
template<typename SchemeMode , typename InputIterator , typename KeySinglePassRange , typename SchemeAccumulator = typename pubkey::accumulator_set<typename SchemeMode::template bind< pubkey::kem_decryption_policy<typename SchemeMode::scheme_type>>::type>>
pubkey::detail::range_scheme_impl< pubkey::detail::value_scheme_impl< SchemeAccumulator > > kem_decrypt (InputIterator first, InputIterator last, const KeySinglePassRange &key)
 
template<typename SchemeMode , typename InputIterator , typename KeySinglePassRange , typename OutputIterator >
OutputIterator kem_decrypt (InputIterator first, InputIterator last, const KeySinglePassRange &key, OutputIterator out)
 
template<typename Scheme , typename InputIterator , typename SchemeAccumulator = typename pubkey::accumulator_set<typename pubkey::modes::isomorphic< Scheme, pubkey::nop_padding>::template bind<pubkey::kem_decryption_policy<Scheme>>::type>>
pubkey::detail::range_scheme_impl< pubkey::detail::value_scheme_impl< SchemeAccumulator > > kem_decrypt (InputIterator first, InputIterator last, const private_key< Scheme > &key)
 
template<typename Scheme , typename InputIterator , typename OutputIterator >
OutputIterator kem_decrypt (InputIterator first, InputIterator last, const private_key< Scheme > &key, OutputIterator out)
 
template<typename SchemeMode , typename InputIterator , typename SchemeAccumulator = typename pubkey::accumulator_set<typename SchemeMode::template bind< pubkey::kem_decryption_policy<typename SchemeMode::scheme_type>>::type>>
pubkey::detail::range_scheme_impl< pubkey::detail::value_scheme_impl< SchemeAccumulator > > kem_decrypt (InputIterator first, InputIterator last, const private_key< typename SchemeMode::scheme_type > &key)
 
template<typename SchemeMode , typename InputIterator , typename OutputIterator >
OutputIterator kem_decrypt (InputIterator first, InputIterator last, const private_key< typename SchemeMode::scheme_type > &key, OutputIterator out)
 
template<typename SchemeMode , typename InputIterator , typename KeyInputIterator , typename SchemeAccumulator = typename pubkey::accumulator_set<typename SchemeMode::template bind< pubkey::kem_decryption_policy<typename SchemeMode::scheme_type>>::type>>
pubkey::detail::range_scheme_impl< pubkey::detail::value_scheme_impl< SchemeAccumulator > > kem_decrypt (InputIterator first, InputIterator last, KeyInputIterator key_first, KeyInputIterator key_last)
 
template<typename SchemeMode , typename InputIterator , typename KeyInputIterator , typename OutputIterator >
OutputIterator kem_decrypt (InputIterator first, InputIterator last, KeyInputIterator key_first, KeyInputIterator key_last, OutputIterator out)
 
template<typename SchemeMode , typename InputIterator , typename OutputAccumulator = typename pubkey::accumulator_set<typename SchemeMode::template bind< pubkey::kem_decryption_policy<typename SchemeMode::scheme_type>>::type>>
std::enable_if< boost::accumulators::detail::is_accumulator_set< OutputAccumulator >::value, OutputAccumulator >::type & kem_decrypt (InputIterator first, InputIterator last, OutputAccumulator &acc)
 
template<typename SchemeMode , typename SinglePassRange , typename KeySinglePassRange , typename SchemeAccumulator = typename pubkey::accumulator_set<typename SchemeMode::template bind< pubkey::kem_encryption_policy<typename SchemeMode::scheme_type>>::type>>
pubkey::detail::range_scheme_impl< pubkey::detail::value_scheme_impl< SchemeAccumulator > > kem_encrypt (const SinglePassRange &r, const KeySinglePassRange &key)
 
template<typename Scheme , typename SinglePassRange , typename SchemeAccumulator = typename pubkey::accumulator_set<typename pubkey::modes::isomorphic< Scheme, pubkey::nop_padding>::template bind<pubkey::kem_encryption_policy<Scheme>>::type>>
pubkey::detail::range_scheme_impl< pubkey::detail::value_scheme_impl< SchemeAccumulator > > kem_encrypt (const SinglePassRange &r, const public_key< Scheme > &key)
 
template<typename SchemeMode , typename SinglePassRange , typename SchemeAccumulator = typename pubkey::accumulator_set<typename SchemeMode::template bind< pubkey::kem_encryption_policy<typename SchemeMode::scheme_type>>::type>>
pubkey::detail::range_scheme_impl< pubkey::detail::value_scheme_impl< SchemeAccumulator > > kem_encrypt (const SinglePassRange &r, const public_key< typename SchemeMode::scheme_type > &key)
 
template<typename SchemeMode , typename SinglePassRange , typename OutputAccumulator = typename pubkey::accumulator_set< typename SchemeMode::template bind<typename SchemeMode::kem_encryption_policy>::type>>
std::enable_if< boost::accumulators::detail::is_accumulator_set< OutputAccumulator >::value, OutputAccumulator >::type & kem_encrypt (const SinglePassRange &r, OutputAccumulator &acc)
 
template<typename SchemeMode , typename SinglePassRange , typename KeySinglePassRange , typename OutputIterator >
OutputIterator kem_encrypt (const SinglePassRange &rng, const KeySinglePassRange &key, OutputIterator out)
 
template<typename SchemeMode , typename SinglePassRange , typename KeySinglePassRange , typename OutputRange >
OutputRange & kem_encrypt (const SinglePassRange &rng, const KeySinglePassRange &key, OutputRange &out)
 
template<typename Scheme , typename SinglePassRange , typename OutputIterator >
OutputIterator kem_encrypt (const SinglePassRange &rng, const public_key< Scheme > &key, OutputIterator out)
 
template<typename Scheme , typename SinglePassRange , typename OutputRange >
OutputRange & kem_encrypt (const SinglePassRange &rng, const public_key< Scheme > &key, OutputRange &out)
 
template<typename SchemeMode , typename SinglePassRange , typename OutputIterator >
OutputIterator kem_encrypt (const SinglePassRange &rng, const public_key< typename SchemeMode::scheme_type > &key, OutputIterator out)
 
template<typename SchemeMode , typename SinglePassRange , typename OutputRange >
OutputRange & kem_encrypt (const SinglePassRange &rng, const public_key< typename SchemeMode::scheme_type > &key, OutputRange &out)
 
template<typename SchemeMode , typename InputIterator , typename KeySinglePassRange , typename SchemeAccumulator = typename pubkey::accumulator_set<typename SchemeMode::template bind< pubkey::kem_encryption_policy<typename SchemeMode::scheme_type>>::type>>
pubkey::detail::range_scheme_impl< pubkey::detail::value_scheme_impl< SchemeAccumulator > > kem_encrypt (InputIterator first, InputIterator last, const KeySinglePassRange &key)
 
template<typename SchemeMode , typename InputIterator , typename KeySinglePassRange , typename OutputIterator >
OutputIterator kem_encrypt (InputIterator first, InputIterator last, const KeySinglePassRange &key, OutputIterator out)
 
template<typename Scheme , typename InputIterator , typename SchemeAccumulator = typename pubkey::accumulator_set<typename pubkey::modes::isomorphic< Scheme, pubkey::nop_padding>::template bind<pubkey::kem_encryption_policy<Scheme>>::type>>
pubkey::detail::range_scheme_impl< pubkey::detail::value_scheme_impl< SchemeAccumulator > > kem_encrypt (InputIterator first, InputIterator last, const public_key< Scheme > &key)
 
template<typename Scheme , typename InputIterator , typename OutputIterator >
OutputIterator kem_encrypt (InputIterator first, InputIterator last, const public_key< Scheme > &key, OutputIterator out)
 
template<typename SchemeMode , typename InputIterator , typename SchemeAccumulator = typename pubkey::accumulator_set<typename SchemeMode::template bind< pubkey::kem_encryption_policy<typename SchemeMode::scheme_type>>::type>>
pubkey::detail::range_scheme_impl< pubkey::detail::value_scheme_impl< SchemeAccumulator > > kem_encrypt (InputIterator first, InputIterator last, const public_key< typename SchemeMode::scheme_type > &key)
 
template<typename SchemeMode , typename InputIterator , typename OutputIterator >
OutputIterator kem_encrypt (InputIterator first, InputIterator last, const public_key< typename SchemeMode::scheme_type > &key, OutputIterator out)
 
template<typename SchemeMode , typename InputIterator , typename KeyInputIterator , typename SchemeAccumulator = typename pubkey::accumulator_set<typename SchemeMode::template bind< pubkey::kem_encryption_policy<typename SchemeMode::scheme_type>>::type>>
pubkey::detail::range_scheme_impl< pubkey::detail::value_scheme_impl< SchemeAccumulator > > kem_encrypt (InputIterator first, InputIterator last, KeyInputIterator key_first, KeyInputIterator key_last)
 
template<typename SchemeMode , typename InputIterator , typename KeyInputIterator , typename OutputIterator >
OutputIterator kem_encrypt (InputIterator first, InputIterator last, KeyInputIterator key_first, KeyInputIterator key_last, OutputIterator out)
 
template<typename SchemeMode , typename InputIterator , typename OutputAccumulator = typename pubkey::accumulator_set<typename SchemeMode::template bind< pubkey::kem_encryption_policy<typename SchemeMode::scheme_type>>::type>>
std::enable_if< boost::accumulators::detail::is_accumulator_set< OutputAccumulator >::value, OutputAccumulator >::type & kem_encrypt (InputIterator first, InputIterator last, OutputAccumulator &acc)
 
uint64_t load_3 (const uint8_t in[3])
 
uint64_t load_4 (const uint8_t *in)
 
template<std::size_t N, typename RandomAccessIterator >
std::array< detail::ValueType< RandomAccessIterator >, N > make_array (RandomAccessIterator first, RandomAccessIterator last)
 
secure_vector< uint8_t > mceliece_decrypt (secure_vector< gf2m > &error_pos, const uint8_t *ciphertext, uint32_t ciphertext_len, const mceliece_private_key &key)
 
void mceliece_decrypt (secure_vector< uint8_t > &plaintext_out, secure_vector< uint8_t > &error_mask_out, const secure_vector< uint8_t > &ciphertext, const mceliece_private_key &key)
 
void mceliece_decrypt (secure_vector< uint8_t > &plaintext_out, secure_vector< uint8_t > &error_mask_out, const uint8_t ciphertext[], size_t ciphertext_len, const mceliece_private_key &key)
 
void mceliece_encrypt (secure_vector< uint8_t > &ciphertext_out, secure_vector< uint8_t > &error_mask_out, const secure_vector< uint8_t > &plaintext, const McEliece_PublicKey &key, random_number_generator &rng)
 
template<std::size_t DB>
bool operator!= (char const *b, const static_digest< DB > &a)
 
template<unsigned DB>
bool operator!= (char const *b, digest< DB > const &a)
 
template<unsigned DB1, unsigned DB2>
bool operator!= (const digest< DB1 > &a, const digest< DB2 > &b)
 
template<typename T , typename U >
bool operator!= (const secure_allocator< T > &, const secure_allocator< U > &)
 
template<std::size_t DB>
bool operator!= (const static_digest< DB > &a, char const *b)
 
template<std::size_t DB1, std::size_t DB2>
bool operator!= (const static_digest< DB1 > &a, const static_digest< DB2 > &b)
 
template<unsigned DB>
bool operator!= (digest< DB > const &a, char const *b)
 
template<unsigned DB1, unsigned DB2>
bool operator< (const digest< DB1 > &a, const digest< DB2 > &b)
 
template<std::size_t DB1, std::size_t DB2>
bool operator< (const static_digest< DB1 > &a, const static_digest< DB2 > &b)
 
template<std::size_t DigestBits>
std::ostream & operator<< (std::ostream &sink, const static_digest< DigestBits > &d)
 
template<unsigned DB>
std::ostream & operator<< (std::ostream &sink, digest< DB > const &d)
 
template<unsigned DB1, unsigned DB2>
bool operator<= (const digest< DB1 > &a, const digest< DB2 > &b)
 
template<std::size_t DB1, std::size_t DB2>
bool operator<= (const static_digest< DB1 > &a, const static_digest< DB2 > &b)
 
template<std::size_t DB>
bool operator== (char const *b, const static_digest< DB > &a)
 
template<unsigned DB>
bool operator== (char const *b, digest< DB > const &a)
 
template<unsigned DB1, unsigned DB2>
bool operator== (const digest< DB1 > &a, const digest< DB2 > &b)
 
template<typename T , typename U >
bool operator== (const secure_allocator< T > &, const secure_allocator< U > &)
 
template<std::size_t DB>
bool operator== (const static_digest< DB > &a, char const *b)
 
template<std::size_t DB1, std::size_t DB2>
bool operator== (const static_digest< DB1 > &a, const static_digest< DB2 > &b)
 
template<unsigned DB>
bool operator== (digest< DB > const &a, char const *b)
 
template<unsigned DB1, unsigned DB2>
bool operator> (const digest< DB1 > &a, const digest< DB2 > &b)
 
template<std::size_t DB1, std::size_t DB2>
bool operator> (const static_digest< DB1 > &a, const static_digest< DB2 > &b)
 
template<unsigned DB1, unsigned DB2>
bool operator>= (const digest< DB1 > &a, const digest< DB2 > &b)
 
template<std::size_t DB1, std::size_t DB2>
bool operator>= (const static_digest< DB1 > &a, const static_digest< DB2 > &b)
 
template<unsigned DB>
std::istream & operator>> (std::istream &source, digest< DB > &d)
 
template<std::size_t DigestBits>
std::istream & operator>> (std::istream &source, static_digest< DigestBits > &d)
 
template<typename Alloc , typename Alloc2 >
std::vector< uint8_t, Alloc > & operator^= (std::vector< uint8_t, Alloc > &out, const std::vector< uint8_t, Alloc2 > &in)
 
template<typename Container >
void poly_double_n (const Container &c)
 
template<typename InputIterator >
void poly_double_n (uint8_t out[], InputIterator first, InputIterator last)
 
template<typename InputIterator >
void poly_double_n_le (uint8_t out[], InputIterator first, InputIterator last)
 
constexpr bool poly_double_supported_size (size_t n)
 
gf2m random_code_element (unsigned code_length, random_number_generator &rng)
 
gf2m random_code_element (unsigned code_length, RandomNumberGenerator &rng)
 
gf2m random_gf2m (random_number_generator &rng)
 
gf2m random_gf2m (RandomNumberGenerator &rng)
 
template<typename SchemeMode , typename SinglePassRange , typename KeySinglePassRange , typename SchemeAccumulator = typename pubkey::accumulator_set<typename SchemeMode::template bind< pubkey::recovery_policy<typename SchemeMode::scheme_type>>::type>>
pubkey::detail::range_scheme_impl< pubkey::detail::value_scheme_impl< SchemeAccumulator > > recover (const SinglePassRange &r, const KeySinglePassRange &key)
 
template<typename SchemeMode , typename SinglePassRange , typename SchemeAccumulator = typename pubkey::accumulator_set<typename SchemeMode::template bind< pubkey::recovery_policy<typename SchemeMode::scheme_type>>::type>>
pubkey::detail::range_scheme_impl< pubkey::detail::value_scheme_impl< SchemeAccumulator > > recover (const SinglePassRange &r, const public_key< typename SchemeMode::scheme_type > &key)
 
template<typename SchemeMode , typename SinglePassRange , typename OutputAccumulator = typename pubkey::accumulator_set< typename SchemeMode::template bind<typename SchemeMode::recovery_policy>::type>>
std::enable_if< boost::accumulators::detail::is_accumulator_set< OutputAccumulator >::value, OutputAccumulator >::type & recover (const SinglePassRange &r, OutputAccumulator &acc)
 
template<typename SchemeMode , typename SinglePassRange , typename KeySinglePassRange , typename OutputIterator >
OutputIterator recover (const SinglePassRange &rng, const KeySinglePassRange &key, OutputIterator out)
 
template<typename SchemeMode , typename SinglePassRange , typename KeySinglePassRange , typename OutputRange >
OutputRange & recover (const SinglePassRange &rng, const KeySinglePassRange &key, OutputRange &out)
 
template<typename SchemeMode , typename SinglePassRange , typename OutputIterator >
OutputIterator recover (const SinglePassRange &rng, const public_key< typename SchemeMode::scheme_type > &key, OutputIterator out)
 
template<typename SchemeMode , typename SinglePassRange , typename OutputRange >
OutputRange & recover (const SinglePassRange &rng, const public_key< typename SchemeMode::scheme_type > &key, OutputRange &out)
 
template<typename SchemeMode , typename InputIterator , typename KeySinglePassRange , typename SchemeAccumulator = typename pubkey::accumulator_set<typename SchemeMode::template bind< pubkey::recovery_policy<typename SchemeMode::scheme_type>>::type>>
pubkey::detail::range_scheme_impl< pubkey::detail::value_scheme_impl< SchemeAccumulator > > recover (InputIterator first, InputIterator last, const KeySinglePassRange &key)
 
template<typename SchemeMode , typename InputIterator , typename KeySinglePassRange , typename OutputIterator >
OutputIterator recover (InputIterator first, InputIterator last, const KeySinglePassRange &key, OutputIterator out)
 
template<typename SchemeMode , typename InputIterator , typename SchemeAccumulator = typename pubkey::accumulator_set<typename SchemeMode::template bind< pubkey::recovery_policy<typename SchemeMode::scheme_type>>::type>>
pubkey::detail::range_scheme_impl< pubkey::detail::value_scheme_impl< SchemeAccumulator > > recover (InputIterator first, InputIterator last, const public_key< typename SchemeMode::scheme_type > &key)
 
template<typename SchemeMode , typename InputIterator , typename OutputIterator >
OutputIterator recover (InputIterator first, InputIterator last, const public_key< typename SchemeMode::scheme_type > &key, OutputIterator out)
 
template<typename SchemeMode , typename InputIterator , typename KeyInputIterator , typename SchemeAccumulator = typename pubkey::accumulator_set<typename SchemeMode::template bind< pubkey::recovery_policy<typename SchemeMode::scheme_type>>::type>>
pubkey::detail::range_scheme_impl< pubkey::detail::value_scheme_impl< SchemeAccumulator > > recover (InputIterator first, InputIterator last, KeyInputIterator key_first, KeyInputIterator key_last)
 
template<typename SchemeMode , typename InputIterator , typename KeyInputIterator , typename OutputIterator >
OutputIterator recover (InputIterator first, InputIterator last, KeyInputIterator key_first, KeyInputIterator key_last, OutputIterator out)
 
template<typename SchemeMode , typename InputIterator , typename OutputAccumulator = typename pubkey::accumulator_set<typename SchemeMode::template bind< pubkey::recovery_policy<typename SchemeMode::scheme_type>>::type>>
std::enable_if< boost::accumulators::detail::is_accumulator_set< OutputAccumulator >::value, OutputAccumulator >::type & recover (InputIterator first, InputIterator last, OutputAccumulator &acc)
 
void redc_mul (int64_t &s1, int64_t &s2, int64_t &s3, int64_t &s4, int64_t &s5, int64_t &s6, int64_t &X)
 
template<unsigned NewBits, unsigned OldBits>
digest< NewBits > reserve (const boost::container::small_vector< octet_type, OldBits/octet_bits > &od)
 
template<unsigned NewBits, unsigned OldBits>
digest< NewBits > reserve (const digest< OldBits > &od)
 
template<unsigned NewBits, unsigned OldBits>
digest< NewBits > resize (const boost::container::small_vector< octet_type, OldBits/octet_bits > &od)
 
template<std::size_t DigestBits>
digest< DigestBits > resize (const digest< DigestBits > &od, std::size_t new_size)
 
template<std::size_t NewBits, std::size_t OldBits>
static_digest< NewBits > resize (const static_digest< OldBits > &od)
 
template<typename T >
bool same_mem (const T *p1, const T *p2, size_t n)
 
void sc_muladd (uint8_t *, const uint8_t *, const uint8_t *, const uint8_t *)
 
void sc_reduce (uint8_t *)
 
void secure_scrub_memory (void *ptr, size_t n)
 
template<typename StreamCipher , typename SinglePassRange , typename KeyRange , typename CipherAccumulator = typename stream::stream_accumulator<typename StreamCipher::stream_encrypter_type>>
stream::detail::range_cipher_impl< stream::detail::value_cipher_impl< CipherAccumulator > > seek (const SinglePassRange &r, const KeyRange &key)
 
template<typename StreamCipher , typename SinglePassRange , typename OutputAccumulator = typename stream::stream_accumulator<typename StreamCipher::stream_encrypter_type>>
OutputAccumulator & seek (const SinglePassRange &r, OutputAccumulator &acc)
 
template<typename StreamCipher , typename SinglePassRange , typename KeyRange , typename OutputIterator >
OutputIterator seek (const SinglePassRange &rng, const KeyRange &key, OutputIterator out)
 
template<typename StreamCipher , typename InputIterator , typename KeyIterator , typename CipherAccumulator = typename stream::stream_accumulator<typename StreamCipher::stream_encrypter_type>>
stream::detail::range_cipher_impl< stream::detail::value_cipher_impl< CipherAccumulator > > seek (InputIterator first, InputIterator last, KeyIterator key_first, KeyIterator key_last)
 
template<typename StreamCipher , typename InputIterator , typename KeyIterator , typename OutputIterator >
OutputIterator seek (InputIterator first, InputIterator last, KeyIterator key_first, KeyIterator key_last, OutputIterator out)
 
template<typename StreamCipher , typename InputIterator , typename OutputAccumulator = typename stream::stream_accumulator<typename StreamCipher::stream_encrypter_type>>
OutputAccumulator & seek (InputIterator first, InputIterator last, OutputAccumulator &acc)
 
template<typename T >
void set_mem (T *ptr, size_t n, uint8_t val)
 
template<typename SchemeMode , typename SinglePassRange , typename KeySinglePassRange , typename SchemeAccumulator = typename pubkey::accumulator_set<typename SchemeMode::template bind< pubkey::signing_policy<typename SchemeMode::scheme_type>>::type>>
pubkey::detail::range_scheme_impl< pubkey::detail::value_scheme_impl< SchemeAccumulator > > sign (const SinglePassRange &r, const KeySinglePassRange &key)
 
template<typename Scheme , typename SinglePassRange , typename SchemeAccumulator = typename pubkey::accumulator_set<typename pubkey::modes::isomorphic< Scheme, pubkey::nop_padding>::template bind<pubkey::signing_policy<Scheme>>::type>>
pubkey::detail::range_scheme_impl< pubkey::detail::value_scheme_impl< SchemeAccumulator > > sign (const SinglePassRange &r, const private_key< Scheme > &key)
 
template<typename SchemeMode , typename SinglePassRange , typename SchemeAccumulator = typename pubkey::accumulator_set<typename SchemeMode::template bind< pubkey::signing_policy<typename SchemeMode::scheme_type>>::type>>
pubkey::detail::range_scheme_impl< pubkey::detail::value_scheme_impl< SchemeAccumulator > > sign (const SinglePassRange &r, const private_key< typename SchemeMode::scheme_type > &key)
 
template<typename SchemeMode , typename SinglePassRange , typename OutputAccumulator = typename pubkey::accumulator_set< typename SchemeMode::template bind<typename SchemeMode::signing_policy>::type>>
std::enable_if< boost::accumulators::detail::is_accumulator_set< OutputAccumulator >::value, OutputAccumulator >::type & sign (const SinglePassRange &r, OutputAccumulator &acc)
 
template<typename SchemeMode , typename SinglePassRange , typename KeySinglePassRange , typename OutputIterator >
OutputIterator sign (const SinglePassRange &rng, const KeySinglePassRange &key, OutputIterator out)
 
template<typename SchemeMode , typename SinglePassRange , typename KeySinglePassRange , typename OutputRange >
OutputRange & sign (const SinglePassRange &rng, const KeySinglePassRange &key, OutputRange &out)
 
template<typename Scheme , typename SinglePassRange , typename OutputIterator >
OutputIterator sign (const SinglePassRange &rng, const private_key< Scheme > &key, OutputIterator out)
 
template<typename Scheme , typename SinglePassRange , typename OutputRange >
OutputRange & sign (const SinglePassRange &rng, const private_key< Scheme > &key, OutputRange &out)
 
template<typename SchemeMode , typename SinglePassRange , typename OutputIterator >
OutputIterator sign (const SinglePassRange &rng, const private_key< typename SchemeMode::scheme_type > &key, OutputIterator out)
 
template<typename SchemeMode , typename SinglePassRange , typename OutputRange >
OutputRange & sign (const SinglePassRange &rng, const private_key< typename SchemeMode::scheme_type > &key, OutputRange &out)
 
template<typename SchemeMode , typename InputIterator , typename KeySinglePassRange , typename SchemeAccumulator = typename pubkey::accumulator_set<typename SchemeMode::template bind< pubkey::signing_policy<typename SchemeMode::scheme_type>>::type>>
pubkey::detail::range_scheme_impl< pubkey::detail::value_scheme_impl< SchemeAccumulator > > sign (InputIterator first, InputIterator last, const KeySinglePassRange &key)
 
template<typename SchemeMode , typename InputIterator , typename KeySinglePassRange , typename OutputIterator >
OutputIterator sign (InputIterator first, InputIterator last, const KeySinglePassRange &key, OutputIterator out)
 
template<typename Scheme , typename InputIterator , typename SchemeAccumulator = typename pubkey::accumulator_set<typename pubkey::modes::isomorphic< Scheme, pubkey::nop_padding>::template bind<pubkey::signing_policy<Scheme>>::type>>
pubkey::detail::range_scheme_impl< pubkey::detail::value_scheme_impl< SchemeAccumulator > > sign (InputIterator first, InputIterator last, const private_key< Scheme > &key)
 
template<typename Scheme , typename InputIterator , typename OutputIterator >
OutputIterator sign (InputIterator first, InputIterator last, const private_key< Scheme > &key, OutputIterator out)
 
template<typename SchemeMode , typename InputIterator , typename SchemeAccumulator = typename pubkey::accumulator_set<typename SchemeMode::template bind< pubkey::signing_policy<typename SchemeMode::scheme_type>>::type>>
pubkey::detail::range_scheme_impl< pubkey::detail::value_scheme_impl< SchemeAccumulator > > sign (InputIterator first, InputIterator last, const private_key< typename SchemeMode::scheme_type > &key)
 
template<typename SchemeMode , typename InputIterator , typename OutputIterator >
OutputIterator sign (InputIterator first, InputIterator last, const private_key< typename SchemeMode::scheme_type > &key, OutputIterator out)
 
template<typename SchemeMode , typename InputIterator , typename KeyInputIterator , typename SchemeAccumulator = typename pubkey::accumulator_set<typename SchemeMode::template bind< pubkey::signing_policy<typename SchemeMode::scheme_type>>::type>>
pubkey::detail::range_scheme_impl< pubkey::detail::value_scheme_impl< SchemeAccumulator > > sign (InputIterator first, InputIterator last, KeyInputIterator key_first, KeyInputIterator key_last)
 
template<typename SchemeMode , typename InputIterator , typename KeyInputIterator , typename OutputIterator >
OutputIterator sign (InputIterator first, InputIterator last, KeyInputIterator key_first, KeyInputIterator key_last, OutputIterator out)
 
template<typename SchemeMode , typename InputIterator , typename OutputAccumulator = typename pubkey::accumulator_set<typename SchemeMode::template bind< pubkey::signing_policy<typename SchemeMode::scheme_type>>::type>>
std::enable_if< boost::accumulators::detail::is_accumulator_set< OutputAccumulator >::value, OutputAccumulator >::type & sign (InputIterator first, InputIterator last, OutputAccumulator &acc)
 
void slide (int8_t *r, const uint8_t *a)
 
std::vector< polyn_gf2msyndrome_init (polyn_gf2m const &generator, std::vector< gf2m > const &support, int n)
 
template<unsigned NewBits, unsigned OldBits>
digest< NewBits > truncate (const boost::container::small_vector< octet_type, OldBits/octet_bits > &od)
 
template<unsigned NewBits, unsigned OldBits>
digest< NewBits > truncate (const digest< OldBits > &od)
 
template<std::size_t NewBits, std::size_t OldBits>
static_digest< NewBits > truncate (const static_digest< OldBits > &od)
 
template<typename SchemeMode , typename SinglePassRange , typename KeySinglePassRange , typename SchemeAccumulator = typename pubkey::accumulator_set<typename SchemeMode::template bind< pubkey::verification_policy<typename SchemeMode::scheme_type>>::type>>
pubkey::detail::range_scheme_impl< pubkey::detail::value_scheme_impl< SchemeAccumulator > > verify (const SinglePassRange &r, const KeySinglePassRange &key)
 
template<typename Scheme , typename SinglePassRange , typename SchemeAccumulator = typename pubkey::accumulator_set<typename pubkey::modes::isomorphic< Scheme, pubkey::nop_padding>::template bind<pubkey::verifying_policy<Scheme>>::type>>
pubkey::detail::range_scheme_impl< pubkey::detail::value_scheme_impl< SchemeAccumulator > > verify (const SinglePassRange &r, const public_key< Scheme > &key)
 
template<typename SchemeMode , typename SinglePassRange , typename SchemeAccumulator = typename pubkey::accumulator_set<typename SchemeMode::template bind< pubkey::verification_policy<typename SchemeMode::scheme_type>>::type>>
pubkey::detail::range_scheme_impl< pubkey::detail::value_scheme_impl< SchemeAccumulator > > verify (const SinglePassRange &r, const public_key< typename SchemeMode::scheme_type > &key)
 
template<typename SchemeMode , typename SinglePassRange , typename OutputAccumulator = typename pubkey::accumulator_set< typename SchemeMode::template bind<typename SchemeMode::verification_policy>::type>>
std::enable_if< boost::accumulators::detail::is_accumulator_set< OutputAccumulator >::value, OutputAccumulator >::type & verify (const SinglePassRange &r, OutputAccumulator &acc)
 
template<typename SchemeMode , typename SinglePassRange , typename KeySinglePassRange , typename OutputIterator >
OutputIterator verify (const SinglePassRange &rng, const KeySinglePassRange &key, OutputIterator out)
 
template<typename SchemeMode , typename SinglePassRange , typename KeySinglePassRange , typename OutputRange >
OutputRange & verify (const SinglePassRange &rng, const KeySinglePassRange &key, OutputRange &out)
 
template<typename Scheme , typename SinglePassRange , typename OutputIterator >
OutputIterator verify (const SinglePassRange &rng, const public_key< Scheme > &key, OutputIterator out)
 
template<typename Scheme , typename SinglePassRange , typename OutputRange >
OutputRange & verify (const SinglePassRange &rng, const public_key< Scheme > &key, OutputRange &out)
 
template<typename SchemeMode , typename SinglePassRange , typename OutputIterator >
OutputIterator verify (const SinglePassRange &rng, const public_key< typename SchemeMode::scheme_type > &key, OutputIterator out)
 
template<typename SchemeMode , typename SinglePassRange , typename OutputRange >
OutputRange & verify (const SinglePassRange &rng, const public_key< typename SchemeMode::scheme_type > &key, OutputRange &out)
 
template<typename SchemeMode , typename InputIterator , typename KeySinglePassRange , typename SchemeAccumulator = typename pubkey::accumulator_set<typename SchemeMode::template bind< pubkey::verification_policy<typename SchemeMode::scheme_type>>::type>>
pubkey::detail::range_scheme_impl< pubkey::detail::value_scheme_impl< SchemeAccumulator > > verify (InputIterator first, InputIterator last, const KeySinglePassRange &key)
 
template<typename SchemeMode , typename InputIterator , typename KeySinglePassRange , typename OutputIterator >
OutputIterator verify (InputIterator first, InputIterator last, const KeySinglePassRange &key, OutputIterator out)
 
template<typename Scheme , typename InputIterator , typename SchemeAccumulator = typename pubkey::accumulator_set<typename pubkey::modes::isomorphic< Scheme, pubkey::nop_padding>::template bind<pubkey::verifying_policy<Scheme>>::type>>
pubkey::detail::range_scheme_impl< pubkey::detail::value_scheme_impl< SchemeAccumulator > > verify (InputIterator first, InputIterator last, const public_key< Scheme > &key)
 
template<typename Scheme , typename InputIterator , typename OutputIterator >
OutputIterator verify (InputIterator first, InputIterator last, const public_key< Scheme > &key, OutputIterator out)
 
template<typename SchemeMode , typename InputIterator , typename SchemeAccumulator = typename pubkey::accumulator_set<typename SchemeMode::template bind< pubkey::verification_policy<typename SchemeMode::scheme_type>>::type>>
pubkey::detail::range_scheme_impl< pubkey::detail::value_scheme_impl< SchemeAccumulator > > verify (InputIterator first, InputIterator last, const public_key< typename SchemeMode::scheme_type > &key)
 
template<typename SchemeMode , typename InputIterator , typename OutputIterator >
OutputIterator verify (InputIterator first, InputIterator last, const public_key< typename SchemeMode::scheme_type > &key, OutputIterator out)
 
template<typename SchemeMode , typename InputIterator , typename KeyInputIterator , typename SchemeAccumulator = typename pubkey::accumulator_set<typename SchemeMode::template bind< pubkey::verification_policy<typename SchemeMode::scheme_type>>::type>>
pubkey::detail::range_scheme_impl< pubkey::detail::value_scheme_impl< SchemeAccumulator > > verify (InputIterator first, InputIterator last, KeyInputIterator key_first, KeyInputIterator key_last)
 
template<typename SchemeMode , typename InputIterator , typename KeyInputIterator , typename OutputIterator >
OutputIterator verify (InputIterator first, InputIterator last, KeyInputIterator key_first, KeyInputIterator key_last, OutputIterator out)
 
template<typename SchemeMode , typename InputIterator , typename OutputAccumulator = typename pubkey::accumulator_set<typename SchemeMode::template bind< pubkey::verification_policy<typename SchemeMode::scheme_type>>::type>>
std::enable_if< boost::accumulators::detail::is_accumulator_set< OutputAccumulator >::value, OutputAccumulator >::type & verify (InputIterator first, InputIterator last, OutputAccumulator &acc)
 
template<typename Alloc , typename Alloc2 >
void xor_buf (std::vector< uint8_t, Alloc > &out, const std::vector< uint8_t, Alloc2 > &in, size_t n)
 
template<typename Alloc , typename Alloc2 >
void xor_buf (std::vector< uint8_t, Alloc > &out, const uint8_t *in, const std::vector< uint8_t, Alloc2 > &in2, size_t n)
 
template<typename Alloc >
void xor_buf (std::vector< uint8_t, Alloc > &out, const uint8_t *in, size_t n)
 
void xor_buf (uint8_t out[], const uint8_t in[], const uint8_t in2[], size_t length)
 
void xor_buf (uint8_t out[], const uint8_t in[], size_t length)
 

Typedef Documentation

◆ accumulator_set

template<typename Hash , typename = typename std::enable_if<detail::is_hash<Hash>::value>::type>
using nil::crypto3::accumulator_set = typedef boost::accumulators::accumulator_set<static_digest<Hash::digest_bits>, boost::accumulators::features<accumulators::tag::hash<Hash> >, std::size_t>

◆ digest

template<std::size_t DigestBits>
using nil::crypto3::digest = typedef boost::container::small_vector<octet_type, DigestBits / octet_bits>

The digest class template stores a DigestBits-bit message digest as a sequence of 8-bit octets. Octets are stored in the smallest unsigned type able to hold 8 bits, hereinafter referred to as octet_type. DigestBits must be a multiple of 8.

It is independent of any particular algorithm; For example sha2<224> and cubehash<224> both produce a digest<224>. Each algorithm generates its digest such that it will be displayed in the canonical order for that algorithm. The truncate and resize function templates are provided to handle digests with lengths other than you're expecting. For instance, generating name-based UUIDs uses only 128 bits but SHA-1 provides a 160-bit digest, so it would be truncated. (Using truncate instead of resize means that a compilation error will result from trying to use a hash algorithm with too small an output.) On the other hand, for storing as much as possible of the results of various algorithms, resize allows you to pad them out to a large size, such as a digest<512>.

digest<DigestBits> derives publicly from std::array<octet_type, DigestBits/8> and supports all of its operations in order to provide direct access to the contained octets. Note that a digest is not an aggregate; A default-constructed digest has all its contained octets set to zero. The base_array() member function provides a reference to the std::array sub-object.

digests with different numbers of bits may be compared. For the comparison, the smaller is considered as though it were padded with 0s out to the size of the larger. The operator< provides a strict total order. For convenience, equality comparison with narrow c-style strings is also provided.

Always stored internally as a sequence of octets in display order. This allows digests from different algorithms to have the same type, allowing them to be more easily stored and compared.

Template Parameters
DigestBits

◆ octet_type

typedef boost::uint_t< octet_bits >::least nil::crypto3::octet_type

Enumeration Type Documentation

◆ signature_format

The two types of signature format supported by Botan.

Enumerator
IEEE_1363 
DER_SEQUENCE 

Function Documentation

◆ agree() [1/2]

template<typename SchemeMode , typename SinglePassRange , typename KeySinglePassRange , typename OutputRange >
OutputRange & nil::crypto3::agree ( const SinglePassRange &  rng,
const KeySinglePassRange &  key,
OutputRange &  out 
)
Template Parameters
Scheme
SinglePassRange
KeySinglePassRange
OutputRange
Parameters
rng
key
out
Returns

◆ agree() [2/2]

template<typename SchemeMode , typename InputIterator , typename KeySinglePassRange , typename SchemeAccumulator = typename pubkey::accumulator_set<typename SchemeMode::template bind< pubkey::agreement_policy<typename SchemeMode::scheme_type>>::type>>
pubkey::detail::range_scheme_impl< pubkey::detail::value_scheme_impl< SchemeAccumulator > > nil::crypto3::agree ( InputIterator  first,
InputIterator  last,
const KeySinglePassRange &  key 
)
Template Parameters
Scheme
InputIterator
KeySinglePassRange
SchemeAccumulator
Parameters
first
last
key
Returns

◆ allocate_memory()

BOOST_ATTRIBUTE_MALLOC_FUNCTION void* nil::crypto3::allocate_memory ( size_t  elems,
size_t  elem_size 
)

Allocate a memory buffer by some method. This should only be used for primitive types (uint8_t, uint32_t, etc).

Parameters
elemsthe number of elements
elem_sizethe size of each element
Returns
pointer to allocated and zeroed memory, or throw std::bad_alloc on failure

◆ carry()

template<size_t S, int64_t MUL = 1>
void nil::crypto3::carry ( int64_t &  h0,
int64_t &  h1 
)
inline

◆ carry0() [1/2]

template<size_t S>
void nil::crypto3::carry0 ( int32_t &  h0,
int32_t &  h1 
)
inline

◆ carry0() [2/2]

template<size_t S>
void nil::crypto3::carry0 ( int64_t &  h0,
int64_t &  h1 
)
inline

◆ cast_char_ptr_to_uint8() [1/2]

uint8_t* nil::crypto3::cast_char_ptr_to_uint8 ( char *  s)
inline

◆ cast_char_ptr_to_uint8() [2/2]

const uint8_t* nil::crypto3::cast_char_ptr_to_uint8 ( const char *  s)
inline

◆ cast_uint8_ptr_to_char() [1/2]

const char* nil::crypto3::cast_uint8_ptr_to_char ( const uint8_t *  b)
inline

◆ cast_uint8_ptr_to_char() [2/2]

char* nil::crypto3::cast_uint8_ptr_to_char ( uint8_t *  b)
inline

◆ check_bcrypt()

bool nil::crypto3::check_bcrypt ( const std::string &  password,
const std::string &  hash 
)

Check a previously created password hash

Parameters
passwordthe password to check against
hashthe stored hash to check against

◆ clear_bytes()

void nil::crypto3::clear_bytes ( void *  ptr,
size_t  bytes 
)
inline

Zero out some bytes

Parameters
ptra pointer to memory to zero
bytesthe number of bytes to zero in ptr

◆ clear_mem()

template<typename T >
void nil::crypto3::clear_mem ( T *  ptr,
size_t  n 
)
inline

Zero memory before use. This simply calls memset and should not be used in cases where the compiler cannot see the call as a side-effecting operation (for example, if calling clear_mem before deallocating memory, the compiler would be allowed to omit the call to memset entirely under the as-if rule.)

Parameters
ptra pointer to an array of Ts to zero
nthe number of Ts pointed to by ptr

◆ constant_time_compare()

bool nil::crypto3::constant_time_compare ( const uint8_t  x[],
const uint8_t  y[],
size_t  len 
)

Memory comparison, input insensitive

Parameters
xa pointer to an array
ya pointer to another array
lenthe number of Ts in x and y
Returns
true iff x[i] == y[i] forall i in [0...n)

◆ copy_mem()

template<typename T >
void nil::crypto3::copy_mem ( T *  out,
const T *  in,
size_t  n 
)
inline

Copy memory

Parameters
outthe destination array
inthe source array
nthe number of elements of in/out

◆ deallocate_memory()

void nil::crypto3::deallocate_memory ( void *  p,
size_t  elems,
size_t  elem_size 
)

Free a pointer returned by allocate_memory

Parameters
pthe pointer returned by allocate_memory
elemsthe number of elements, as passed to allocate_memory
elem_sizethe size of each element, as passed to allocate_memory

◆ decrypt() [1/6]

template<typename CipherMode , typename SinglePassRange , typename KeyPassRange , typename OutputRange >
OutputRange& nil::crypto3::decrypt ( const SinglePassRange &  rng,
const KeyPassRange &  key,
OutputRange &  out 
)
Template Parameters
BlockCipher
SinglePassRange
KeyPassRange
OutputRange
Parameters
rng
key
out
Returns

◆ decrypt() [2/6]

template<typename BlockCipher , typename SinglePassRange , typename KeySinglePassRange , typename OutputRange , typename = typename std::enable_if<detail::is_range<SinglePassRange>::value>::type>
OutputRange& nil::crypto3::decrypt ( const SinglePassRange &  rng,
const KeySinglePassRange &  key,
OutputRange &  out 
)
Template Parameters
BlockCipher
SinglePassRange
KeySinglePassRange
OutputRange
Parameters
rng
key
out
Returns

◆ decrypt() [3/6]

template<typename SchemeMode , typename SinglePassRange , typename KeySinglePassRange , typename OutputRange >
OutputRange & nil::crypto3::decrypt ( const SinglePassRange &  rng,
const KeySinglePassRange &  key,
OutputRange &  out 
)
Template Parameters
Scheme
SinglePassRange
KeySinglePassRange
OutputRange
Parameters
rng
key
out
Returns

◆ decrypt() [4/6]

template<typename BlockCipher , typename InputIterator , typename KeySinglePassRange , typename CipherAccumulator = typename block::accumulator_set<typename block::modes::isomorphic< BlockCipher, block::nop_padding>::template bind<block::decryption_policy<BlockCipher>>::type>, typename = typename std::enable_if<detail::is_iterator<InputIterator>::value>::type>
block::detail::range_cipher_impl<block::detail::value_cipher_impl<CipherAccumulator> > nil::crypto3::decrypt ( InputIterator  first,
InputIterator  last,
const KeySinglePassRange &  key 
)
Template Parameters
BlockCipher
InputIterator
KeySinglePassRange
CipherAccumulator
Parameters
first
last
key
Returns

◆ decrypt() [5/6]

template<typename CipherMode , typename InputIterator , typename KeySinglePassRange , typename CipherAccumulator = typename block::accumulator_set< typename CipherMode::template bind<block::decryption_policy<CipherMode>>::type>>
block::detail::range_cipher_impl<block::detail::value_cipher_impl<CipherAccumulator> > nil::crypto3::decrypt ( InputIterator  first,
InputIterator  last,
const KeySinglePassRange &  key 
)
Template Parameters
BlockCipher
InputIterator
KeySinglePassRange
CipherAccumulator
Parameters
first
last
key
Returns

◆ decrypt() [6/6]

template<typename SchemeMode , typename InputIterator , typename KeySinglePassRange , typename SchemeAccumulator = typename pubkey::accumulator_set<typename SchemeMode::template bind< pubkey::decryption_policy<typename SchemeMode::scheme_type>>::type>>
pubkey::detail::range_scheme_impl< pubkey::detail::value_scheme_impl< SchemeAccumulator > > nil::crypto3::decrypt ( InputIterator  first,
InputIterator  last,
const KeySinglePassRange &  key 
)
Template Parameters
Scheme
InputIterator
KeySinglePassRange
SchemeAccumulator
Parameters
first
last
key
Returns

◆ encrypt() [1/6]

template<typename CipherMode , typename SinglePassRange , typename KeyPassRange , typename OutputRange >
OutputRange& nil::crypto3::encrypt ( const SinglePassRange &  rng,
const KeyPassRange &  key,
OutputRange &  out 
)
Template Parameters
BlockCipher
SinglePassRange
KeyPassRange
OutputRange
Parameters
rng
key
out
Returns

◆ encrypt() [2/6]

template<typename BlockCipher , typename SinglePassRange , typename KeySinglePassRange , typename OutputRange , typename = typename std::enable_if<detail::is_range<SinglePassRange>::value>::type>
OutputRange& nil::crypto3::encrypt ( const SinglePassRange &  rng,
const KeySinglePassRange &  key,
OutputRange &  out 
)
Template Parameters
BlockCipher
SinglePassRange
KeySinglePassRange
OutputRange
Parameters
rng
key
out
Returns

◆ encrypt() [3/6]

template<typename SchemeMode , typename SinglePassRange , typename KeySinglePassRange , typename OutputRange >
OutputRange & nil::crypto3::encrypt ( const SinglePassRange &  rng,
const KeySinglePassRange &  key,
OutputRange &  out 
)
Template Parameters
Scheme
SinglePassRange
KeySinglePassRange
OutputRange
Parameters
rng
key
out
Returns

◆ encrypt() [4/6]

template<typename BlockCipher , typename InputIterator , typename KeySinglePassRange , typename CipherAccumulator = typename block::accumulator_set<typename block::modes::isomorphic< BlockCipher, block::nop_padding>::template bind<block::encryption_policy<BlockCipher>>::type>, typename = typename std::enable_if<detail::is_iterator<InputIterator>::value>::type>
block::detail::range_cipher_impl<block::detail::value_cipher_impl<CipherAccumulator> > nil::crypto3::encrypt ( InputIterator  first,
InputIterator  last,
const KeySinglePassRange &  key 
)
Template Parameters
BlockCipher
InputIterator
KeySinglePassRange
CipherAccumulator
Parameters
first
last
key
Returns

◆ encrypt() [5/6]

template<typename CipherMode , typename InputIterator , typename KeySinglePassRange , typename CipherAccumulator = typename block::accumulator_set< typename CipherMode::template bind<block::encryption_policy<CipherMode>>::type>>
block::detail::range_cipher_impl<block::detail::value_cipher_impl<CipherAccumulator> > nil::crypto3::encrypt ( InputIterator  first,
InputIterator  last,
const KeySinglePassRange &  key 
)
Template Parameters
BlockCipher
InputIterator
KeySinglePassRange
CipherAccumulator
Parameters
first
last
key
Returns

◆ encrypt() [6/6]

template<typename SchemeMode , typename InputIterator , typename KeySinglePassRange , typename SchemeAccumulator = typename pubkey::accumulator_set<typename SchemeMode::template bind< pubkey::encryption_policy<typename SchemeMode::scheme_type>>::type>>
pubkey::detail::range_scheme_impl< pubkey::detail::value_scheme_impl< SchemeAccumulator > > nil::crypto3::encrypt ( InputIterator  first,
InputIterator  last,
const KeySinglePassRange &  key 
)
Template Parameters
Scheme
InputIterator
KeySinglePassRange
SchemeAccumulator
Parameters
first
last
key
Returns

◆ find_roots_gf2m_decomp()

secure_vector<gf2m> nil::crypto3::find_roots_gf2m_decomp ( const polyn_gf2m polyn,
uint32_t  code_length 
)

Find the roots of a polynomial over GF(2^m) using the method by Federenko et al.

◆ ge_add()

void nil::crypto3::ge_add ( ge_p1p1 r,
const ge_p3 p,
const ge_cached q 
)

◆ ge_double_scalarmult_vartime()

void nil::crypto3::ge_double_scalarmult_vartime ( uint8_t  out[32],
const uint8_t  a[],
const ge_p3 A,
const uint8_t  b[] 
)

◆ ge_frombytes_negate_vartime()

int nil::crypto3::ge_frombytes_negate_vartime ( ge_p3 ,
const uint8_t *   
)

◆ ge_madd()

void nil::crypto3::ge_madd ( ge_p1p1 r,
const ge_p3 p,
const ge_precomp q 
)

◆ ge_msub()

void nil::crypto3::ge_msub ( ge_p1p1 r,
const ge_p3 p,
const ge_precomp q 
)

◆ ge_p1p1_to_p2()

void nil::crypto3::ge_p1p1_to_p2 ( ge_p2 r,
const ge_p1p1 p 
)

◆ ge_p1p1_to_p3()

void nil::crypto3::ge_p1p1_to_p3 ( ge_p3 r,
const ge_p1p1 p 
)

◆ ge_p2_0()

void nil::crypto3::ge_p2_0 ( ge_p2 h)

◆ ge_p2_dbl()

void nil::crypto3::ge_p2_dbl ( ge_p1p1 r,
const ge_p2 p 
)

◆ ge_p3_0()

void nil::crypto3::ge_p3_0 ( ge_p3 h)

◆ ge_p3_dbl()

void nil::crypto3::ge_p3_dbl ( ge_p1p1 r,
const ge_p3 p 
)

◆ ge_p3_to_cached()

void nil::crypto3::ge_p3_to_cached ( ge_cached r,
const ge_p3 p 
)

◆ ge_scalarmult_base()

void nil::crypto3::ge_scalarmult_base ( uint8_t  out[32],
const uint8_t  in[32] 
)
Parameters
out
in

h = a * B where a = a[0]+256*a[1]+...+256^31 a[31] B is the Ed25519 core point (x,4/5) with x positive.

Preconditions: a[31] <= 127

◆ ge_sub()

void nil::crypto3::ge_sub ( ge_p1p1 r,
const ge_p3 p,
const ge_cached q 
)

◆ ge_tobytes()

void nil::crypto3::ge_tobytes ( uint8_t *  s,
const ge_p2 h 
)

◆ generate_bcrypt()

template<typename UniformRandomGenerator >
std::string nil::crypto3::generate_bcrypt ( const std::string &  password,
UniformRandomGenerator &  rng,
uint16_t  work_factor = 10 
)

Create a password hash using Bcrypt

Parameters
passwordthe password
rnga random number generator
work_factorhow much work to do to slow down guessing attacks
See also
https://www.usenix.org/events/usenix99/provos/provos_html/

◆ generate_mceliece_key()

mceliece_private_key nil::crypto3::generate_mceliece_key ( random_number_generator &  rng,
uint32_t  ext_deg,
uint32_t  code_length,
uint32_t  t 
)

◆ initialize_allocator()

void nil::crypto3::initialize_allocator ( )

Ensure the allocator is initialized

◆ kem_decrypt() [1/2]

template<typename SchemeMode , typename SinglePassRange , typename KeySinglePassRange , typename OutputRange >
OutputRange & nil::crypto3::kem_decrypt ( const SinglePassRange &  rng,
const KeySinglePassRange &  key,
OutputRange &  out 
)
Template Parameters
Scheme
SinglePassRange
KeySinglePassRange
OutputRange
Parameters
rng
key
out
Returns

◆ kem_decrypt() [2/2]

template<typename SchemeMode , typename InputIterator , typename KeySinglePassRange , typename SchemeAccumulator = typename pubkey::accumulator_set<typename SchemeMode::template bind< pubkey::kem_decryption_policy<typename SchemeMode::scheme_type>>::type>>
pubkey::detail::range_scheme_impl< pubkey::detail::value_scheme_impl< SchemeAccumulator > > nil::crypto3::kem_decrypt ( InputIterator  first,
InputIterator  last,
const KeySinglePassRange &  key 
)
Template Parameters
Scheme
InputIterator
KeySinglePassRange
SchemeAccumulator
Parameters
first
last
key
Returns

◆ kem_encrypt() [1/2]

template<typename SchemeMode , typename SinglePassRange , typename KeySinglePassRange , typename OutputRange >
OutputRange & nil::crypto3::kem_encrypt ( const SinglePassRange &  rng,
const KeySinglePassRange &  key,
OutputRange &  out 
)
Template Parameters
Scheme
SinglePassRange
KeySinglePassRange
OutputRange
Parameters
rng
key
out
Returns

◆ kem_encrypt() [2/2]

template<typename SchemeMode , typename InputIterator , typename KeySinglePassRange , typename SchemeAccumulator = typename pubkey::accumulator_set<typename SchemeMode::template bind< pubkey::kem_encryption_policy<typename SchemeMode::scheme_type>>::type>>
pubkey::detail::range_scheme_impl< pubkey::detail::value_scheme_impl< SchemeAccumulator > > nil::crypto3::kem_encrypt ( InputIterator  first,
InputIterator  last,
const KeySinglePassRange &  key 
)
Template Parameters
Scheme
InputIterator
KeySinglePassRange
SchemeAccumulator
Parameters
first
last
key
Returns

◆ load_3()

uint64_t nil::crypto3::load_3 ( const uint8_t  in[3])
inline

◆ load_4()

uint64_t nil::crypto3::load_4 ( const uint8_t *  in)
inline

◆ make_array()

template<std::size_t N, typename RandomAccessIterator >
std::array< detail::ValueType< RandomAccessIterator >, N > nil::crypto3::make_array ( RandomAccessIterator  first,
RandomAccessIterator  last 
)

◆ mceliece_decrypt() [1/3]

secure_vector<uint8_t> nil::crypto3::mceliece_decrypt ( secure_vector< gf2m > &  error_pos,
const uint8_t *  ciphertext,
uint32_t  ciphertext_len,
const mceliece_private_key &  key 
)

p_err_pos_len must point to the available length of error_pos on input, the function will set it to the actual number of errors returned in the error_pos array

◆ mceliece_decrypt() [2/3]

void nil::crypto3::mceliece_decrypt ( secure_vector< uint8_t > &  plaintext_out,
secure_vector< uint8_t > &  error_mask_out,
const secure_vector< uint8_t > &  ciphertext,
const mceliece_private_key &  key 
)

◆ mceliece_decrypt() [3/3]

void nil::crypto3::mceliece_decrypt ( secure_vector< uint8_t > &  plaintext_out,
secure_vector< uint8_t > &  error_mask_out,
const uint8_t  ciphertext[],
size_t  ciphertext_len,
const mceliece_private_key &  key 
)

◆ mceliece_encrypt()

void nil::crypto3::mceliece_encrypt ( secure_vector< uint8_t > &  ciphertext_out,
secure_vector< uint8_t > &  error_mask_out,
const secure_vector< uint8_t > &  plaintext,
const McEliece_PublicKey &  key,
random_number_generator &  rng 
)

◆ operator!=() [1/7]

template<std::size_t DB>
bool nil::crypto3::operator!= ( char const *  b,
const static_digest< DB > &  a 
)

◆ operator!=() [2/7]

template<unsigned DB>
bool nil::crypto3::operator!= ( char const *  b,
digest< DB > const &  a 
)

◆ operator!=() [3/7]

template<unsigned DB1, unsigned DB2>
bool nil::crypto3::operator!= ( const digest< DB1 > &  a,
const digest< DB2 > &  b 
)

◆ operator!=() [4/7]

template<typename T , typename U >
bool nil::crypto3::operator!= ( const secure_allocator< T > &  ,
const secure_allocator< U > &   
)
inline

◆ operator!=() [5/7]

template<std::size_t DB>
bool nil::crypto3::operator!= ( const static_digest< DB > &  a,
char const *  b 
)

◆ operator!=() [6/7]

template<std::size_t DB1, std::size_t DB2>
bool nil::crypto3::operator!= ( const static_digest< DB1 > &  a,
const static_digest< DB2 > &  b 
)

◆ operator!=() [7/7]

template<unsigned DB>
bool nil::crypto3::operator!= ( digest< DB > const &  a,
char const *  b 
)

◆ operator<() [1/2]

template<unsigned DB1, unsigned DB2>
bool nil::crypto3::operator< ( const digest< DB1 > &  a,
const digest< DB2 > &  b 
)

◆ operator<() [2/2]

template<std::size_t DB1, std::size_t DB2>
bool nil::crypto3::operator< ( const static_digest< DB1 > &  a,
const static_digest< DB2 > &  b 
)

◆ operator<<() [1/2]

template<std::size_t DigestBits>
std::ostream & nil::crypto3::operator<< ( std::ostream &  sink,
const static_digest< DigestBits > &  d 
)

◆ operator<<() [2/2]

template<unsigned DB>
std::ostream & nil::crypto3::operator<< ( std::ostream &  sink,
digest< DB > const &  d 
)

◆ operator<=() [1/2]

template<unsigned DB1, unsigned DB2>
bool nil::crypto3::operator<= ( const digest< DB1 > &  a,
const digest< DB2 > &  b 
)

◆ operator<=() [2/2]

template<std::size_t DB1, std::size_t DB2>
bool nil::crypto3::operator<= ( const static_digest< DB1 > &  a,
const static_digest< DB2 > &  b 
)

◆ operator==() [1/7]

template<std::size_t DB>
bool nil::crypto3::operator== ( char const *  b,
const static_digest< DB > &  a 
)

◆ operator==() [2/7]

template<unsigned DB>
bool nil::crypto3::operator== ( char const *  b,
digest< DB > const &  a 
)

◆ operator==() [3/7]

template<unsigned DB1, unsigned DB2>
bool nil::crypto3::operator== ( const digest< DB1 > &  a,
const digest< DB2 > &  b 
)

◆ operator==() [4/7]

template<typename T , typename U >
bool nil::crypto3::operator== ( const secure_allocator< T > &  ,
const secure_allocator< U > &   
)
inline

◆ operator==() [5/7]

template<std::size_t DB>
bool nil::crypto3::operator== ( const static_digest< DB > &  a,
char const *  b 
)

◆ operator==() [6/7]

template<std::size_t DB1, std::size_t DB2>
bool nil::crypto3::operator== ( const static_digest< DB1 > &  a,
const static_digest< DB2 > &  b 
)

◆ operator==() [7/7]

template<unsigned DB>
bool nil::crypto3::operator== ( digest< DB > const &  a,
char const *  b 
)

◆ operator>() [1/2]

template<unsigned DB1, unsigned DB2>
bool nil::crypto3::operator> ( const digest< DB1 > &  a,
const digest< DB2 > &  b 
)

◆ operator>() [2/2]

template<std::size_t DB1, std::size_t DB2>
bool nil::crypto3::operator> ( const static_digest< DB1 > &  a,
const static_digest< DB2 > &  b 
)

◆ operator>=() [1/2]

template<unsigned DB1, unsigned DB2>
bool nil::crypto3::operator>= ( const digest< DB1 > &  a,
const digest< DB2 > &  b 
)

◆ operator>=() [2/2]

template<std::size_t DB1, std::size_t DB2>
bool nil::crypto3::operator>= ( const static_digest< DB1 > &  a,
const static_digest< DB2 > &  b 
)

◆ operator>>() [1/2]

template<unsigned DB>
std::istream & nil::crypto3::operator>> ( std::istream &  source,
digest< DB > &  d 
)

◆ operator>>() [2/2]

template<std::size_t DigestBits>
std::istream & nil::crypto3::operator>> ( std::istream &  source,
static_digest< DigestBits > &  d 
)

◆ operator^=()

template<typename Alloc , typename Alloc2 >
std::vector<uint8_t, Alloc>& nil::crypto3::operator^= ( std::vector< uint8_t, Alloc > &  out,
const std::vector< uint8_t, Alloc2 > &  in 
)

◆ poly_double_n() [1/2]

template<typename Container >
void nil::crypto3::poly_double_n ( const Container &  c)
inline

◆ poly_double_n() [2/2]

template<typename InputIterator >
void nil::crypto3::poly_double_n ( uint8_t  out[],
InputIterator  first,
InputIterator  last 
)

Polynomial doubling in GF(2^n)

◆ poly_double_n_le()

template<typename InputIterator >
void nil::crypto3::poly_double_n_le ( uint8_t  out[],
InputIterator  first,
InputIterator  last 
)

◆ poly_double_supported_size()

constexpr bool nil::crypto3::poly_double_supported_size ( size_t  n)
inlineconstexpr

Returns true iff poly_double_n is implemented for this size.

◆ random_code_element() [1/2]

gf2m nil::crypto3::random_code_element ( unsigned  code_length,
random_number_generator &  rng 
)

◆ random_code_element() [2/2]

gf2m nil::crypto3::random_code_element ( unsigned  code_length,
RandomNumberGenerator &  rng 
)

◆ random_gf2m() [1/2]

gf2m nil::crypto3::random_gf2m ( random_number_generator &  rng)

◆ random_gf2m() [2/2]

gf2m nil::crypto3::random_gf2m ( RandomNumberGenerator &  rng)

◆ recover() [1/2]

template<typename SchemeMode , typename SinglePassRange , typename KeySinglePassRange , typename OutputRange >
OutputRange& nil::crypto3::recover ( const SinglePassRange &  rng,
const KeySinglePassRange &  key,
OutputRange &  out 
)
Template Parameters
Scheme
SinglePassRange
KeySinglePassRange
OutputRange
Parameters
rng
key
out
Returns

◆ recover() [2/2]

template<typename SchemeMode , typename InputIterator , typename KeySinglePassRange , typename SchemeAccumulator = typename pubkey::accumulator_set<typename SchemeMode::template bind< pubkey::recovery_policy<typename SchemeMode::scheme_type>>::type>>
pubkey::detail::range_scheme_impl<pubkey::detail::value_scheme_impl<SchemeAccumulator> > nil::crypto3::recover ( InputIterator  first,
InputIterator  last,
const KeySinglePassRange &  key 
)
Template Parameters
Scheme
InputIterator
KeySinglePassRange
SchemeAccumulator
Parameters
first
last
key
Returns

◆ redc_mul()

void nil::crypto3::redc_mul ( int64_t &  s1,
int64_t &  s2,
int64_t &  s3,
int64_t &  s4,
int64_t &  s5,
int64_t &  s6,
int64_t &  X 
)
inline

◆ reserve() [1/2]

template<unsigned NewBits, unsigned OldBits>
digest<NewBits> nil::crypto3::reserve ( const boost::container::small_vector< octet_type, OldBits/octet_bits > &  od)
Template Parameters
NewBits
OldBits
Parameters
od
Returns
Digest containing the first min(NewBits, OldBits) bits of the argument digest followed by max (0, NewBits - OldBits) bits.

◆ reserve() [2/2]

template<unsigned NewBits, unsigned OldBits>
digest< NewBits > nil::crypto3::reserve ( const digest< OldBits > &  od)
Template Parameters
NewBits
OldBits
Parameters
od
Returns
Digest containing the first min(NewBits, OldBits) bits of the argument digest followed by max (0, NewBits - OldBits) bits.

◆ resize() [1/3]

template<unsigned NewBits, unsigned OldBits>
digest<NewBits> nil::crypto3::resize ( const boost::container::small_vector< octet_type, OldBits/octet_bits > &  od)
Template Parameters
NewBits
OldBits
Parameters
od
Returns
Digest containing the first min(NewBits, OldBits) bits of the argument digest followed by max (0, NewBits - OldBits) bits.

◆ resize() [2/3]

template<std::size_t DigestBits>
digest< DigestBits > nil::crypto3::resize ( const digest< DigestBits > &  od,
std::size_t  new_size 
)
Template Parameters
DigestBits
Parameters
od
new_size
Returns
Digest containing the first min(od.size(), new_size) octets of the argument digest followed by max (0, new_size - od.size()) zero octets.

◆ resize() [3/3]

template<std::size_t NewBits, std::size_t OldBits>
static_digest< NewBits > nil::crypto3::resize ( const static_digest< OldBits > &  od)
Template Parameters
NewBits
OldBits
Parameters
od
Returns
Digest containing the first min(NewBits, OldBits) bits of the argument digest followed by max (0, NewBits - OldBits) bits.

◆ same_mem()

template<typename T >
bool nil::crypto3::same_mem ( const T *  p1,
const T *  p2,
size_t  n 
)
inline

Memory comparison, input insensitive

Parameters
p1a pointer to an array
p2a pointer to another array
nthe number of Ts in p1 and p2
Returns
true iff p1[i] == p2[i] forall i in [0...n)

◆ sc_muladd()

void nil::crypto3::sc_muladd ( uint8_t *  ,
const uint8_t *  ,
const uint8_t *  ,
const uint8_t *   
)

◆ sc_reduce()

void nil::crypto3::sc_reduce ( uint8_t *  )

◆ secure_scrub_memory()

void nil::crypto3::secure_scrub_memory ( void *  ptr,
size_t  n 
)

Scrub memory contents in a way that a compiler should not elide, using some system specific technique. Note that this function might not zero the memory (for example, in some hypothetical implementation it might combine the memory contents with the output of a system PRNG), but if you can detect any difference in behavior at runtime then the clearing is side-effecting and you can just use clear_mem.

Use this function to scrub memory just before deallocating it, or on a stack buffer before returning from the function.

Parameters
ptra pointer to memory to scrub
nthe number of bytes pointed to by ptr

◆ set_mem()

template<typename T >
void nil::crypto3::set_mem ( T *  ptr,
size_t  n,
uint8_t  val 
)
inline

Set memory to a fixed value

Parameters
ptra pointer to an array
nthe number of Ts pointed to by ptr
valthe value to set each byte to

◆ sign() [1/2]

template<typename SchemeMode , typename SinglePassRange , typename KeySinglePassRange , typename OutputRange >
OutputRange & nil::crypto3::sign ( const SinglePassRange &  rng,
const KeySinglePassRange &  key,
OutputRange &  out 
)
Template Parameters
Scheme
SinglePassRange
KeySinglePassRange
OutputRange
Parameters
rng
key
out
Returns

◆ sign() [2/2]

template<typename SchemeMode , typename InputIterator , typename KeySinglePassRange , typename SchemeAccumulator = typename pubkey::accumulator_set<typename SchemeMode::template bind< pubkey::signing_policy<typename SchemeMode::scheme_type>>::type>>
pubkey::detail::range_scheme_impl< pubkey::detail::value_scheme_impl< SchemeAccumulator > > nil::crypto3::sign ( InputIterator  first,
InputIterator  last,
const KeySinglePassRange &  key 
)
Template Parameters
Scheme
InputIterator
KeySinglePassRange
SchemeAccumulator
Parameters
first
last
key
Returns

◆ slide()

void nil::crypto3::slide ( int8_t *  r,
const uint8_t *  a 
)

◆ syndrome_init()

std::vector< polyn_gf2m > nil::crypto3::syndrome_init ( polyn_gf2m const &  generator,
std::vector< gf2m > const &  support,
int  n 
)

◆ truncate() [1/3]

template<unsigned NewBits, unsigned OldBits>
digest<NewBits> nil::crypto3::truncate ( const boost::container::small_vector< octet_type, OldBits/octet_bits > &  od)
Template Parameters
NewBits
OldBits
Returns
Digest containing only the first NewBits bits of the argument digest.

Requires that NewBits <= OldBits.

Truncating a message digest generally does not weaken the hash algorithm beyond the amount necessitated by the shorted output size.

◆ truncate() [2/3]

template<unsigned NewBits, unsigned OldBits>
digest< NewBits > nil::crypto3::truncate ( const digest< OldBits > &  od)
Template Parameters
NewBits
OldBits
Returns
Digest containing only the first NewBits bits of the argument digest.

Requires that NewBits <= OldBits.

Truncating a message digest generally does not weaken the hash algorithm beyond the amount necessitated by the shorted output size.

◆ truncate() [3/3]

template<std::size_t NewBits, std::size_t OldBits>
static_digest< NewBits > nil::crypto3::truncate ( const static_digest< OldBits > &  od)
Template Parameters
NewBits
OldBits
Returns
Digest containing only the first NewBits bits of the argument digest.

Requires that NewBits <= OldBits.

Truncating a message digest generally does not weaken the hash algorithm beyond the amount necessitated by the shorted output size.

◆ verify() [1/2]

template<typename SchemeMode , typename SinglePassRange , typename KeySinglePassRange , typename OutputRange >
OutputRange & nil::crypto3::verify ( const SinglePassRange &  rng,
const KeySinglePassRange &  key,
OutputRange &  out 
)
Template Parameters
Scheme
SinglePassRange
KeySinglePassRange
OutputRange
Parameters
rng
key
out
Returns

◆ verify() [2/2]

template<typename SchemeMode , typename InputIterator , typename KeySinglePassRange , typename SchemeAccumulator = typename pubkey::accumulator_set<typename SchemeMode::template bind< pubkey::verification_policy<typename SchemeMode::scheme_type>>::type>>
pubkey::detail::range_scheme_impl< pubkey::detail::value_scheme_impl< SchemeAccumulator > > nil::crypto3::verify ( InputIterator  first,
InputIterator  last,
const KeySinglePassRange &  key 
)
Template Parameters
Scheme
InputIterator
KeySinglePassRange
SchemeAccumulator
Parameters
first
last
key
Returns

◆ xor_buf() [1/5]

template<typename Alloc , typename Alloc2 >
void nil::crypto3::xor_buf ( std::vector< uint8_t, Alloc > &  out,
const std::vector< uint8_t, Alloc2 > &  in,
size_t  n 
)

◆ xor_buf() [2/5]

template<typename Alloc , typename Alloc2 >
void nil::crypto3::xor_buf ( std::vector< uint8_t, Alloc > &  out,
const uint8_t *  in,
const std::vector< uint8_t, Alloc2 > &  in2,
size_t  n 
)

◆ xor_buf() [3/5]

template<typename Alloc >
void nil::crypto3::xor_buf ( std::vector< uint8_t, Alloc > &  out,
const uint8_t *  in,
size_t  n 
)

◆ xor_buf() [4/5]

void nil::crypto3::xor_buf ( uint8_t  out[],
const uint8_t  in[],
const uint8_t  in2[],
size_t  length 
)
inline

XOR arrays. Postcondition out[i] = in[i] ^ in2[i] forall i = 0...length

Parameters
outthe output buffer
inthe first input buffer
in2the second output buffer
lengththe length of the three buffers

◆ xor_buf() [5/5]

void nil::crypto3::xor_buf ( uint8_t  out[],
const uint8_t  in[],
size_t  length 
)
inline

XOR arrays. Postcondition out[i] = in[i] ^ out[i] forall i = 0...length

Parameters
outthe input/output buffer
inthe read-only input buffer
lengththe length of the buffers