1 /*!
2     \ingroup Curve448
3 
4     \brief This function generates a Curve448 key using the given random
5     number generator, rng, of the size given (keysize), and stores it in
6     the given curve448_key structure. It should be called after the key
7     structure has been initialized through wc_curve448_init().
8 
9     \return 0 Returned on successfully generating the key and and storing
10     it in the given curve448_key structure.
11     \return ECC_BAD_ARG_E Returned if the input keysize does not correspond to
12     the keysize for a curve448 key (56 bytes).
13     \return RNG_FAILURE_E Returned if the rng internal status is not
14     DRBG_OK or if there is in generating the next random block with rng.
15     \return BAD_FUNC_ARG Returned if any of the input parameters passed in
16     are NULL.
17 
18     \param [in] rng Pointer to the RNG object used to generate the ecc key.
19     \param [in] keysize Size of the key to generate. Must be 56 bytes for
20     curve448.
21     \param [in,out] key Pointer to the curve448_key structure in which to
22     store the generated key.
23 
24     _Example_
25     \code
26     int ret;
27 
28     curve448_key key;
29     wc_curve448_init(&key); // initialize key
30     WC_RNG rng;
31     wc_InitRng(&rng); // initialize random number generator
32 
33     ret = wc_curve448_make_key(&rng, 56, &key);
34     if (ret != 0) {
35         // error making Curve448 key
36     }
37     \endcode
38 
39     \sa wc_curve448_init
40 */
41 WOLFSSL_API
42 int wc_curve448_make_key(WC_RNG* rng, int keysize, curve448_key* key);
43 
44 /*!
45     \ingroup Curve448
46 
47     \brief This function computes a shared secret key given a secret private
48     key and a received public key. It stores the generated secret key in the
49     buffer out and assigns the variable of the secret key to outlen. Only
50     supports big endian.
51 
52     \return 0 Returned on successfully computing a shared secret key
53     \return BAD_FUNC_ARG Returned if any of the input parameters passed in
54     are NULL
55 
56     \param [in] private_key Pointer to the curve448_key structure initialized
57     with the user’s private key.
58     \param [in] public_key Pointer to the  curve448_key structure containing
59     the received public key.
60     \param [out] out Pointer to a buffer in which to store the 56 byte computed
61     secret key.
62     \param [in,out] outlen Pointer in which to store the length written to the
63     output buffer.
64 
65     _Example_
66     \code
67     int ret;
68 
69     byte sharedKey[56];
70     word32 keySz;
71     curve448_key privKey, pubKey;
72     // initialize both keys
73 
74     ret = wc_curve448_shared_secret(&privKey, &pubKey, sharedKey, &keySz);
75     if (ret != 0) {
76         // error generating shared key
77     }
78     \endcode
79 
80     \sa wc_curve448_init
81     \sa wc_curve448_make_key
82     \sa wc_curve448_shared_secret_ex
83 */
84 WOLFSSL_API
85 int wc_curve448_shared_secret(curve448_key* private_key,
86                                 curve448_key* public_key,
87                                 byte* out, word32* outlen);
88 
89 /*!
90     \ingroup Curve448
91 
92     \brief This function computes a shared secret key given a secret private
93     key and a received public key. It stores the generated secret key in the
94     buffer out and assigns the variable of the secret key to outlen. Supports
95     both big and little endian.
96 
97     \return 0 Returned on successfully computing a shared secret key.
98     \return BAD_FUNC_ARG Returned if any of the input parameters passed in
99     are NULL.
100 
101     \param [in] private_key Pointer to the curve448_key structure initialized
102     with the user’s private key.
103     \param [in] public_key Pointer to the  curve448_key structure containing
104     the received public key.
105     \param [out] out Pointer to a buffer in which to store the 56 byte computed
106     secret key.
107     \param [in,out] outlen Pointer in which to store the length written to the
108     output buffer.
109     \param [in] endian EC448_BIG_ENDIAN or EC448_LITTLE_ENDIAN to set which
110     form to use.
111 
112     _Example_
113     \code
114     int ret;
115 
116     byte sharedKey[56];
117     word32 keySz;
118 
119     curve448_key privKey, pubKey;
120     // initialize both keys
121 
122     ret = wc_curve448_shared_secret_ex(&privKey, &pubKey, sharedKey, &keySz,
123             EC448_BIG_ENDIAN);
124     if (ret != 0) {
125         // error generating shared key
126     }
127     \endcode
128 
129     \sa wc_curve448_init
130     \sa wc_curve448_make_key
131     \sa wc_curve448_shared_secret
132 */
133 WOLFSSL_API
134 int wc_curve448_shared_secret_ex(curve448_key* private_key,
135                                    curve448_key* public_key,
136                                    byte* out, word32* outlen, int endian);
137 
138 /*!
139     \ingroup Curve448
140 
141     \brief This function initializes a Curve448 key. It should be called
142     before generating a key for the structure.
143 
144     \return 0 Returned on successfully initializing the curve448_key structure.
145     \return BAD_FUNC_ARG Returned when key is NULL.
146 
147     \param [in,out] key Pointer to the curve448_key structure to initialize.
148 
149     _Example_
150     \code
151     curve448_key key;
152     wc_curve448_init(&key); // initialize key
153     // make key and proceed to encryption
154     \endcode
155 
156     \sa wc_curve448_make_key
157 */
158 WOLFSSL_API
159 int wc_curve448_init(curve448_key* key);
160 
161 /*!
162     \ingroup Curve448
163 
164     \brief This function frees a Curve448 object.
165 
166     \param [in,out] key Pointer to the key object to free.
167 
168     _Example_
169     \code
170     curve448_key privKey;
171     // initialize key, use it to generate shared secret key
172     wc_curve448_free(&privKey);
173     \endcode
174 
175     \sa wc_curve448_init
176     \sa wc_curve448_make_key
177 */
178 WOLFSSL_API
179 void wc_curve448_free(curve448_key* key);
180 
181 /*!
182     \ingroup Curve448
183 
184     \brief This function imports a curve448 private key only. (Big endian).
185 
186     \return 0 Returned on successfully importing private key.
187     \return BAD_FUNC_ARG Returns if key or priv is null.
188     \return ECC_BAD_ARG_E Returns if privSz is not equal to CURVE448_KEY_SIZE.
189 
190     \param [in] priv Pointer to a buffer containing the private key to import.
191     \param [in] privSz Length of the private key to import.
192     \param [in,out] key Pointer to the structure in which to store the imported
193     key.
194 
195     _Example_
196     \code
197     int ret;
198 
199     byte priv[] = { Contents of private key };
200     curve448_key key;
201     wc_curve448_init(&key);
202 
203     ret = wc_curve448_import_private(priv, sizeof(priv), &key);
204     if (ret != 0) {
205         // error importing key
206     }
207     \endcode
208 
209     \sa wc_curve448_import_private_ex
210     \sa wc_curve448_size
211 */
212 WOLFSSL_API
213 int wc_curve448_import_private(const byte* priv, word32 privSz,
214                                  curve448_key* key);
215 
216 /*!
217     \ingroup Curve448
218 
219     \brief curve448 private key import only. (Big or Little endian).
220 
221     \return 0 Returned on successfully importing private key.
222     \return BAD_FUNC_ARG Returns if key or priv is null.
223     \return ECC_BAD_ARG_E Returns if privSz is not equal to CURVE448_KEY_SIZE.
224 
225     \param [in] priv Pointer to a buffer containing the private key to import.
226     \param [in] privSz Length of the private key to import.
227     \param [in,out] key Pointer to the structure in which to store the imported
228     key.
229     \param [in] endian EC448_BIG_ENDIAN or EC448_LITTLE_ENDIAN to
230     set which form to use.
231 
232     _Example_
233     \code
234     int ret;
235 
236     byte priv[] = { // Contents of private key };
237     curve448_key key;
238     wc_curve448_init(&key);
239 
240     ret = wc_curve448_import_private_ex(priv, sizeof(priv), &key,
241             EC448_BIG_ENDIAN);
242     if (ret != 0) {
243         // error importing key
244     }
245 
246     \endcode
247 
248     \sa wc_curve448_import_private
249     \sa wc_curve448_size
250 */
251 WOLFSSL_API
252 int wc_curve448_import_private_ex(const byte* priv, word32 privSz,
253                                     curve448_key* key, int endian);
254 
255 /*!
256     \ingroup Curve448
257 
258     \brief This function imports a public-private key pair into a
259     curve448_key structure.  Big endian only.
260 
261     \return 0 Returned on importing into the curve448_key structure.
262     \return BAD_FUNC_ARG Returns if any of the input parameters are null.
263     \return ECC_BAD_ARG_E Returned if the input key’s key size does not match
264     the public or private key sizes.
265 
266     \param [in] priv Pointer to a buffer containing the private key to import.
267     \param [in] privSz Length of the private key to import.
268     \param [in] pub Pointer to a buffer containing the public key to import.
269     \param [in] pubSz Length of the public key to import.
270     \param [in,out] key Pointer to the structure in which to store the imported
271     keys
272 
273     _Example_
274     \code
275     int ret;
276 
277     byte priv[56];
278     byte pub[56];
279     // initialize with public and private keys
280     curve448_key key;
281 
282     wc_curve448_init(&key);
283     // initialize key
284 
285     ret = wc_curve448_import_private_raw(&priv, sizeof(priv), pub, sizeof(pub),
286             &key);
287     if (ret != 0) {
288         // error importing keys
289     }
290     \endcode
291 
292     \sa wc_curve448_init
293     \sa wc_curve448_make_key
294     \sa wc_curve448_import_public
295     \sa wc_curve448_export_private_raw
296 */
297 WOLFSSL_API
298 int wc_curve448_import_private_raw(const byte* priv, word32 privSz,
299                             const byte* pub, word32 pubSz, curve448_key* key);
300 
301 /*!
302     \ingroup Curve448
303 
304     \brief This function imports a public-private key pair into a curve448_key structure.  Supports both big and little endian.
305 
306     \return 0 Returned on importing into the curve448_key structure.
307     \return BAD_FUNC_ARG Returns if any of the input parameters are null.
308     \return ECC_BAD_ARG_E Returned if the input key’s key size does not match
309     the public or private key sizes.
310 
311     \param [in] priv Pointer to a buffer containing the private key to import.
312     \param [in] privSz Length of the private key to import.
313     \param [in] pub Pointer to a buffer containing the public key to import.
314     \param [in] pubSz Length of the public key to import.
315     \param [in,out] key Pointer to the structure in which to store the imported
316     keys.
317     \param [in]  endian EC448_BIG_ENDIAN or EC448_LITTLE_ENDIAN to set
318     which form to use.
319 
320     _Example_
321     \code
322     int ret;
323 
324     byte priv[56];
325     byte pub[56];
326     // initialize with public and private keys
327     curve448_key key;
328 
329     wc_curve448_init(&key);
330     // initialize key
331 
332     ret = wc_curve448_import_private_raw_ex(&priv, sizeof(priv), pub,
333             sizeof(pub), &key, EC448_BIG_ENDIAN);
334     if (ret != 0) {
335         // error importing keys
336     }
337     \endcode
338 
339     \sa wc_curve448_init
340     \sa wc_curve448_make_key
341     \sa wc_curve448_import_public
342     \sa wc_curve448_export_private_raw
343     \sa wc_curve448_import_private_raw
344 */
345 WOLFSSL_API
346 int wc_curve448_import_private_raw_ex(const byte* priv, word32 privSz,
347                                         const byte* pub, word32 pubSz,
348                                         curve448_key* key, int endian);
349 
350 /*!
351     \ingroup Curve448
352 
353     \brief This function exports a private key from a curve448_key structure
354     and stores it in the given out buffer. It also sets outLen to be the size
355     of the exported key. Big Endian only.
356 
357     \return 0 Returned on successfully exporting the private key from the
358     curve448_key structure.
359     \return BAD_FUNC_ARG Returned if any input parameters are NULL.
360     \return ECC_BAD_ARG_E Returned if wc_curve448_size() is not equal to key.
361 
362     \param [in] key Pointer to the structure from which to export the key.
363     \param [out] out Pointer to the buffer in which to store the exported key.
364     \param [in,out] outLen On in, is the size of the out in bytes.
365     On out, will store the bytes written to the output buffer.
366 
367     _Example_
368     \code
369     int ret;
370     byte priv[56];
371     int privSz;
372 
373     curve448_key key;
374     // initialize and make key
375 
376     ret = wc_curve448_export_private_raw(&key, priv, &privSz);
377     if (ret != 0) {
378         // error exporting key
379     }
380     \endcode
381 
382     \sa wc_curve448_init
383     \sa wc_curve448_make_key
384     \sa wc_curve448_import_private_raw
385     \sa wc_curve448_export_private_raw_ex
386 */
387 WOLFSSL_API
388 int wc_curve448_export_private_raw(curve448_key* key, byte* out,
389                                      word32* outLen);
390 
391 /*!
392     \ingroup Curve448
393 
394     \brief This function exports a private key from a curve448_key structure
395     and stores it in the given out buffer. It also sets outLen to be the size
396     of the exported key.  Can specify whether it's big or little endian.
397 
398     \return 0 Returned on successfully exporting the private key from the
399     curve448_key structure.
400     \return BAD_FUNC_ARG Returned if any input parameters are NULL.
401     \return ECC_BAD_ARG_E Returned if wc_curve448_size() is not equal to key.
402 
403     \param [in] key Pointer to the structure from which to export the key.
404     \param [out] out Pointer to the buffer in which to store the exported key.
405     \param [in,out] outLen On in, is the size of the out in bytes.
406     On out, will store the bytes written to the output buffer.
407     \param [in] endian EC448_BIG_ENDIAN or EC448_LITTLE_ENDIAN to set which
408     form to use.
409 
410     _Example_
411     \code
412     int ret;
413 
414     byte priv[56];
415     int privSz;
416     curve448_key key;
417     // initialize and make key
418     ret = wc_curve448_export_private_raw_ex(&key, priv, &privSz,
419             EC448_BIG_ENDIAN);
420     if (ret != 0) {
421         // error exporting key
422     }
423     \endcode
424 
425     \sa wc_curve448_init
426     \sa wc_curve448_make_key
427     \sa wc_curve448_import_private_raw
428     \sa wc_curve448_export_private_raw
429     \sa wc_curve448_size
430 */
431 WOLFSSL_API
432 int wc_curve448_export_private_raw_ex(curve448_key* key, byte* out,
433                                         word32* outLen, int endian);
434 
435 /*!
436     \ingroup Curve448
437 
438     \brief This function imports a public key from the given in buffer and
439     stores it in the  curve448_key structure.
440 
441     \return 0 Returned on successfully importing the public key into the
442     curve448_key structure.
443     \return ECC_BAD_ARG_E Returned if the inLen parameter does not match the key
444     size of the key structure.
445     \return BAD_FUNC_ARG Returned if any of the input parameters are NULL.
446 
447     \param [in] in Pointer to the buffer containing the public key to import.
448     \param [in] inLen Length of the public key to import.
449     \param [in,out] key Pointer to the curve448_key structure in which to store
450     the key.
451 
452     _Example_
453     \code
454     int ret;
455 
456     byte pub[56];
457     // initialize pub with public key
458 
459     curve448_key key;
460     // initialize key
461 
462     ret = wc_curve448_import_public(pub,sizeof(pub), &key);
463     if (ret != 0) {
464         // error importing key
465     }
466     \endcode
467 
468     \sa wc_curve448_init
469     \sa wc_curve448_export_public
470     \sa wc_curve448_import_private_raw
471     \sa wc_curve448_import_public_ex
472     \sa wc_curve448_check_public
473     \sa wc_curve448_size
474 */
475 WOLFSSL_API
476 int wc_curve448_import_public(const byte* in, word32 inLen,
477                                 curve448_key* key);
478 
479 /*!
480     \ingroup Curve448
481 
482     \brief This function imports a public key from the given in buffer and
483     stores it in the  curve448_key structure.
484 
485     \return 0 Returned on successfully importing the public key into the
486     curve448_key structure.
487     \return ECC_BAD_ARG_E Returned if the inLen parameter does not match the
488     key size of the key structure.
489     \return BAD_FUNC_ARG Returned if any of the input parameters are NULL.
490 
491     \param [in] in Pointer to the buffer containing the public key to import.
492     \param [in] inLen Length of the public key to import.
493     \param [in,out] key Pointer to the curve448_key structure in which to store
494     the key.
495     \param [in] endian EC448_BIG_ENDIAN or EC448_LITTLE_ENDIAN to set which
496     form to use.
497 
498     _Example_
499     \code
500     int ret;
501 
502     byte pub[56];
503     // initialize pub with public key
504     curve448_key key;
505     // initialize key
506 
507     ret = wc_curve448_import_public_ex(pub, sizeof(pub), &key,
508             EC448_BIG_ENDIAN);
509     if (ret != 0) {
510         // error importing key
511     }
512     \endcode
513 
514     \sa wc_curve448_init
515     \sa wc_curve448_export_public
516     \sa wc_curve448_import_private_raw
517     \sa wc_curve448_import_public
518     \sa wc_curve448_check_public
519     \sa wc_curve448_size
520 */
521 WOLFSSL_API
522 int wc_curve448_import_public_ex(const byte* in, word32 inLen,
523                                    curve448_key* key, int endian);
524 
525 /*!
526     \ingroup Curve448
527 
528     \brief This function checks that a public key buffer holds a valid
529     Curve448 key value given the endian ordering.
530 
531     \return 0 Returned when the public key value is valid.
532     \return ECC_BAD_ARG_E Returned if the public key value is not valid.
533     \return BAD_FUNC_ARG Returned if any of the input parameters are NULL.
534 
535     \param [in] pub Pointer to the buffer containing the public key to check.
536     \param [in] pubLen Length of the public key to check.
537     \param [in] endian EC448_BIG_ENDIAN or EC448_LITTLE_ENDIAN to set which
538     form to use.
539 
540     _Example_
541     \code
542     int ret;
543 
544     byte pub[] = { Contents of public key };
545 
546     ret = wc_curve448_check_public_ex(pub, sizeof(pub), EC448_BIG_ENDIAN);
547     if (ret != 0) {
548         // error importing key
549     }
550     \endcode
551 
552     \sa wc_curve448_init
553     \sa wc_curve448_import_public
554     \sa wc_curve448_import_public_ex
555     \sa wc_curve448_size
556 */
557 WOLFSSL_API
558 int wc_curve448_check_public(const byte* pub, word32 pubSz, int endian);
559 
560 /*!
561     \ingroup Curve448
562 
563     \brief This function exports a public key from the given key structure and
564     stores the result in the out buffer. Big endian only.
565 
566     \return 0 Returned on successfully exporting the public key from the
567     curve448_key structure.
568     \return ECC_BAD_ARG_E Returned if outLen is less than CURVE448_PUB_KEY_SIZE.
569     \return BAD_FUNC_ARG Returned if any of the input parameters are NULL.
570 
571     \param [in] key Pointer to the curve448_key structure in from which to
572     export the key.
573     \param [out] out Pointer to the buffer in which to store the public key.
574     \param [in,out] outLen On in, is the size of the out in bytes.
575     On out, will store the bytes written to the output buffer.
576 
577     _Example_
578     \code
579     int ret;
580 
581     byte pub[56];
582     int pubSz;
583 
584     curve448_key key;
585     // initialize and make key
586 
587     ret = wc_curve448_export_public(&key, pub, &pubSz);
588     if (ret != 0) {
589         // error exporting key
590     }
591     \endcode
592 
593     \sa wc_curve448_init
594     \sa wc_curve448_export_private_raw
595     \sa wc_curve448_import_public
596 */
597 WOLFSSL_API
598 int wc_curve448_export_public(curve448_key* key, byte* out, word32* outLen);
599 
600 /*!
601     \ingroup Curve448
602 
603     \brief This function exports a public key from the given key structure and
604     stores the result in the out buffer. Supports both big and little endian.
605 
606     \return 0 Returned on successfully exporting the public key from the
607     curve448_key structure.
608     \return ECC_BAD_ARG_E Returned if outLen is less than CURVE448_PUB_KEY_SIZE.
609     \return BAD_FUNC_ARG Returned if any of the input parameters are NULL.
610 
611     \param [in] key Pointer to the curve448_key structure in from which to
612     export the key.
613     \param [out] out Pointer to the buffer in which to store the public key.
614     \param [in,out] outLen On in, is the size of the out in bytes.
615     On out, will store the bytes written to the output buffer.
616     \param [in] endian EC448_BIG_ENDIAN or EC448_LITTLE_ENDIAN to set which
617     form to use.
618 
619     _Example_
620     \code
621     int ret;
622 
623     byte pub[56];
624     int pubSz;
625 
626     curve448_key key;
627     // initialize and make key
628 
629     ret = wc_curve448_export_public_ex(&key, pub, &pubSz, EC448_BIG_ENDIAN);
630     if (ret != 0) {
631         // error exporting key
632     }
633     \endcode
634 
635     \sa wc_curve448_init
636     \sa wc_curve448_export_private_raw
637     \sa wc_curve448_import_public
638 */
639 WOLFSSL_API
640 int wc_curve448_export_public_ex(curve448_key* key, byte* out,
641                                    word32* outLen, int endian);
642 
643 /*!
644     \ingroup Curve448
645 
646     \brief This function exports a key pair from the given key structure and
647     stores the result in the out buffer. Big endian only.
648 
649     \return 0 Returned on successfully exporting the key pair from the
650     curve448_key structure.
651     \return BAD_FUNC_ARG Returned if any input parameters are NULL.
652     \return ECC_BAD_ARG_E Returned if privSz is less than CURVE448_KEY_SIZE or
653     pubSz is less than CURVE448_PUB_KEY_SIZE.
654 
655     \param [in] key Pointer to the curve448_key structure in from which to
656     export the key pair.
657     \param [out] priv Pointer to the buffer in which to store the private key.
658     \param [in,out] privSz On in, is the size of the priv buffer in bytes.
659     On out, will store the bytes written to the priv buffer.
660     \param [out] pub Pointer to the buffer in which to store the public key.
661     \param [in,out] pubSz On in, is the size of the pub buffer in bytes.
662     On out, will store the bytes written to the pub buffer.
663 
664     _Example_
665     \code
666     int ret;
667 
668     byte pub[56];
669     byte priv[56];
670     int pubSz;
671     int privSz;
672 
673     curve448_key key;
674     // initialize and make key
675 
676     ret = wc_curve448_export_key_raw(&key, priv, &privSz, pub, &pubSz);
677     if (ret != 0) {
678         // error exporting key
679     }
680     \endcode
681 
682     \sa wc_curve448_export_key_raw_ex
683     \sa wc_curve448_export_private_raw
684 */
685 WOLFSSL_API
686 int wc_curve448_export_key_raw(curve448_key* key,
687                                  byte* priv, word32 *privSz,
688                                  byte* pub, word32 *pubSz);
689 
690 /*!
691     \ingroup Curve448
692 
693     \brief Export curve448 key pair.  Big or little endian.
694     \brief This function exports a key pair from the given key structure and
695     stores the result in the out buffer. Big or little endian.
696 
697     \return 0 Success
698     \return BAD_FUNC_ARG Returned if any input parameters are NULL.
699     \return ECC_BAD_ARG_E Returned if privSz is less than CURVE448_KEY_SIZE or
700     pubSz is less than CURVE448_PUB_KEY_SIZE.
701 
702     \param [in] key Pointer to the curve448_key structure in from which to
703     export the key pair.
704     \param [out] priv Pointer to the buffer in which to store the private key.
705     \param [in,out] privSz On in, is the size of the priv buffer in bytes.
706     On out, will store the bytes written to the priv buffer.
707     \param [out] pub Pointer to the buffer in which to store the public key.
708     \param [in,out] pubSz On in, is the size of the pub buffer in bytes.
709     On out, will store the bytes written to the pub buffer.
710     \param [in] endian EC448_BIG_ENDIAN or EC448_LITTLE_ENDIAN to set which
711     form to use.
712 
713     _Example_
714     \code
715     int ret;
716 
717     byte pub[56];
718     byte priv[56];
719     int pubSz;
720     int privSz;
721 
722     curve448_key key;
723     // initialize and make key
724 
725     ret = wc_curve448_export_key_raw_ex(&key,priv, &privSz, pub, &pubSz,
726             EC448_BIG_ENDIAN);
727     if (ret != 0) {
728         // error exporting key
729     }
730     \endcode
731 
732     \sa wc_curve448_export_key_raw
733     \sa wc_curve448_export_private_raw_ex
734     \sa wc_curve448_export_public_ex
735 */
736 WOLFSSL_API
737 int wc_curve448_export_key_raw_ex(curve448_key* key,
738                                     byte* priv, word32 *privSz,
739                                     byte* pub, word32 *pubSz,
740                                     int endian);
741 
742 /*!
743     \ingroup Curve448
744 
745     \brief This function returns the key size of the given key structure.
746 
747     \return Success Given a valid, initialized curve448_key structure,
748     returns the size of the key.
749     \return 0 Returned if key is NULL.
750 
751     \param [in] key Pointer to the curve448_key structure in for which to
752     determine the key size.
753 
754     _Example_
755     \code
756     int keySz;
757 
758     curve448_key key;
759     // initialize and make key
760 
761     keySz = wc_curve448_size(&key);
762     \endcode
763 
764     \sa wc_curve448_init
765     \sa wc_curve448_make_key
766 */
767 WOLFSSL_API
768 int wc_curve448_size(curve448_key* key);
769