summaryrefslogtreecommitdiff
path: root/rsa/key.py
diff options
context:
space:
mode:
authorSybren A. Stüvel <sybren@stuvel.eu>2016-01-22 15:40:13 +0100
committerSybren A. Stüvel <sybren@stuvel.eu>2016-01-22 15:40:13 +0100
commitf1c55540438fb88dbbc30c9c3bf7c4d82f5d59a2 (patch)
treecbb1054d57b334a296eacf96cc64e5e01ce755fb /rsa/key.py
parent6e5655d79e5e757217a90afad9cbe51dde08ba84 (diff)
downloadrsa-git-f1c55540438fb88dbbc30c9c3bf7c4d82f5d59a2.tar.gz
Removed doctest for blinding, as it is not suitable as an example for end users.
Diffstat (limited to 'rsa/key.py')
-rw-r--r--rsa/key.py8
1 files changed, 0 insertions, 8 deletions
diff --git a/rsa/key.py b/rsa/key.py
index f1098d6..c70db9a 100644
--- a/rsa/key.py
+++ b/rsa/key.py
@@ -103,14 +103,6 @@ class AbstractKey(object):
The blinding is such that message = unblind(decrypt(blind(encrypt(message))).
See https://en.wikipedia.org/wiki/Blinding_%28cryptography%29
-
- >>> pk = PrivateKey(3727264081, 65537, 3349121513, 65063, 57287)
- >>> message = 12345
- >>> encrypted = rsa.core.encrypt_int(message, pk.e, pk.n)
- >>> blinded = pk.blind(encrypted, 4134431) # blind before decrypting
- >>> decrypted = rsa.core.decrypt_int(blinded, pk.d, pk.n)
- >>> pk.unblind(decrypted, 4134431)
- 12345
"""
return (message * pow(r, self.e, self.n)) % self.n