diff options
author | Sybren A. Stüvel <sybren@stuvel.eu> | 2016-01-22 15:40:13 +0100 |
---|---|---|
committer | Sybren A. Stüvel <sybren@stuvel.eu> | 2016-01-22 15:40:13 +0100 |
commit | f1c55540438fb88dbbc30c9c3bf7c4d82f5d59a2 (patch) | |
tree | cbb1054d57b334a296eacf96cc64e5e01ce755fb | |
parent | 6e5655d79e5e757217a90afad9cbe51dde08ba84 (diff) | |
download | rsa-git-f1c55540438fb88dbbc30c9c3bf7c4d82f5d59a2.tar.gz |
Removed doctest for blinding, as it is not suitable as an example for end users.
-rw-r--r-- | rsa/key.py | 8 |
1 files changed, 0 insertions, 8 deletions
@@ -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 |