mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-12-05 17:11:09 +00:00
4.2 KiB
4.2 KiB
libSceLibreSsl
add Unknown function info
- EC error queue (libSceLibreSsl) - no console check. The EC, ECDSA and ECDH exports queue the reason codes of LibreSSL 2.5.4
ec_key.c,ec_curve.c,ecp_oct.c,ecs_ossl.candech_key.cfor the failures this port returns. Not queued: the ASN.1 errors of a signature that does not decode; allocation,BNand arithmetic failures, which throw;EC_POINT_newandEC_POINT_oct2point; a peer point at infinity of another curve inECDH_compute_key. LibreSSL built withoutOPENSSL_BN_ASM_MONTclears the queue whenEC_GROUP_new_by_curve_nameloads a non-NIST prime; the port keeps it. libSceLibreSsl3 forwards these exports, so its callers get the 2.5.4ERR_LIB_ECDSAandERR_LIB_ECDHcodes where 4.0.0 queuesERR_LIB_ECones
change [EC_GROUP_new_by_curve_name, EC_GROUP_free, EC_GROUP_get_degree, EC_KEY_new, EC_KEY_new_by_curve_name, EC_KEY_free, EC_KEY_set_group, EC_KEY_get0_group, ECDSA_size]
- EC_GROUP_new_by_curve_name, EC_GROUP_free, EC_GROUP_get_degree, EC_KEY_new, EC_KEY_new_by_curve_name, EC_KEY_free, EC_KEY_set_group, EC_KEY_get0_group, ECDSA_size (libSceLibreSsl) - not checked on the console. They follow LibreSSL 2.5.4's ec and ecs_lib.c over mbedtls, which has 11 of LibreSSL's 90 curves (NIDs 409, 415, 711 to 716, 928, 932, 934). The other 79 throw; other positive NIDs return null and queue
EC_R_UNKNOWN_GROUP. Keys use libSceLibreSsl3's EC layout andEC_KEY_new's defaults.EC_KEY_set_groupto another curve throws on a key that has a public or private key. Setting a key's own group keeps it, where LibreSSL frees it first. Null groups and keys throw where LibreSSL dereferences them
change [EC_POINT_new, EC_POINT_free, EC_POINT_point2oct, EC_POINT_oct2point, EC_KEY_generate_key, EC_KEY_check_key, EC_KEY_get0_public_key, EC_KEY_set_public_key, ECDSA_sign, ECDSA_verify, ECDH_compute_key]
- EC_POINT_new, EC_POINT_free, EC_POINT_point2oct, EC_POINT_oct2point, EC_KEY_generate_key, EC_KEY_check_key, EC_KEY_get0_public_key, EC_KEY_set_public_key, ECDSA_sign, ECDSA_verify, ECDH_compute_key (libSceLibreSsl) - no console check. They follow LibreSSL 2.5.4's ec, ecdsa and ecdh on the curves above; the
EC error queueentry lists what they queue. A point used with a group of another curve throws: LibreSSL's result depends on its build. Compressed points on NIDs 712 and 713 throw (mbedtls decompresses only for primes that are 3 mod 4).ECDSA_verifywith a public key at infinity or off the curve andECDH_compute_keywith a peer key off the curve throw, where LibreSSL computes with them. Setting a key's own public key copies it, where LibreSSL frees it first. Null points and keys throw where LibreSSL dereferences them
change [EC_POINT_mul]
- EC_POINT_mul (libSceLibreSsl) - not checked on the console. It follows LibreSSL 2.5.4's ec_lib.c and ec_mult.c on the curves above: the result is a scalar times the generator plus a scalar times the point, a term without its scalar or point is left out, and with neither the result is at infinity. Scalars are taken modulo the group order, which gives LibreSSL's points for negative scalars and scalars above the order, since every point on these curves has that order. A point off the curve throws, where LibreSSL computes with it; a point of another curve throws as above. No error code is queued: the ones LibreSSL has here are for points of another method and for internal failures