eddsa.hpp
Go to the documentation of this file.
1 //---------------------------------------------------------------------------//
2 // Copyright (c) 2021 Mikhail Komarov <nemo@nil.foundation>
3 // Copyright (c) 2021 Ilias Khairullin <ilias@nil.foundation>
4 //
5 // MIT License
6 //
7 // Permission is hereby granted, free of charge, to any person obtaining a copy
8 // of this software and associated documentation files (the "Software"), to deal
9 // in the Software without restriction, including without limitation the rights
10 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 // copies of the Software, and to permit persons to whom the Software is
12 // furnished to do so, subject to the following conditions:
13 //
14 // The above copyright notice and this permission notice shall be included in all
15 // copies or substantial portions of the Software.
16 //
17 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 // SOFTWARE.
24 //---------------------------------------------------------------------------//
25 
26 #ifndef CRYPTO3_PUBKEY_EDDSA_HPP
27 #define CRYPTO3_PUBKEY_EDDSA_HPP
28 
29 #include <cstddef>
30 #include <array>
31 #include <vector>
32 
34 
37 
41 
43 
45 
46 #include <nil/crypto3/marshalling/multiprecision/types/integral.hpp>
47 #include <nil/crypto3/marshalling/algebra/types/field_element.hpp>
48 #include <nil/crypto3/marshalling/algebra/types/curve_element.hpp>
49 
50 #include <nil/marshalling/endianness.hpp>
51 #include <nil/marshalling/field_type.hpp>
52 
53 namespace nil {
54  namespace crypto3 {
55  namespace pubkey {
56  enum class eddsa_type { basic, ctx, ph };
57 
58  template<eddsa_type, typename Params, typename = void>
59  struct eddsa_policy;
60 
61  template<typename Params>
62  struct eddsa_policy<eddsa_type::basic, Params> {
63  typedef Params params_type;
64  typedef std::vector<std::uint8_t> domain_type;
67 
68  static inline domain_type domain() {
69  return {};
70  }
71  };
72 
73  template<typename Params>
74  struct eddsa_policy<
75  eddsa_type::ctx, Params,
76  typename std::enable_if<
77  is_eddsa_params<Params>::value &&
78  std::is_same<std::uint8_t, typename std::iterator_traits<typename Params::context_type::iterator>::
79  value_type>::value>::type> {
80  typedef Params params_type;
81  typedef std::vector<std::uint8_t> domain_type;
84 
85  static constexpr std::uint8_t phflag = 0;
86 
87  static inline domain_type domain() {
88  std::size_t context_len =
89  std::distance(std::cbegin(params_type::context), std::cend(params_type::context));
90  BOOST_ASSERT(0 < context_len && context_len <= 255);
91 
92  std::string dom_prefix = "SigEd25519 no Ed25519 collisions";
93  domain_type dom(std::cbegin(dom_prefix), std::cend(dom_prefix));
94  dom.push_back(phflag);
95  dom.push_back(static_cast<std::uint8_t>(context_len));
96  std::copy(std::cbegin(params_type::context), std::cend(params_type::context),
97  std::back_inserter(dom));
98 
99  return dom;
100  }
101  };
102 
103  template<typename Params>
104  struct eddsa_policy<
105  eddsa_type::ph, Params,
106  typename std::enable_if<
107  is_eddsa_params<Params>::value &&
108  std::is_same<std::uint8_t, typename std::iterator_traits<typename Params::context_type::iterator>::
109  value_type>::value>::type> {
110  typedef Params params_type;
111  typedef std::vector<std::uint8_t> domain_type;
114 
115  static constexpr std::uint8_t phflag = 1;
116 
117  static inline domain_type domain() {
118  std::size_t context_len =
119  std::distance(std::cbegin(params_type::context), std::cend(params_type::context));
120  BOOST_ASSERT(0 <= context_len && context_len <= 255);
121 
122  std::string dom_prefix = "SigEd25519 no Ed25519 collisions";
123  domain_type dom(std::cbegin(dom_prefix), std::cend(dom_prefix));
124  dom.push_back(phflag);
125  dom.push_back(static_cast<std::uint8_t>(context_len));
126  std::copy(std::cbegin(params_type::context), std::cend(params_type::context),
127  std::back_inserter(dom));
128 
129  return dom;
130  }
131  };
132 
133  template<typename CurveGroup, eddsa_type eddsa_variant, typename Params>
134  struct eddsa;
135 
136  template<typename Coordinates, eddsa_type eddsa_variant, typename Params>
137  struct eddsa<
138  typename algebra::curves::curve25519::g1_type<Coordinates, algebra::curves::forms::twisted_edwards>,
139  eddsa_variant, Params> {
140  typedef
144  };
145 
146  template<typename CurveGroup, eddsa_type eddsa_variant, typename Params>
147  struct public_key<eddsa<CurveGroup, eddsa_variant, Params>> {
149  typedef typename scheme_type::policy_type policy_type;
150  typedef typename policy_type::hash_type hash_type;
151  typedef typename policy_type::padding_policy padding_policy;
153 
154  typedef typename scheme_type::group_type group_type;
155  typedef typename group_type::value_type group_value_type;
156  typedef typename group_type::curve_type::base_field_type base_field_type;
157  typedef typename base_field_type::value_type base_field_value_type;
158  typedef typename base_field_type::integral_type base_integral_type;
159  typedef typename group_type::curve_type::scalar_field_type scalar_field_type;
160  typedef typename scalar_field_type::value_type scalar_field_value_type;
161  typedef typename scalar_field_type::integral_type scalar_integral_type;
162 
163  typedef nil::marshalling::option::little_endian endianness;
164  typedef nil::crypto3::marshalling::types::curve_element<nil::marshalling::field_type<endianness>,
165  group_type>
167  typedef nil::crypto3::marshalling::types::field_element<nil::marshalling::field_type<endianness>,
170  typedef nil::crypto3::marshalling::types::integral<nil::marshalling::field_type<endianness>,
173  typedef nil::crypto3::marshalling::types::integral<nil::marshalling::field_type<endianness>,
174  nil::crypto3::multiprecision::uint512_t>
176 
177  constexpr static const std::size_t public_key_bits = base_field_type::modulus_bits;
178  static_assert(32 * std::numeric_limits<std::uint8_t>::digits - 1 == public_key_bits,
179  "wrong octet length of public key");
180  typedef static_digest<public_key_bits +
181  (base_field_type::modulus_bits % std::numeric_limits<std::uint8_t>::digits ? 1 :
182  0)>
184 
185  constexpr static const std::size_t signature_bits = 64 * std::numeric_limits<std::uint8_t>::digits;
187 
188  public_key() = delete;
189  public_key(const public_key_type &key) : pubkey_point(read_pubkey(key)), pubkey(key) {
190  }
191 
192  static inline void init_accumulator(internal_accumulator_type &acc) {
193  }
194 
195  template<typename InputRange>
196  inline void update(internal_accumulator_type &acc, const InputRange &range) const {
197  encode<padding_policy>(range, acc);
198  }
199 
200  template<typename InputIterator>
201  inline void update(internal_accumulator_type &acc, InputIterator first, InputIterator last) const {
202  encode<padding_policy>(first, last, acc);
203  }
204 
205  // https://datatracker.ietf.org/doc/html/rfc8032#section-5.1.7
206  inline bool verify(internal_accumulator_type &acc, const signature_type &signature) const {
207  // 1.
208  marshalling_group_value_type marshalling_group_value_1;
209  auto R_iter_1 = std::cbegin(signature);
210  if (marshalling_group_value_1.read(R_iter_1, marshalling_group_value_type::bit_length()) !=
211  nil::marshalling::status_type::success) {
212  return false;
213  }
214  group_value_type R = marshalling_group_value_1.value();
215 
216  marshalling_scalar_field_value_type marshalling_scalar_field_value_1;
217  auto S_iter_1 = std::cbegin(signature) +
218  public_key_bits / std::numeric_limits<std::uint8_t>::digits +
219  (base_field_type::modulus_bits % std::numeric_limits<std::uint8_t>::digits ? 1 : 0);
220  if (marshalling_scalar_field_value_1.read(S_iter_1,
221  marshalling_scalar_field_value_type::bit_length()) !=
222  nil::marshalling::status_type::success) {
223  return false;
224  }
225  scalar_field_value_type S = marshalling_scalar_field_value_1.value();
226 
227  // 2.
228  auto ph_m = padding::accumulators::extract::encode<padding::encoding_policy<padding_policy>>(acc);
229  accumulator_set<hash_type> hash_acc_2;
230  hash<hash_type>(policy_type::domain(), hash_acc_2);
231  hash<hash_type>(
232  std::cbegin(signature),
233  std::cbegin(signature) + public_key_bits / std::numeric_limits<std::uint8_t>::digits +
234  (base_field_type::modulus_bits % std::numeric_limits<std::uint8_t>::digits ? 1 : 0),
235  hash_acc_2);
236  hash<hash_type>(this->pubkey, hash_acc_2);
237  hash<hash_type>(ph_m, hash_acc_2);
238  typename hash_type::digest_type h_2 =
239  nil::crypto3::accumulators::extract::hash<hash_type>(hash_acc_2);
240  marshalling_uint512_t_type marshalling_uint512_t_2;
241  auto h_2_iter = std::cbegin(h_2);
242 
243  if (marshalling_uint512_t_2.read(h_2_iter, hash_type::digest_bits) !=
244  nil::marshalling::status_type::success) {
245  return false;
246  }
247  multiprecision::uint512_t k = marshalling_uint512_t_2.value();
248  scalar_field_value_type k_reduced(k);
249 
250  // 3.
251  return (S * group_value_type::one()) == (R + k_reduced * this->pubkey_point);
252  }
253 
255  return pubkey;
256  }
257 
258  protected:
260  marshalling_group_value_type marshalling_group_value_1;
261  auto pubkey_iter = std::cbegin(pubkey);
262  // TODO: process status
263  nil::marshalling::status_type status =
264  marshalling_group_value_1.read(pubkey_iter, marshalling_group_value_type::bit_length());
265  return marshalling_group_value_1.value();
266  }
267 
270  };
271 
272  template<typename CurveGroup, eddsa_type eddsa_variant, typename Params>
273  struct private_key<eddsa<CurveGroup, eddsa_variant, Params>>
274  : public public_key<eddsa<CurveGroup, eddsa_variant, Params>> {
277 
278  typedef typename scheme_public_key_type::policy_type policy_type;
279  typedef typename scheme_public_key_type::hash_type hash_type;
280  typedef typename scheme_public_key_type::padding_policy padding_policy;
281  typedef typename scheme_public_key_type::internal_accumulator_type internal_accumulator_type;
282 
283  typedef typename scheme_public_key_type::group_value_type group_value_type;
284  typedef typename scheme_public_key_type::scalar_field_type scalar_field_type;
285  typedef typename scheme_public_key_type::scalar_field_value_type scalar_field_value_type;
286  typedef typename scheme_public_key_type::scalar_integral_type scalar_integral_type;
287  typedef typename scheme_public_key_type::base_field_type base_field_type;
288  typedef typename scheme_public_key_type::base_integral_type base_integral_type;
289 
290  typedef typename scheme_public_key_type::endianness endianness;
291  typedef typename scheme_public_key_type::marshalling_group_value_type marshalling_group_value_type;
292  typedef typename scheme_public_key_type::marshalling_scalar_field_value_type
294  typedef typename scheme_public_key_type::marshalling_base_integral_type marshalling_base_integral_type;
295  typedef typename scheme_public_key_type::marshalling_uint512_t_type marshalling_uint512_t_type;
296 
297  constexpr static const std::size_t private_key_bits = base_field_type::modulus_bits;
298  static_assert(32 * std::numeric_limits<std::uint8_t>::digits - 1 == private_key_bits,
299  "wrong octet length of private key");
300  typedef static_digest<private_key_bits +
301  (base_field_type::modulus_bits % std::numeric_limits<std::uint8_t>::digits ? 1 :
302  0)>
304 
305  constexpr static const std::size_t public_key_bits = scheme_public_key_type::public_key_bits;
306  typedef typename scheme_public_key_type::public_key_type public_key_type;
307 
308  constexpr static const std::size_t signature_bits = scheme_public_key_type::signature_bits;
309  typedef typename scheme_public_key_type::signature_type signature_type;
310 
311  private_key() = delete;
313  privkey(key), h_privkey(hash<hash_type>(key)), s_reduced(construct_scalar(h_privkey)),
314  scheme_public_key_type(generate_public_key(key)) {
315  }
316 
317  // https://datatracker.ietf.org/doc/html/rfc8032#section-5.1.5
319  // 1.
320  typename hash_type::digest_type h = hash<hash_type>(key);
321 
322  base_integral_type s = construct_scalar(h);
323 
324  // 3.
325  group_value_type sB = scalar_field_value_type(s) * group_value_type::one();
326 
327  // 4.
328  marshalling_group_value_type marshalling_group_value(sB);
330  auto write_iter = std::begin(public_key);
331  // TODO: process status
332  if (marshalling_group_value.write(write_iter, public_key_bits) !=
333  nil::marshalling::status_type::success) {
334  return {};
335  }
336 
337  return public_key;
338  }
339 
340  static inline void init_accumulator(internal_accumulator_type &acc) {
341  }
342 
343  template<typename InputRange>
344  inline void update(internal_accumulator_type &acc, const InputRange &range) const {
345  encode<padding_policy>(range, acc);
346  }
347 
348  template<typename InputIterator>
349  inline void update(internal_accumulator_type &acc, InputIterator first, InputIterator last) const {
350  encode<padding_policy>(first, last, acc);
351  }
352 
353  // https://datatracker.ietf.org/doc/html/rfc8032#section-5.1.6
355  // 2.
356  auto ph_m = padding::accumulators::extract::encode<padding::encoding_policy<padding_policy>>(acc);
357  accumulator_set<hash_type> hash_acc_2;
358  hash<hash_type>(policy_type::domain(), hash_acc_2);
359  hash<hash_type>(
360  std::cbegin(h_privkey) + private_key_bits / std::numeric_limits<std::uint8_t>::digits +
361  (base_field_type::modulus_bits % std::numeric_limits<std::uint8_t>::digits ? 1 : 0),
362  std::cend(h_privkey), hash_acc_2);
363  hash<hash_type>(ph_m, hash_acc_2);
364  typename hash_type::digest_type h_2 =
365  nil::crypto3::accumulators::extract::hash<hash_type>(hash_acc_2);
366  marshalling_uint512_t_type marshalling_uint512_t_2;
367  auto h_2_it = std::cbegin(h_2);
368  // TODO: process status
369  if (marshalling_uint512_t_2.read(h_2_it, hash_type::digest_bits) !=
370  nil::marshalling::status_type::success) {
371  return {};
372  }
373  nil::crypto3::multiprecision::uint512_t r = marshalling_uint512_t_2.value();
374  scalar_field_value_type r_reduced(r);
375 
376  // 3.
377  group_value_type rB = r_reduced * group_value_type::one();
378  marshalling_group_value_type marshalling_group_value(rB);
379  signature_type signature;
380  auto sig_iter_3 = std::begin(signature);
381  // TODO: process status
382  if (marshalling_group_value.write(sig_iter_3, public_key_bits) !=
383  nil::marshalling::status_type::success) {
384  return {};
385  }
386 
387  // 4.
388  accumulator_set<hash_type> hash_acc_4;
389  hash<hash_type>(policy_type::domain(), hash_acc_4);
390  hash<hash_type>(
391  std::cbegin(signature),
392  std::cbegin(signature) + public_key_bits / std::numeric_limits<std::uint8_t>::digits +
393  (base_field_type::modulus_bits % std::numeric_limits<std::uint8_t>::digits ? 1 : 0),
394  hash_acc_4);
395  hash<hash_type>(this->pubkey, hash_acc_4);
396  hash<hash_type>(ph_m, hash_acc_4);
397  typename hash_type::digest_type h_4 =
398  nil::crypto3::accumulators::extract::hash<hash_type>(hash_acc_4);
399  marshalling_uint512_t_type marshalling_uint512_t_4;
400  auto h_4_it = std::cbegin(h_4);
401  if (marshalling_uint512_t_4.read(h_4_it, hash_type::digest_bits) !=
402  nil::marshalling::status_type::success) {
403  return {};
404  }
405  nil::crypto3::multiprecision::uint512_t k = marshalling_uint512_t_4.value();
406  scalar_field_value_type k_reduced(k);
407 
408  // 5.
409  scalar_field_value_type S = r_reduced + k_reduced * s_reduced;
410 
411  // 6.
412  marshalling_scalar_field_value_type marshalling_scalar_field_value_6 =
413  nil::crypto3::marshalling::types::fill_field_element<scalar_field_type, endianness>(S);
414  auto sig_iter_6 =
415  std::begin(signature) + public_key_bits / std::numeric_limits<std::uint8_t>::digits +
416  (base_field_type::modulus_bits % std::numeric_limits<std::uint8_t>::digits ? 1 : 0);
417  if (marshalling_scalar_field_value_6.write(sig_iter_6, private_key_bits) !=
418  nil::marshalling::status_type::success) {
419  return {};
420  }
421 
422  return signature;
423  }
424 
425  protected:
426  // https://datatracker.ietf.org/doc/html/rfc8032#section-5.1.5
427  static inline base_integral_type construct_scalar(const typename hash_type::digest_type &h) {
428  // 3.
429  marshalling_base_integral_type marshalling_base_integral;
430  auto h_it = std::cbegin(h);
431  marshalling_base_integral.read(h_it, private_key_bits);
432  base_integral_type s = marshalling_base_integral.value();
433 
434  // 2.
435  s &= ((base_integral_type(1) << 254) - 8);
436  s |= (base_integral_type(1) << 254);
437 
438  return s;
439  }
440 
441  // TODO: refactor eddsa private key internal fields
443  typename hash_type::digest_type h_privkey;
445  };
446  } // namespace pubkey
447  } // namespace crypto3
448 } // namespace nil
449 
450 #endif // CRYPTO3_PUBKEY_EDDSA_HPP
typename detail::curve25519_g1< Form, Coordinates > g1_type
Definition: curve25519.hpp:50
SHA2.
Definition: sha2.hpp:46
Definition: block/include/nil/crypto3/detail/static_digest.hpp:72
std::enable_if<!boost::accumulators::detail::is_accumulator_set< OutputIterator >::value, OutputIterator >::type hash(InputIterator first, InputIterator last, OutputIterator out)
Definition: algorithm/hash.hpp:78
boost::mpl::apply< AccumulatorSet, tag::pubkey< ProcessingMode > >::type::result_type pubkey(const AccumulatorSet &acc)
Definition: accumulators/pubkey.hpp:106
boost::accumulators::accumulator_set< typename Padding::encoding_policy::result_type, boost::accumulators::features< accumulators::tag::encode< typename Padding::encoding_policy > >> encoding_accumulator_set
Accumulator set with pre-defined signing accumulator params.
Definition: padding_state.hpp:51
eddsa_type
Definition: eddsa.hpp:56
Definition: pair.hpp:31
Definition: hash_state.hpp:43
algebra::curves::curve25519::g1_type< Coordinates, algebra::curves::forms::twisted_edwards > group_type
Definition: eddsa.hpp:142
padding::emsa_raw< std::uint8_t > padding_policy
Definition: eddsa.hpp:66
std::vector< std::uint8_t > domain_type
Definition: eddsa.hpp:64
hashes::sha2< 512 > hash_type
Definition: eddsa.hpp:65
static domain_type domain()
Definition: eddsa.hpp:68
Definition: eddsa.hpp:59
Definition: eddsa.hpp:134
EMSA1 from IEEE 1363. Essentially, sign the hash directly.
Definition: emsa1.hpp:251
EMSA raw. Essentially, accumulate input data in the container with elements of ValueType and return i...
Definition: emsa_raw.hpp:125
signature_type sign(internal_accumulator_type &acc) const
Definition: eddsa.hpp:354
scheme_public_key_type::policy_type policy_type
Definition: eddsa.hpp:278
scheme_public_key_type::scalar_field_type scalar_field_type
Definition: eddsa.hpp:284
static public_key_type generate_public_key(const private_key_type &key)
Definition: eddsa.hpp:318
scheme_public_key_type::group_value_type group_value_type
Definition: eddsa.hpp:283
private_key(const private_key_type &key)
Definition: eddsa.hpp:312
scheme_public_key_type::base_field_type base_field_type
Definition: eddsa.hpp:287
scheme_public_key_type::internal_accumulator_type internal_accumulator_type
Definition: eddsa.hpp:281
void update(internal_accumulator_type &acc, const InputRange &range) const
Definition: eddsa.hpp:344
scheme_public_key_type::base_integral_type base_integral_type
Definition: eddsa.hpp:288
void update(internal_accumulator_type &acc, InputIterator first, InputIterator last) const
Definition: eddsa.hpp:349
eddsa< CurveGroup, eddsa_variant, Params > scheme_type
Definition: eddsa.hpp:275
scheme_public_key_type::marshalling_uint512_t_type marshalling_uint512_t_type
Definition: eddsa.hpp:295
scheme_public_key_type::endianness endianness
Definition: eddsa.hpp:290
scheme_public_key_type::marshalling_scalar_field_value_type marshalling_scalar_field_value_type
Definition: eddsa.hpp:293
static void init_accumulator(internal_accumulator_type &acc)
Definition: eddsa.hpp:340
static base_integral_type construct_scalar(const typename hash_type::digest_type &h)
Definition: eddsa.hpp:427
scheme_public_key_type::scalar_field_value_type scalar_field_value_type
Definition: eddsa.hpp:285
public_key< scheme_type > scheme_public_key_type
Definition: eddsa.hpp:276
scheme_public_key_type::signature_type signature_type
Definition: eddsa.hpp:309
scheme_public_key_type::public_key_type public_key_type
Definition: eddsa.hpp:306
scheme_public_key_type::marshalling_group_value_type marshalling_group_value_type
Definition: eddsa.hpp:291
scheme_public_key_type::hash_type hash_type
Definition: eddsa.hpp:279
scheme_public_key_type::marshalling_base_integral_type marshalling_base_integral_type
Definition: eddsa.hpp:294
scheme_public_key_type::scalar_integral_type scalar_integral_type
Definition: eddsa.hpp:286
scheme_public_key_type::padding_policy padding_policy
Definition: eddsa.hpp:280
Private key - a key known only to its owner. Only the user keeping his private key secret guarantees ...
Definition: private_key.hpp:47
bool verify(internal_accumulator_type &acc, const signature_type &signature) const
Definition: eddsa.hpp:206
policy_type::padding_policy padding_policy
Definition: eddsa.hpp:151
base_field_type::value_type base_field_value_type
Definition: eddsa.hpp:157
nil::crypto3::marshalling::types::integral< nil::marshalling::field_type< endianness >, nil::crypto3::multiprecision::uint512_t > marshalling_uint512_t_type
Definition: eddsa.hpp:175
void update(internal_accumulator_type &acc, const InputRange &range) const
Definition: eddsa.hpp:196
nil::crypto3::marshalling::types::integral< nil::marshalling::field_type< endianness >, base_integral_type > marshalling_base_integral_type
Definition: eddsa.hpp:172
group_type::curve_type::scalar_field_type scalar_field_type
Definition: eddsa.hpp:159
base_field_type::integral_type base_integral_type
Definition: eddsa.hpp:158
scalar_field_type::value_type scalar_field_value_type
Definition: eddsa.hpp:160
nil::crypto3::marshalling::types::curve_element< nil::marshalling::field_type< endianness >, group_type > marshalling_group_value_type
Definition: eddsa.hpp:166
scheme_type::policy_type policy_type
Definition: eddsa.hpp:149
static void init_accumulator(internal_accumulator_type &acc)
Definition: eddsa.hpp:192
public_key(const public_key_type &key)
Definition: eddsa.hpp:189
scalar_field_type::integral_type scalar_integral_type
Definition: eddsa.hpp:161
void update(internal_accumulator_type &acc, InputIterator first, InputIterator last) const
Definition: eddsa.hpp:201
eddsa< CurveGroup, eddsa_variant, Params > scheme_type
Definition: eddsa.hpp:148
public_key_type public_key_data() const
Definition: eddsa.hpp:254
static_digest< signature_bits > signature_type
Definition: eddsa.hpp:186
nil::marshalling::option::little_endian endianness
Definition: eddsa.hpp:163
nil::crypto3::marshalling::types::field_element< nil::marshalling::field_type< endianness >, scalar_field_type > marshalling_scalar_field_value_type
Definition: eddsa.hpp:169
padding::encoding_accumulator_set< padding_policy > internal_accumulator_type
Definition: eddsa.hpp:152
group_type::value_type group_value_type
Definition: eddsa.hpp:155
static group_value_type read_pubkey(const public_key_type &pubkey)
Definition: eddsa.hpp:259
group_type::curve_type::base_field_type base_field_type
Definition: eddsa.hpp:156
Public key - a key that can be published and used to verify the authenticity of the signed document,...
Definition: public_key.hpp:43