Open
Description
Given the structure of kyber, the following piece of code often appears:
func (P *point) Add(P1, P2 kyber.Point) kyber.Point {
E1 := P1.(*point)
...
Unfortunately if P1 is not the right type, this will panic. Allowing to return errors would allow graceful handling of the problem:
func (P *point) Add(P1, P2 kyber.Point) (kyber.Point, error) {
E1, ok := P1.(*point)
if !ok {
/* Handle error */
return nil, _some error_
...