@@ -361,20 +361,70 @@ psa_status_t cracen_spake2p_get_shared_key(cracen_spake2p_operation_t *operation
361
361
362
362
psa_status_t cracen_spake2p_abort (cracen_spake2p_operation_t * operation );
363
363
364
- int ed25519_sign (const uint8_t * privkey , char * signature ,
365
- const uint8_t * message , size_t message_length );
364
+ int ed25519_sign (const uint8_t * privkey , char * signature , const uint8_t * message ,
365
+ size_t message_length );
366
366
367
- int ed25519_verify (const uint8_t * pubkey , const char * message ,
368
- size_t message_length , const char * signature );
367
+ int ed25519_verify (const uint8_t * pubkey , const char * message , size_t message_length ,
368
+ const char * signature );
369
369
370
+ int ed25519ph_sign (const uint8_t * privkey , char * signature , const uint8_t * message ,
371
+ size_t message_length , int ismessage );
370
372
371
- int ed25519ph_sign (const uint8_t * privkey , char * signature ,
372
- const uint8_t * message , size_t message_length , int ismessage );
373
+ int ed25519ph_verify (const uint8_t * pubkey , const char * message , size_t message_length ,
374
+ const char * signature , int ismessage );
373
375
374
- int ed25519ph_verify (const uint8_t * pubkey , const char * message ,
375
- size_t message_length , const char * signature , int ismessage );
376
+ int ed25519_create_pubkey (const uint8_t * privkey , uint8_t * pubkey );
376
377
377
- int ed25519_create_pubkey (const uint8_t * privkey ,
378
- uint8_t * pubkey );
378
+ int be_cmp (const unsigned char * a , const unsigned char * b , size_t sz , int carry );
379
+
380
+ struct sx_pk_ecurve ;
381
+
382
+ struct ecdsa_signature {
383
+ size_t sz ; /**< Total signature size, in bytes. */
384
+ char * r ; /**< Signature element "r". */
385
+ char * s ; /**< Signature element "s". */
386
+ };
387
+ struct eccsk {
388
+ const struct sx_pk_ecurve * curve ;
389
+ char * d ;
390
+ };
391
+
392
+ struct eccpk {
393
+ const struct sx_pk_ecurve * curve ;
394
+ char * qx ;
395
+ char * qy ;
396
+ };
397
+
398
+ struct ecc_keypair {
399
+ struct eccsk sk ;
400
+ struct eccpk pk ;
401
+ };
402
+
403
+ int ecc_create_genpubkey (char * priv_key , char * pub_key , const struct sx_pk_ecurve * curve );
404
+
405
+ int ecc_create_genprivkey (const struct sx_pk_ecurve * curve , char * priv_key , size_t priv_key_size );
406
+
407
+ int cracen_ecdsa_verify (char * pubkey , const struct sxhashalg * hashalg , const uint8_t * message ,
408
+ size_t message_length , const struct sx_pk_ecurve * curve ,
409
+ const uint8_t * signature );
410
+
411
+ int cracen_ecdsa_sign (const struct eccsk * privkey , size_t privkey_size ,
412
+ const struct sxhashalg * hashalg , const struct sx_pk_ecurve * curve ,
413
+ const uint8_t * message , size_t message_length , uint8_t * signature ,
414
+ size_t signature_size , size_t * signature_length );
415
+
416
+ int cracen_ecdsa_sign_deterministic (const struct eccsk * privkey , size_t privkey_size ,
417
+ const struct sxhashalg * hashalg ,
418
+ const struct sx_pk_ecurve * curve , const uint8_t * digest ,
419
+ size_t digest_length , uint8_t * signature , size_t signature_size ,
420
+ size_t * signature_length );
421
+
422
+ int rndinrange_create (const unsigned char * n , size_t nsz , unsigned char * out );
423
+
424
+ int mac_create_hmac (const struct sxhashalg * hashalg , struct sxhash * hashopctx , const char * key ,
425
+ size_t keysz , char * workmem , size_t workmemsz );
426
+
427
+ int hmac_produce (struct sxhash * hashctx , const struct sxhashalg * hashalg , char * out , size_t sz ,
428
+ char * workmem );
379
429
380
430
#endif /* CRACEN_PSA_H */
0 commit comments