#18413: BlumGoldwasser Incomplete Inheritance
----------------------------+----------------------------
Reporter: peter.story | Owner:
Type: defect | Status: new
Priority: major | Milestone: sage-6.7
Component: cryptography | Keywords:
Merged in: | Authors:
Reviewers: | Report Upstream: N/A
Work issues: | Branch:
Commit: | Dependencies:
Stopgaps: |
----------------------------+----------------------------
`BlumGoldwasser` doesn't properly inherit from its superclass,
`PublicKeyCryptosystem`.
First, initialization is incomplete. The superclass of
`PublicKeyCryptosystem` is `Cryptosystem`, whose initialization requires
the arguments: `plaintext_space`, `ciphertext_space`, `key_space`,
`block_length`, and `period`. These are not being supplied.
As a result, calls to the methods `plaintext_space()`, `cipher_domain()`,
`ciphertext_space()`, `cipher_codomain()`, `key_space()`,
`block_length()`, and `period()` fail. For example:
{{{
sage: from sage.crypto.public_key.blum_goldwasser import BlumGoldwasser
sage: bs = BlumGoldwasser()
sage: bs.key_space()
AttributeError: 'BlumGoldwasser' object has no attribute '_key_space'
}}}
The easiest solution would be to stop inheriting from
`PublicKeyCryptosystem`.
--
Ticket URL: <http://trac.sagemath.org/ticket/18413>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.