pkenc_rabin¶
Rabin Public Key Encryption Scheme (Rabin)
Authors: M. O. Rabin
Title: “Digitalized Signatures and Public-Key Functions as Intractable as Factorization”
Published in: MIT Laboratory for Computer Science, 1979
Available from:
Notes:
Scheme Properties
Type: encryption (public key)
Setting: Integer
Assumption: Integer Factorization
Implementation
- Authors:
Christina Garman
- Date:
09/2011
- class pkenc_rabin.Rabin(modulus=<charm.toolbox.specialprimes.BlumWilliamsInteger object>)[source]¶
Bases:
object
- class pkenc_rabin.Rabin_Enc(padding=<charm.toolbox.paddingschemes.SAEPEncryptionPadding object>, redundancy=<charm.toolbox.redundancyschemes.InMessageRedundancy object>, params=None)[source]¶
Bases:
Rabin,PKEnc>>> rabin = Rabin_Enc() >>> (public_key, secret_key) = rabin.keygen(128, 1024) >>> msg = b'This is a test' >>> cipher_text = rabin.encrypt(public_key, msg) >>> decrypted_msg = rabin.decrypt(public_key, secret_key, cipher_text) >>> decrypted_msg == msg True
- class pkenc_rabin.Rabin_Sig(padding=<charm.toolbox.paddingschemes.OAEPEncryptionPadding object>)[source]¶
Bases:
Rabin,PKSigRSASSA-PSS
>>> msg = b'This is a test message.' >>> rabin = Rabin_Sig() >>> (public_key, secret_key) = rabin.keygen(1024) >>> signature = rabin.sign(secret_key, msg) >>> rabin.verify(public_key, msg, signature) True