You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Populate attributes in Signature and KeyEncapsulation
ctypes.Structure.__init__() initializes attributes using the
list _fields_. However, these are empty because this happens before
native().OQS_SIG_new() or native().OQS_KEM_new() are called.
The dict self.details was showing correct values by reading and
decoding directly from self._sig/self._kem. However, all the other
public attributes like self.method_name, self.alg_version or the keys
and signature lengths were incorrect. Either None or 0 depending on the
ctype defined in _fields_.
Instead, let's manually populate all relevant attributes from _fields_
after OQS_SIG_new() or OQS_KEM_new() are called, and let's use those
values to create the dict self.details.
Signed-off-by: Iyán Méndez Veiga <[email protected]>
0 commit comments