The curve_obj attribute for elliptic curves was set to reference the curve's type, rather than an instance of the type. This contradicted both the type annotation, and the recommended usage in the cryptography package, whose functions always expect an instance. All the definitions of that attribute now create a cryptography curve instance.
There was a similar discrepancy for OKP curves, which used a basic Ed25519PrivateKey (or similar) annotation, but hold references to the class, rather than a specific instance. In this case, the type annotation was modified using the Type constructor to accurately reflect this.
All curve attributes were marked as abstract properties, which makes them attributes of instances of CoseCurve, even though throughout the codebase they are use as class attributes throughout the codebase. This is fixed by using the ClassVar type constructor on the attributes. Unfortunately there seems to be no reliably supported way of combining @classmethod and @property.
There was some accidental shadowing, by defining a curve class with the same name as the imported type from the cryptography package. We now always refer to the imported curves using ec. to avoid ambiguities.
The curve_obj attribute for elliptic curves was set to reference the curve's type, rather than an instance of the type. This contradicted both the type annotation, and the recommended usage in the cryptography package, whose functions always expect an instance. All the definitions of that attribute now create a cryptography curve instance.
There was a similar discrepancy for OKP curves, which used a basic Ed25519PrivateKey (or similar) annotation, but hold references to the class, rather than a specific instance. In this case, the type annotation was modified using the Type constructor to accurately reflect this.
All curve attributes were marked as abstract properties, which makes them attributes of instances of CoseCurve, even though throughout the codebase they are use as class attributes throughout the codebase. This is fixed by using the ClassVar type constructor on the attributes. Unfortunately there seems to be no reliably supported way of combining @classmethod and @property.
There was some accidental shadowing, by defining a curve class with the same name as the imported type from the cryptography package. We now always refer to the imported curves using ec. to avoid ambiguities.