Botan 3.7.1
Crypto and TLS for C&
ec_group.h
Go to the documentation of this file.
1/*
2* ECC Domain Parameters
3*
4* (C) 2007 Falko Strenzke, FlexSecure GmbH
5* 2008-2010,2024 Jack Lloyd
6*
7* Botan is released under the Simplified BSD License (see license.txt)
8*/
9
10#ifndef BOTAN_ECC_DOMAIN_PARAMETERS_H_
11#define BOTAN_ECC_DOMAIN_PARAMETERS_H_
12
13#include <botan/asn1_obj.h>
14#include <botan/bigint.h>
15#include <botan/ec_apoint.h>
16#include <botan/ec_point_format.h>
17#include <botan/ec_scalar.h>
18#include <memory>
19#include <set>
20#include <span>
21
22#if defined(BOTAN_HAS_LEGACY_EC_POINT)
23 #include <botan/ec_point.h>
24#endif
25
26namespace Botan {
27
28/**
29* This enum indicates the method used to encode the EC parameters
30*
31* @warning All support for explicit or implicit domain encodings
32* will be removed in Botan4. Only named curves will be supported.
33*
34* TODO(Botan4) remove this enum
35*/
45
46/**
47* This enum indicates the source of the elliptic curve parameters
48* in use.
49*
50* Builtin means the curve is a known standard one which was compiled
51* in the library.
52*
53* ExternalSource means the curve parameters came from either an explicit
54* curve encoding or an application defined curve.
55*/
56enum class EC_Group_Source {
57 Builtin,
59};
60
61/**
62* Enum indicating the way the group in question is implemented
63*
64* This is returned by EC_Group::engine
65*/
66enum class EC_Group_Engine {
67 /// Using per curve implementation; fastest available
69 /// A generic implementation that handles many curves in one implementation
70 Generic,
71 /// The old implementation, used as a fallback if none of the other
72 /// implementations can be used
73 /// TODO(Botan4) remove this
74 Legacy,
75};
76
77class EC_Mul2Table_Data;
78class EC_Group_Data;
79class EC_Group_Data_Map;
80
81/**
82* Class representing an elliptic curve
83*
84* The internal representation is stored in a shared_ptr, so copying an
85* EC_Group is inexpensive.
86*/
88 public:
89 /**
90 * Construct elliptic curve from the specified parameters
91 *
92 * This is used for example to create custom (application-specific) curves.
93 *
94 * Some build configurations do not support application specific curves, in
95 * which case this constructor will throw an exception. You can check for
96 * this situation beforehand using the function
97 * EC_Group::supports_application_specific_group()
98 *
99 * @param p the elliptic curve p
100 * @param a the elliptic curve a param
101 * @param b the elliptic curve b param
102 * @param base_x the x coordinate of the base point
103 * @param base_y the y coordinate of the base point
104 * @param order the order of the base point
105 * @param cofactor the cofactor
106 * @param oid an optional OID used to identify this curve
107 *
108 * @warning This constructor is deprecated and will be removed in Botan 4
109 *
110 * @warning support for cofactors > 1 is deprecated and will be removed
111 *
112 * @warning support for prime fields > 521 bits is deprecated and
113 * will be removed.
114 *
115 * @warning Support for explicitly encoded curve parameters is deprecated.
116 * An OID must be assigned.
117 */
118 BOTAN_DEPRECATED("Use alternate constructor")
119 EC_Group(const BigInt& p,
120 const BigInt& a,
121 const BigInt& b,
122 const BigInt& base_x,
123 const BigInt& base_y,
124 const BigInt& order,
125 const BigInt& cofactor,
126 const OID& oid = OID());
127
128 /**
129 * Construct elliptic curve from the specified parameters
130 *
131 * This is used for example to create custom (application-specific) curves.
132 *
133 * Some build configurations do not support application specific curves, in
134 * which case this constructor will throw an exception. You can check for
135 * this situation beforehand using the function
136 * EC_Group::supports_application_specific_group()
137 *
138 * Unlike the deprecated constructor, this constructor imposes additional
139 * restrictions on the parameters, namely:
140 *
141 * - An object identifier must be provided
142 *
143 * - The prime must be at least 192 bits and at most 512 bits, and a multiple
144 * of 32 bits. Currently, as long as BOTAN_DISABLE_DEPRECATED_FEATURES is not
145 * set, this constructor accepts primes as small as 128 bits - this lower
146 * bound will be removed in the next major release.
147 *
148 * - As an extension of the above restriction, the prime can also be exactly
149 * the 521-bit Mersenne prime (2**521-1) or exactly the 239-bit prime used in
150 * X9.62 239 bit groups (2**239 - 2**143 - 2**95 + 2**47 - 1)
151 *
152 * - The prime must be congruent to 3 modulo 4
153 *
154 * - The group order must have the same bit length as the prime. It is allowed
155 * for the order to be larger than p, but they must have the same bit length.
156 *
157 * - Only prime order curves (with cofactor == 1) are allowed
158 *
159 * @warning use only elliptic curve parameters that you trust
160 *
161 * @param oid an object identifier used to identify this curve
162 * @param p the elliptic curve prime (at most 521 bits)
163 * @param a the elliptic curve a param
164 * @param b the elliptic curve b param
165 * @param base_x the x coordinate of the group generator
166 * @param base_y the y coordinate of the group generator
167 * @param order the order of the group
168 */
169 EC_Group(const OID& oid,
170 const BigInt& p,
171 const BigInt& a,
172 const BigInt& b,
173 const BigInt& base_x,
174 const BigInt& base_y,
175 const BigInt& order);
176
177 /**
178 * Decode a BER encoded ECC domain parameter set
179 * @param ber the bytes of the BER encoding
180 */
181 explicit EC_Group(std::span<const uint8_t> ber);
182
183 BOTAN_DEPRECATED("Use EC_Group(std::span)")
184 EC_Group(const uint8_t ber[], size_t ber_len) : EC_Group(std::span{ber, ber_len}) {}
185
186 /**
187 * Create an EC domain by OID (or throw if unknown)
188 * @param oid the OID of the EC domain to create
189 */
190 BOTAN_DEPRECATED("Use EC_Group::from_OID") explicit EC_Group(const OID& oid) { *this = EC_Group::from_OID(oid); }
191
192 /**
193 * Create an EC domain from PEM encoding (as from PEM_encode()), or
194 * from an OID name (eg "secp256r1", or "1.2.840.10045.3.1.7")
195 * @param pem_or_oid PEM-encoded data, or an OID
196 *
197 * @warning Support for PEM in this function is deprecated. Use
198 * EC_Group::from_PEM or EC_Group::from_OID or EC_Group::from_name
199 */
200 BOTAN_DEPRECATED("Use EC_Group::from_{name,OID,PEM}") explicit EC_Group(std::string_view pem_or_oid);
201
202 /**
203 * Initialize an EC group from the PEM/ASN.1 encoding
204 */
205 static EC_Group from_PEM(std::string_view pem);
206
207 /**
208 * Initialize an EC group from a group named by an object identifier
209 */
210 static EC_Group from_OID(const OID& oid);
211
212 /**
213 * Initialize an EC group from a group common name (eg "secp256r1")
214 */
215 static EC_Group from_name(std::string_view name);
216
217 BOTAN_DEPRECATED("Use EC_Group::from_PEM") static EC_Group EC_Group_from_PEM(std::string_view pem) {
218 return EC_Group::from_PEM(pem);
219 }
220
221 /**
222 * Create an uninitialized EC_Group
223 */
224 BOTAN_DEPRECATED("Deprecated no replacement") EC_Group();
225
227
229 EC_Group(EC_Group&&) = default;
230
231 EC_Group& operator=(const EC_Group&);
232 EC_Group& operator=(EC_Group&&) = default;
233
234 bool initialized() const { return (m_data != nullptr); }
235
236 /**
237 * Verify EC_Group domain
238 * @returns true if group is valid. false otherwise
239 */
240 bool verify_group(RandomNumberGenerator& rng, bool strong = false) const;
241
242 bool operator==(const EC_Group& other) const;
243
244 EC_Group_Source source() const;
245
246 /**
247 * Return true if in this build configuration it is possible to
248 * register an application specific elliptic curve.
249 */
250 static bool supports_application_specific_group();
251
252 /**
253 * Return true if in this build configuration EC_Group::from_name(name) will succeed
254 */
255 static bool supports_named_group(std::string_view name);
256
257 /**
258 * Return true if this EC_Group was derived from an explicit encoding
259 *
260 * Explicit encoding of groups is deprecated; when support for explicit curves
261 * is removed in a future major release, this function will also be removed.
262 */
263 bool used_explicit_encoding() const { return m_explicit_encoding; }
264
265 /**
266 * Return how this EC_Group is implemented under the hood
267 *
268 * This is mostly useful for diagnostic or debugging purposes
269 */
270 EC_Group_Engine engine() const;
271
272 /**
273 * Return a set of known named EC groups
274 *
275 * This returns the set of groups for which from_name should succeed
276 * Note that the set of included groups can vary based on the
277 * build configuration.
278 */
279 static const std::set<std::string>& known_named_groups();
280
281 /**
282 * Create the DER encoding of this domain
283 * @param form of encoding to use
284 * @returns the group information encoded as DER
285 */
286 BOTAN_DEPRECATED("Use the variant that does not take EC_Group_Encoding")
287 std::vector<uint8_t> DER_encode(EC_Group_Encoding form) const;
288
289 /**
290 * Create the DER encoding of this domain, using namedCurve format
291 * @returns the group information encoded as DER
292 */
293 std::vector<uint8_t> DER_encode() const;
294
295 /**
296 * Return the PEM encoding (always in explicit form)
297 * @return string containing PEM data
298 */
299 std::string PEM_encode() const;
300
301 /**
302 * Return the size of p in bits (same as get_p().bits())
303 */
304 size_t get_p_bits() const;
305
306 /**
307 * Return the size of p in bytes (same as get_p().bytes())
308 */
309 size_t get_p_bytes() const;
310
311 /**
312 * Return the size of group order in bits (same as get_order().bits())
313 */
314 size_t get_order_bits() const;
315
316 /**
317 * Return the size of the group order in bytes (same as get_order().bytes())
318 */
319 size_t get_order_bytes() const;
320
321 /// Table for computing g*x + h*y
323 public:
324 /**
325 * Create a table for computing g*x + h*y
326 */
327 Mul2Table(const EC_AffinePoint& h);
328
329 /**
330 * Return the elliptic curve point g*x + h*y
331 *
332 * Where g is the group generator and h is the value passed to the constructor
333 *
334 * Returns nullopt if g*x + h*y was the point at infinity
335 *
336 * @warning this function is variable time with respect to x and y
337 */
338 std::optional<EC_AffinePoint> mul2_vartime(const EC_Scalar& x, const EC_Scalar& y) const;
339
340 /**
341 * Check if v equals the x coordinate of g*x + h*y reduced modulo the order
342 *
343 * Where g is the group generator and h is the value passed to the constructor
344 *
345 * Returns false if unequal, including if g*x + h*y was the point at infinity
346 *
347 * @warning this function is variable time with respect to x and y
348 */
349 bool mul2_vartime_x_mod_order_eq(const EC_Scalar& v, const EC_Scalar& x, const EC_Scalar& y) const;
350
351 /**
352 * Check if v equals the x coordinate of g*x*c + h*y*c reduced modulo the order
353 *
354 * Where g is the group generator and h is the value passed to the constructor
355 *
356 * Returns false if unequal, including if g*x*c + h*y*c was the point at infinity
357 *
358 * @warning this function is variable time with respect to x and y
359 */
360 bool mul2_vartime_x_mod_order_eq(const EC_Scalar& v,
361 const EC_Scalar& c,
362 const EC_Scalar& x,
363 const EC_Scalar& y) const;
364
366
367 private:
368 std::unique_ptr<EC_Mul2Table_Data> m_tbl;
369 };
370
371 /**
372 * Return the OID of these domain parameters
373 * @result the OID
374 */
375 const OID& get_curve_oid() const;
376
377 /**
378 * Return the prime modulus of the field
379 */
380 const BigInt& get_p() const;
381
382 /**
383 * Return the a parameter of the elliptic curve equation
384 */
385 const BigInt& get_a() const;
386
387 /**
388 * Return the b parameter of the elliptic curve equation
389 */
390 const BigInt& get_b() const;
391
392 /**
393 * Return the x coordinate of the base point
394 */
395 const BigInt& get_g_x() const;
396
397 /**
398 * Return the y coordinate of the base point
399 */
400 const BigInt& get_g_y() const;
401
402 /**
403 * Return the order of the base point
404 * @result order of the base point
405 */
406 const BigInt& get_order() const;
407
408 /**
409 * Return the cofactor
410 * @result the cofactor
411 * TODO(Botan4): Remove this
412 */
413 const BigInt& get_cofactor() const;
414
415 /**
416 * Return true if the cofactor is > 1
417 * TODO(Botan4): Remove this
418 */
419 bool has_cofactor() const;
420
421 /*
422 * For internal use only
423 * TODO(Botan4): Add underscore prefix
424 */
425 static std::shared_ptr<EC_Group_Data> EC_group_info(const OID& oid);
426
427 /*
428 * For internal use only
429 * TODO(Botan4): Add underscore prefix
430 */
431 static size_t clear_registered_curve_data();
432
433 /*
434 * For internal use only
435 * TODO(Botan4): Add underscore prefix
436 */
437 static OID EC_group_identity_from_order(const BigInt& order);
438
439 /*
440 * For internal use only
441 */
442 const std::shared_ptr<EC_Group_Data>& _data() const { return m_data; }
443
444#if defined(BOTAN_HAS_LEGACY_EC_POINT)
445 /**
446 * Check if y is a plausible point on the curve
447 *
448 * In particular, checks that it is a point on the curve, not infinity,
449 * and that it has order matching the group.
450 */
451 bool verify_public_element(const EC_Point& y) const;
452
453 /**
454 * OS2ECP (Octet String To Elliptic Curve Point)
455 *
456 * Deserialize an encoded point. Verifies that the point is on the curve.
457 */
458 BOTAN_DEPRECATED("Use EC_AffinePoint::deserialize") EC_Point OS2ECP(const uint8_t bits[], size_t len) const {
459 return EC_AffinePoint(*this, std::span{bits, len}).to_legacy_point();
460 }
461
462 BOTAN_DEPRECATED("Use EC_AffinePoint::deserialize")
463 EC_Point OS2ECP(std::span<const uint8_t> encoded_point) const {
464 return EC_AffinePoint(*this, encoded_point).to_legacy_point();
465 }
466
467 /**
468 * Return group base point
469 * @result base point
470 */
471 BOTAN_DEPRECATED("Use EC_AffinePoint::generator") const EC_Point& get_base_point() const;
472
473 // Everything below here will be removed in a future release:
474
475 /**
476 * Return the canonical group generator
477 * @result standard generator of the curve
478 */
479 BOTAN_DEPRECATED("Use EC_AffinePoint::generator") const EC_Point& generator() const;
480
481 /**
482 * Multi exponentiate. Not constant time.
483 * @return base_point*x + h*y
484 */
485 BOTAN_DEPRECATED("Use EC_Group::Mul2Table")
486 EC_Point point_multiply(const BigInt& x_bn, const EC_Point& h_pt, const BigInt& y_bn) const {
487 auto x = EC_Scalar::from_bigint(*this, x_bn);
488 auto y = EC_Scalar::from_bigint(*this, y_bn);
489 auto h = EC_AffinePoint(*this, h_pt);
490
491 Mul2Table gh_mul(h);
492
493 if(auto r = gh_mul.mul2_vartime(x, y)) {
494 return r->to_legacy_point();
495 } else {
496 return EC_AffinePoint::identity(*this).to_legacy_point();
497 }
498 }
499
500 /**
501 * Blinded point multiplication, attempts resistance to side channels
502 * @param k_bn the scalar
503 * @param rng a random number generator
504 * @param ws a temp workspace
505 * @return base_point*k
506 */
507 BOTAN_DEPRECATED("Use EC_AffinePoint and EC_Scalar")
508 EC_Point
509 blinded_base_point_multiply(const BigInt& k_bn, RandomNumberGenerator& rng, std::vector<BigInt>& ws) const {
510 auto k = EC_Scalar::from_bigint(*this, k_bn);
511 auto pt = EC_AffinePoint::g_mul(k, rng, ws);
512 return pt.to_legacy_point();
513 }
514
515 /**
516 * Blinded point multiplication, attempts resistance to side channels
517 * Returns just the x coordinate of the point
518 *
519 * @param k_bn the scalar
520 * @param rng a random number generator
521 * @param ws a temp workspace
522 * @return x coordinate of base_point*k
523 */
524 BOTAN_DEPRECATED("Use EC_AffinePoint and EC_Scalar")
525 BigInt
526 blinded_base_point_multiply_x(const BigInt& k_bn, RandomNumberGenerator& rng, std::vector<BigInt>& ws) const {
527 auto k = EC_Scalar::from_bigint(*this, k_bn);
528 return BigInt(EC_AffinePoint::g_mul(k, rng, ws).x_bytes());
529 }
530
531 /**
532 * Blinded point multiplication, attempts resistance to side channels
533 * @param point input point
534 * @param k_bn the scalar
535 * @param rng a random number generator
536 * @param ws a temp workspace
537 * @return point*k
538 */
539 BOTAN_DEPRECATED("Use EC_AffinePoint and EC_Scalar")
540 EC_Point blinded_var_point_multiply(const EC_Point& point,
541 const BigInt& k_bn,
542 RandomNumberGenerator& rng,
543 std::vector<BigInt>& ws) const {
544 auto k = EC_Scalar::from_bigint(*this, k_bn);
545 auto pt = EC_AffinePoint(*this, point);
546 return pt.mul(k, rng, ws).to_legacy_point();
547 }
548
549 /**
550 * Return a random scalar ie an integer in [1,order)
551 */
552 BOTAN_DEPRECATED("Use EC_Scalar::random") BigInt random_scalar(RandomNumberGenerator& rng) const {
553 return EC_Scalar::random(*this, rng).to_bigint();
554 }
555
556 /**
557 * Hash onto the curve.
558 * For some curve types no mapping is currently available, in this
559 * case this function will throw an exception.
560 *
561 * @param hash_fn the hash function to use (typically "SHA-256" or "SHA-512")
562 * @param input the input to hash
563 * @param input_len length of input in bytes
564 * @param domain_sep a domain seperator
565 * @param domain_sep_len length of domain_sep in bytes
566 * @param random_oracle if the mapped point must be uniform (use
567 "true" here unless you know what you are doing)
568 */
569 BOTAN_DEPRECATED("Use EC_AffinePoint")
570 EC_Point hash_to_curve(std::string_view hash_fn,
571 const uint8_t input[],
572 size_t input_len,
573 const uint8_t domain_sep[],
574 size_t domain_sep_len,
575 bool random_oracle = true) const {
576 auto inp = std::span{input, input_len};
577 auto dst = std::span{domain_sep, domain_sep_len};
578
579 if(random_oracle) {
580 return EC_AffinePoint::hash_to_curve_ro(*this, hash_fn, inp, dst).to_legacy_point();
581 } else {
582 return EC_AffinePoint::hash_to_curve_nu(*this, hash_fn, inp, dst).to_legacy_point();
583 }
584 }
585
586 /**
587 * Hash onto the curve.
588 * For some curve types no mapping is currently available, in this
589 * case this function will throw an exception.
590 *
591 * @param hash_fn the hash function to use (typically "SHA-256" or "SHA-512")
592 * @param input the input to hash
593 * @param input_len length of input in bytes
594 * @param domain_sep a domain seperator
595 * @param random_oracle if the mapped point must be uniform (use
596 "true" here unless you know what you are doing)
597 */
598 BOTAN_DEPRECATED("Use EC_AffinePoint")
599 EC_Point hash_to_curve(std::string_view hash_fn,
600 const uint8_t input[],
601 size_t input_len,
602 std::string_view domain_sep,
603 bool random_oracle = true) const {
604 auto inp = std::span{input, input_len};
605 auto dst = std::span{reinterpret_cast<const uint8_t*>(domain_sep.data()), domain_sep.size()};
606
607 if(random_oracle) {
608 return EC_AffinePoint::hash_to_curve_ro(*this, hash_fn, inp, dst).to_legacy_point();
609 } else {
610 return EC_AffinePoint::hash_to_curve_nu(*this, hash_fn, inp, dst).to_legacy_point();
611 }
612 }
613
614 /**
615 * Return a point on this curve with the affine values x, y
616 */
617 BOTAN_DEPRECATED("Deprecated - use EC_AffinePoint") EC_Point point(const BigInt& x, const BigInt& y) const {
618 if(auto pt = EC_AffinePoint::from_bigint_xy(*this, x, y)) {
619 return pt->to_legacy_point();
620 } else {
621 throw Decoding_Error("Invalid x/y coordinates for elliptic curve point");
622 }
623 }
624
625 /**
626 * Return the zero (or infinite) point on this curve
627 */
628 BOTAN_DEPRECATED("Deprecated no replacement") EC_Point zero_point() const {
629 return EC_AffinePoint::identity(*this).to_legacy_point();
630 }
631#endif
632
633 /**
634 * Return if a == -3 mod p
635 */
636 BOTAN_DEPRECATED("Deprecated no replacement") bool a_is_minus_3() const { return get_a() + 3 == get_p(); }
637
638 /**
639 * Return if a == 0 mod p
640 */
641 BOTAN_DEPRECATED("Deprecated no replacement") bool a_is_zero() const { return get_a().is_zero(); }
642
643 /*
644 * Reduce x modulo the order
645 */
646 BOTAN_DEPRECATED("Use EC_Scalar") BigInt mod_order(const BigInt& x) const {
647 return EC_Scalar::from_bytes_mod_order(*this, x.serialize()).to_bigint();
648 }
649
650 /*
651 * Return inverse of x modulo the order
652 */
653 BOTAN_DEPRECATED("Use EC_Scalar") BigInt inverse_mod_order(const BigInt& x) const {
654 return EC_Scalar::from_bigint(*this, x).invert().to_bigint();
655 }
656
657 /*
658 * Reduce (x*x) modulo the order
659 */
660 BOTAN_DEPRECATED("Use EC_Scalar") BigInt square_mod_order(const BigInt& x) const {
661 auto xs = EC_Scalar::from_bigint(*this, x);
662 xs.square_self();
663 return xs.to_bigint();
664 }
665
666 /*
667 * Reduce (x*y) modulo the order
668 */
669 BOTAN_DEPRECATED("Use EC_Scalar") BigInt multiply_mod_order(const BigInt& x, const BigInt& y) const {
670 auto xs = EC_Scalar::from_bigint(*this, x);
671 auto ys = EC_Scalar::from_bigint(*this, y);
672 return (xs * ys).to_bigint();
673 }
674
675 /*
676 * Reduce (x*y*z) modulo the order
677 */
678 BOTAN_DEPRECATED("Use EC_Scalar")
679 BigInt multiply_mod_order(const BigInt& x, const BigInt& y, const BigInt& z) const {
680 auto xs = EC_Scalar::from_bigint(*this, x);
681 auto ys = EC_Scalar::from_bigint(*this, y);
682 auto zs = EC_Scalar::from_bigint(*this, z);
683 return (xs * ys * zs).to_bigint();
684 }
685
686 /*
687 * Return x^3 modulo the order
688 */
689 BOTAN_DEPRECATED("Deprecated no replacement") BigInt cube_mod_order(const BigInt& x) const {
690 auto xs = EC_Scalar::from_bigint(*this, x);
691 return (xs * xs * xs).to_bigint();
692 }
693
694 BOTAN_DEPRECATED("Just serialize the point and check") size_t point_size(EC_Point_Format format) const {
695 // Hybrid and standard format are (x,y), compressed is y, +1 format byte
696 if(format == EC_Point_Format::Compressed) {
697 return (1 + get_p_bytes());
698 } else {
699 return (1 + 2 * get_p_bytes());
700 }
701 }
702
703 private:
704 static EC_Group_Data_Map& ec_group_data();
705
706 EC_Group(std::shared_ptr<EC_Group_Data>&& data);
707
708 static std::pair<std::shared_ptr<EC_Group_Data>, bool> BER_decode_EC_group(std::span<const uint8_t> ber,
709 EC_Group_Source source);
710
711 static std::shared_ptr<EC_Group_Data> load_EC_group_info(const char* p,
712 const char* a,
713 const char* b,
714 const char* g_x,
715 const char* g_y,
716 const char* order,
717 const OID& oid);
718
719 const EC_Group_Data& data() const;
720
721 // Member data
722 std::shared_ptr<EC_Group_Data> m_data;
723 bool m_explicit_encoding = false;
724};
725
726inline bool operator!=(const EC_Group& lhs, const EC_Group& rhs) {
727 return !(lhs == rhs);
728}
729
730} // namespace Botan
731
732#endif
#define BOTAN_PUBLIC_API(maj, min)
Definition api.h:19
#define BOTAN_DEPRECATED(msg)
Definition api.h:59
Table for computing g*x + h*y.
Definition ec_group.h:322
bool used_explicit_encoding() const
Definition ec_group.h:263
const std::shared_ptr< EC_Group_Data > & _data() const
Definition ec_group.h:442
std::string name
int(* final)(unsigned char *, CTX *)
EC_Group_Source
Definition ec_group.h:56
EC_Group_Engine
Definition ec_group.h:66
@ Optimized
Using per curve implementation; fastest available.
@ Generic
A generic implementation that handles many curves in one implementation.
bool operator!=(const AlgorithmIdentifier &a1, const AlgorithmIdentifier &a2)
Definition alg_id.cpp:69
bool operator==(const AlgorithmIdentifier &a1, const AlgorithmIdentifier &a2)
Definition alg_id.cpp:54
const SIMD_8x32 & b
EC_Group_Encoding
Definition ec_group.h:36