nil::crypto3::pubkey::padding Namespace Reference

Namespaces

 accumulators
 
 detail
 

Classes

struct  eme
 Encoding Method for Encryption. More...
 
class  eme_pkcs1v15
 EME from PKCS #1 v1.5. More...
 
class  eme_raw
 
struct  emsa1
 EMSA1 from IEEE 1363. Essentially, sign the hash directly. More...
 
struct  emsa_pkcs1v15
 
  • PKCS #1 v1.5 signature padding aka PKCS #1 block type 1 aka EMSA3 from IEEE 1363
More...
 
struct  emsa_pkcs1v15_base
 
struct  emsa_pkcs1v15_raw
 EMSA_PKCS1v15_Raw which is EMSA_PKCS1v15 without a hash or digest id (which according to QCA docs is "identical to PKCS#11's CKM_RSA_PKCS mechanism", something I have not confirmed) More...
 
struct  emsa_pssr
 PSSR aka EMSA4 in IEEE 1363. More...
 
struct  emsa_raw
 EMSA raw. Essentially, accumulate input data in the container with elements of ValueType and return it unchanged. More...
 
struct  emsa_x931
 
struct  is_eme_policy
 
struct  is_emsa_policy
 
struct  is_emsr_policy
 
class  oaep
 OAEP (called EME1 in IEEE 1363 and in earlier versions of the library) as specified in PKCS#1 v2.0 (RFC 2437) More...
 

Typedefs

template<typename Padding >
using encoding_accumulator_set = boost::accumulators::accumulator_set< typename Padding::encoding_policy::result_type, boost::accumulators::features< accumulators::tag::encode< typename Padding::encoding_policy > >>
 Accumulator set with pre-defined signing accumulator params. More...
 
template<typename Padding >
using encoding_policy = typename Padding::encoding_policy
 
template<typename Padding >
using verification_accumulator_set = boost::accumulators::accumulator_set< typename Padding::verification_policy::result_type, boost::accumulators::features< accumulators::tag::verify< typename Padding::verification_policy > >>
 Accumulator set with pre-defined signing accumulator params. More...
 
template<typename Padding >
using verification_policy = typename Padding::verification_policy
 

Functions

template<typename Hash >
secure_vector< uint8_t > iso9796_encoding (const secure_vector< uint8_t > &msg, size_t output_bits, size_t SALT_SIZE, bool implicit, random_number_generator &rng)
 
bool iso9796_verification (const secure_vector< uint8_t > &const_coded, const secure_vector< uint8_t > &raw, size_t key_bits, std::unique_ptr< HashFunction > &hash, size_t SALT_SIZE)
 
template<typename Hash , typename InputIterator , typename OutputIterator , typename StreamHash = typename Hash::template stream_hash< std::numeric_limits<typename std::iterator_traits<InputIterator>::value_type>::digits + std::numeric_limits<typename std::iterator_traits<InputIterator>::value_type>::is_signed>::type>
OutputIterator mgf1_mask (InputIterator first, InputIterator last, OutputIterator out, StreamHash sh=StreamHash())
 MGF1 from PKCS #1 v2.0. More...
 

Typedef Documentation

◆ encoding_accumulator_set

template<typename Padding >
using nil::crypto3::pubkey::padding::encoding_accumulator_set = typedef boost::accumulators::accumulator_set< typename Padding::encoding_policy::result_type, boost::accumulators::features<accumulators::tag::encode<typename Padding::encoding_policy> >>

Accumulator set with pre-defined signing accumulator params.

Meets the requirements of AccumulatorSet

Template Parameters
EncodingPolicy

◆ encoding_policy

template<typename Padding >
using nil::crypto3::pubkey::padding::encoding_policy = typedef typename Padding::encoding_policy

◆ verification_accumulator_set

template<typename Padding >
using nil::crypto3::pubkey::padding::verification_accumulator_set = typedef boost::accumulators::accumulator_set< typename Padding::verification_policy::result_type, boost::accumulators::features<accumulators::tag::verify<typename Padding::verification_policy> >>

Accumulator set with pre-defined signing accumulator params.

Meets the requirements of AccumulatorSet

Template Parameters
VerificationPolicy

◆ verification_policy

template<typename Padding >
using nil::crypto3::pubkey::padding::verification_policy = typedef typename Padding::verification_policy

Function Documentation

◆ iso9796_encoding()

template<typename Hash >
secure_vector<uint8_t> nil::crypto3::pubkey::padding::iso9796_encoding ( const secure_vector< uint8_t > &  msg,
size_t  output_bits,
size_t  SALT_SIZE,
bool  implicit,
random_number_generator &  rng 
)

◆ iso9796_verification()

bool nil::crypto3::pubkey::padding::iso9796_verification ( const secure_vector< uint8_t > &  const_coded,
const secure_vector< uint8_t > &  raw,
size_t  key_bits,
std::unique_ptr< HashFunction > &  hash,
size_t  SALT_SIZE 
)

◆ mgf1_mask()

template<typename Hash , typename InputIterator , typename OutputIterator , typename StreamHash = typename Hash::template stream_hash< std::numeric_limits<typename std::iterator_traits<InputIterator>::value_type>::digits + std::numeric_limits<typename std::iterator_traits<InputIterator>::value_type>::is_signed>::type>
OutputIterator nil::crypto3::pubkey::padding::mgf1_mask ( InputIterator  first,
InputIterator  last,
OutputIterator  out,
StreamHash  sh = StreamHash() 
)

MGF1 from PKCS #1 v2.0.

Template Parameters
HashHash function type to use
InputIteratorInput buffer iterator type
OutputIteratorOutput buffer iterator type
Parameters
firstInput buffer first iterator
lastInput buffer last iterator
outOutput buffer first iterator
shStream hash function instance