From 9fcceac943006b6e6b3a8a5b3ba9a9463d04090c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Wed, 23 Oct 2013 20:56:12 +0200 Subject: [PATCH] Add a comment about modules coupling --- library/ecp.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/library/ecp.c b/library/ecp.c index 64d4e0339..bedb67506 100644 --- a/library/ecp.c +++ b/library/ecp.c @@ -1581,6 +1581,15 @@ int ecp_gen_keypair( ecp_group *grp, mpi *d, ecp_point *Q, } #if defined(POLARSSL_ECP_NIST_OPTIM) +/* + * Fast reduction modulo the primes used by the NIST curves. + * + * These functions are: critical for speed, but not need for correct + * operations. So, we make the choice to heavily rely on the internals of our + * bignum library, which creates a tight coupling between these functions and + * our MPI implementation. However, the coupling between the ECP module and + * MPI remains loose, since these functions can be deactivated at will. + */ #if defined(POLARSSL_ECP_DP_SECP192R1_ENABLED) /*