Function rejectIdentity [src]

Reject the neutral element.

Prototype

pub fn rejectIdentity(p: P384) IdentityElementError!void

Parameters

p: P384

Possible Errors

IdentityElement IdentityElementError

Source

pub fn rejectIdentity(p: P384) IdentityElementError!void { const affine_0 = @intFromBool(p.x.equivalent(AffineCoordinates.identityElement.x)) & (@intFromBool(p.y.isZero()) | @intFromBool(p.y.equivalent(AffineCoordinates.identityElement.y))); const is_identity = @intFromBool(p.z.isZero()) | affine_0; if (is_identity != 0) { return error.IdentityElement; } }