From 48ee6cfe03ef2ae23e866ff1da9d12cea1f3ddf4 Mon Sep 17 00:00:00 2001 From: J08nY Date: Wed, 25 Oct 2023 18:05:26 +0200 Subject: Add BoringSSL to library docs. --- docs/libraries.rst | 118 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 118 insertions(+) diff --git a/docs/libraries.rst b/docs/libraries.rst index 292d4bc..1112cc3 100644 --- a/docs/libraries.rst +++ b/docs/libraries.rst @@ -122,3 +122,121 @@ Verify: ``Ed25519.verify -> Ed25519.implVerify -> Ed25519.scalarMultStraus128Var``. - Many coordinate systems: Extended, half-Niels, affine. - Some HWCD formulas are used. + + +BoringSSL +========= + +| Version: ``bfa8369`` (commit bfa8369) +| Repository: https://github.com/google/boringssl/ +| Docs: https://commondatastorage.googleapis.com/chromium-boringssl-docs/headers.html + +Primitives +---------- + +Supports P-224, P-256, P-384 and P-521. +Also Curve25519. +Uses fiat-crypto for the SECP curve field arithmetic. + +P-224 +^^^^^ + - Short-Weierstrass + - `Comb `_ via ``mul_base -> ec_GFp_nistp224_point_mul_base``. + `Fixed Window `_ via ``mul -> ec_GFp_nistp224_point_mul``. + - `Jacobian `_, + - Formulas unknown. + +P-256 +^^^^^ + - Short-Weierstrass + - `Comb `_ via ``mul_base -> ec_GFp_nistp256_point_mul_base``. + `Fixed Window `_ via ``mul -> ec_GFp_nistp256_point_mul``. + - `Jacobian-3 `_, + - `add-2007-bl `_, + `dbl-2001-b `_ + +P-384 +^^^^^ + - Uses defaults (described below). + +P-521 +^^^^^ +- Uses defaults (described below). + +ECDH +^^^^ + +KeyGen: + - Short-Weierstrass + - ``EC_KEY_generate_key -> ec_point_mul_scalar_base -> meth.mul_base``. + Default: `Fixed Window `_, via ``ec_GFp_mont_mul_base -> ec_GFp_mont_mul``. + - `Jacobian `_ +- `add-2007-bl `_, `dbl-2001-b `_ + +Derive: + - Short-Weierstrass + - ``ECDH_compute_key -> ec_point_mul_scalar -> meth.mul``. + Default: `Fixed Window `_, via ``ec_GFp_mont_mul``. + - `Jacobian `_ + - `add-2007-bl `_, `dbl-2001-b `_ + +ECDSA +^^^^^ + +KeyGen: + - Short-Weierstrass + - ``EC_KEY_generate_key -> ec_point_mul_scalar_base -> meth.mul_base``. + Default: `Fixed Window `_, via ``ec_GFp_mont_mul``. + - `Jacobian `_ + - `add-2007-bl `_, `dbl-2001-b `_ + +Sign: + - Short-Weierstrass + - ``ECDSA_sign -> ECDSA_do_sign -> ecdsa_sign_impl -> ec_point_mul_scalar_base -> meth.mul_base``. + Default: `Fixed Window `_, via ``ec_GFp_mont_mul``. + - `Jacobian `_ +- `add-2007-bl `_, `dbl-2001-b `_ + +Verify: + - Short-Weierstrass + - ``ECDSA_verify -> ECDSA_do_verify -> ecdsa_do_verify_no_self_test -> ec_point_mul_scalar_public -> meth.mul_public or meth.mul_public_batch``. + Default: `Window NAF (w=4) based interleaving multi-exponentiation method `_, via ``ec_GFp_mont_mul_public_batch``. + - `Jacobian `_ +- `add-2007-bl `_, `dbl-2001-b `_ + +X25519 +^^^^^^ + +KeyGen: + - Twisted-Edwards + - ?? via ``X25519_keypair -> X25519_public_from_private -> x25519_ge_scalarmult_base``. + - Has `multiple coordinate systems `_: projective, extended, completed, Duif + - Unknown formulas. `dbl `_, `add `_ + +Derive: + - Montgomery + - Ladder via ``X25519 -> x25519_scalar_mult -> x25519_NEON/x25519_scalar_mult_adx/x25519_scalar_mult_generic`` + - Actually seems to use xz. + - Unknown formula (ladder). + +Ed25519 +^^^^^^^ +Based on ref10 of Ed25519. + +KeyGen: + - Twisted-Edwards + - ?? via ``ED25519_keypair -> ED25519_keypair_from_seed -> x25519_ge_scalarmult_base``. + - Has `multiple coordinate systems `_: projective, extended, completed, Duif + - Unknown formulas. `dbl `_, `add `_ + +Sign: + - Twisted-Edwards + - ?? via ``ED25519_sign -> ED25519_keypair_from_seed -> x25519_ge_scalarmult_base``. + - Has `multiple coordinate systems `_: projective, extended, completed, Duif + - Unknown formulas. `dbl `_, `add `_ + +Verify: + - Twisted-Edwards + - Sliding window (signed) with interleaving? via ``ED25519_verify -> ge_double_scalarmult_vartime``. + - Has `multiple coordinate systems `_: projective, extended, completed, Duif + - Unknown formulas. `dbl `_, `add `_ -- cgit v1.3.1