aionnetwork / aion_fastvm

Aion's FastVM implementation
MIT License
33 stars 15 forks source link

APB 46 add edverify solidity function #16

Closed alexandrulaurus closed 6 years ago

alexandrulaurus commented 6 years ago

Creates a new solidity function that binds to the precompiled contract which validates an ED25519 signature.

     * edverify(bytes32 hash, bytes32 signature_part_1, bytes32 signature_part_2, bytes32 public_key)
     *
     *                                              input
     *                                                |
     * | message hash (32 bytes) | signature part 1 (32 bytes) | signature part 2 (32 bytes) | public key (32 bytes) |
     *
     * where
     *      - message hash = keccak hashed message
     *      - signature part 1 = first 32 bytes of the ED25519 signature bytes
     *      - signature part 2 = last 32 bytes of the ED25519 signature bytes
     *      - public key = public key of the ED25519 key pair
alexandrulaurus commented 6 years ago

There is a current limitation with the AVM which does not allow dynamic parameters in functions or function return types. Closing this until further notice.