aboutsummaryrefslogtreecommitdiffstats
path: root/cryptography
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2014-06-20 11:52:37 -0600
committerPaul Kehrer <paul.l.kehrer@gmail.com>2014-06-20 11:52:37 -0600
commit144a415be10fe454f6f2f6fd419c0b5efdbdb2a3 (patch)
treede67d19f1d1443352a70d60ff3dccaf7dabf9484 /cryptography
parent3f2b65cdf1cc3ef037bbca59aa8a9060e411831d (diff)
downloadcryptography-144a415be10fe454f6f2f6fd419c0b5efdbdb2a3.tar.gz
cryptography-144a415be10fe454f6f2f6fd419c0b5efdbdb2a3.tar.bz2
cryptography-144a415be10fe454f6f2f6fd419c0b5efdbdb2a3.zip
modify RSA numbers loading to match elliptic curve
fixes #1111
Diffstat (limited to 'cryptography')
-rw-r--r--cryptography/hazmat/primitives/asymmetric/rsa.py6
-rw-r--r--cryptography/hazmat/primitives/serialization.py8
2 files changed, 6 insertions, 8 deletions
diff --git a/cryptography/hazmat/primitives/asymmetric/rsa.py b/cryptography/hazmat/primitives/asymmetric/rsa.py
index fc117cd4..15ec52ac 100644
--- a/cryptography/hazmat/primitives/asymmetric/rsa.py
+++ b/cryptography/hazmat/primitives/asymmetric/rsa.py
@@ -377,6 +377,9 @@ class RSAPrivateNumbers(object):
def public_numbers(self):
return self._public_numbers
+ def private_key(self, backend):
+ return backend.load_rsa_private_numbers(self)
+
class RSAPublicNumbers(object):
def __init__(self, e, n):
@@ -396,3 +399,6 @@ class RSAPublicNumbers(object):
@property
def n(self):
return self._n
+
+ def public_key(self, backend):
+ return backend.load_rsa_public_numbers(self)
diff --git a/cryptography/hazmat/primitives/serialization.py b/cryptography/hazmat/primitives/serialization.py
index 056d4a06..ed73c4c4 100644
--- a/cryptography/hazmat/primitives/serialization.py
+++ b/cryptography/hazmat/primitives/serialization.py
@@ -24,11 +24,3 @@ def load_pem_pkcs8_private_key(data, password, backend):
return backend.load_pkcs8_pem_private_key(
data, password
)
-
-
-def load_rsa_private_numbers(numbers, backend):
- return backend.load_rsa_private_numbers(numbers)
-
-
-def load_rsa_public_numbers(numbers, backend):
- return backend.load_rsa_public_numbers(numbers)