Neo: Refactor ECPoint for NEO3x

Created on 19 May 2020  路  3Comments  路  Source: neo-project/neo

ECPoint is used in different parts of the code, however, in principle, in most of its use cases we could direct use pubkey as byte[] itself.

discussion

Most helpful comment

However, for a more generic use the function public static ECPoint DecodePoint(ReadOnlySpan<byte> encoded, ECCurve curve) should use the This.Curve of the object.

All 3 comments

Maybe now with support to more cryptography standards there will be more use cases https://github.com/neo-project/neo/commit/1af936929093721ec274167829761ddba825c86c

However, for a more generic use the function public static ECPoint DecodePoint(ReadOnlySpan<byte> encoded, ECCurve curve) should use the This.Curve of the object.

Agree, this can better encapsulate the parsing process of publickey in functions such as signature verification, which is conducive to supporting more encryption standards.This is consistent with the principle of cohesion

Was this page helpful?
0 / 5 - 0 ratings

Related issues

doubiliu picture doubiliu  路  3Comments

igormcoelho picture igormcoelho  路  3Comments

Tommo-L picture Tommo-L  路  4Comments

igormcoelho picture igormcoelho  路  4Comments

roman-khimov picture roman-khimov  路  3Comments