From b477b53fc7e8afe64c380315e16eabfeaaaf7847 Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Thu, 13 Feb 2014 15:39:59 -0600 Subject: add the crt coefficients to the interface --- cryptography/hazmat/primitives/interfaces.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/cryptography/hazmat/primitives/interfaces.py b/cryptography/hazmat/primitives/interfaces.py index 460aab76..5ef469d0 100644 --- a/cryptography/hazmat/primitives/interfaces.py +++ b/cryptography/hazmat/primitives/interfaces.py @@ -227,6 +227,27 @@ class RSAPrivateKey(six.with_metaclass(abc.ABCMeta)): private_exponent. """ + @abc.abstractproperty + def dmp1(self): + """ + A Chinese remainder theorem coefficient used to speed up RSA + calculations. Calculated as: d mod (p-1) + """ + + @abc.abstractproperty + def dmq1(self): + """ + A Chinese remainder theorem coefficient used to speed up RSA + calculations. Calculated as: d mod (q-1) + """ + + @abc.abstractproperty + def iqmp(self): + """ + A Chinese remainder theorem coefficient used to speed up RSA + calculations. The modular inverse of q modulo p + """ + @abc.abstractproperty def e(self): """ -- cgit v1.2.3