-
Notifications
You must be signed in to change notification settings - Fork 1k
Create class for PublicKey and Signature #989
Copy link
Copy link
Closed
Labels
CosmeticType - Changes that improve user experience without affecting current functionality.Type - Changes that improve user experience without affecting current functionality.DesignIssue state - Feature accepted but the solution requires a design before being implementedIssue state - Feature accepted but the solution requires a design before being implementedHousekeepingSmall enhancements that need to be done in order to keep the project organisedSmall enhancements that need to be done in order to keep the project organised
Metadata
Metadata
Assignees
Labels
CosmeticType - Changes that improve user experience without affecting current functionality.Type - Changes that improve user experience without affecting current functionality.DesignIssue state - Feature accepted but the solution requires a design before being implementedIssue state - Feature accepted but the solution requires a design before being implementedHousekeepingSmall enhancements that need to be done in order to keep the project organisedSmall enhancements that need to be done in order to keep the project organised
Not all of us are superhumans like Erik, so I propose to create simple classes PublicKey and Signature, for the rest of us, poor human beings 😂
Really, I still have many difficulties in understanding the usage of ECPoint, ECCurve, ECField, etc, just to handle a simple publickey. I often forget too which is the correct size of a signature for Neo secp256r1 (64 bytes, right?).
I think that, in the end, these classes are useful and necessary to represent the basic concepts of PublicKey and Signature on Neo. Signature is just a 64-bytearray today (because we are using secp256r1), but who knows tomorrow? Same for PublicKey, it's hard for me to simply handle it as a bytearray in compressed (33-bytes) or uncompressed format (which I don't know the size now...)
I think that this simplifies many things, and makes it much easier to handle this two fundamental concepts during the whole project.